Hi.
I have been playing around with the Tutorial code used to set up the Wifi through the Access point on an ESP8266.
I want to be able to send a series of objects as one group from the ESP to a controlling device.
I am using the stored values in the EEPROM as per Erel's code to send back the data, but I am trying to send back a Command string before that data.
The code currently looks like this:
The EEPROM settings data has seven objects stored in there as per the code in Erel's AP access code.
If I send this data using
I end up getting one object received (the Command), then a separate set of 7 objects. But it requires two Async_NewData calls at the receiver to do this.
How can I combine the Command bytes with the EEPROM settings so that instead of two calls being made, I just have one call with 8 objects being transmitted?
I tried using
But that only seemed to send the Command bit.
Thanks for any help,
JMB
I have been playing around with the Tutorial code used to set up the Wifi through the Access point on an ESP8266.
I want to be able to send a series of objects as one group from the ESP to a controlling device.
I am using the stored values in the EEPROM as per Erel's code to send back the data, but I am trying to send back a Command string before that data.
The code currently looks like this:
B4X:
Dim StoredLength As Byte = GetStoredDataLength
Dim Command() As Byte = serializator.ConvertArrayToBytes(Array("ESP Settings"))
Dim EEPROMSettings() As Byte = eeprom.ReadBytes(2, StoredLength)
The EEPROM settings data has seven objects stored in there as per the code in Erel's AP access code.
If I send this data using
B4X:
JBAsyncStream.Write(Command).Write(EEPROMSettings)
I end up getting one object received (the Command), then a separate set of 7 objects. But it requires two Async_NewData calls at the receiver to do this.
How can I combine the Command bytes with the EEPROM settings so that instead of two calls being made, I just have one call with 8 objects being transmitted?
I tried using
B4X:
Dim FinalOuput() As Byte = JoinBytes(Array(Command,EEPROMSettings))
JBAsyncStream.Write(FinalOuput)
But that only seemed to send the Command bit.
Thanks for any help,
JMB