ESP8266-01 Missing Packet Data?
Posted: Thu Feb 04, 2016 7:01 am
Hopefully someone can give me a logical explanation for this.
I have external code on 3 platforms. This code communicates with my ESP via UDP.
Right off I realized sending large packets caused the esp to reset/panic.
I changed my code to send smaller packets and it works great. Now to get to the issue.
The esp is getting getting 28 byte packages. That represent int's for settings.
What I can't figure out is why bytes 8 9 11 12 always return 0 on the receiving side, when I see that the data is being passed correctly from all external apps.
Example Code:
byte packetBuffer[] = "28";
Udp.read(packetBuffer,28);
ArrayToInteger converter;
converter.array[0] = packetBuffer[8];
converter.array[1] = packetBuffer[9];
converter.array[2] = packetBuffer[10];
converter.array[3] = packetBuffer[11];
data_between_8_and_11 = converter.integer;
yield();
Thanks in advance.
I have external code on 3 platforms. This code communicates with my ESP via UDP.
Right off I realized sending large packets caused the esp to reset/panic.
I changed my code to send smaller packets and it works great. Now to get to the issue.
The esp is getting getting 28 byte packages. That represent int's for settings.
What I can't figure out is why bytes 8 9 11 12 always return 0 on the receiving side, when I see that the data is being passed correctly from all external apps.
Example Code:
byte packetBuffer[] = "28";
Udp.read(packetBuffer,28);
ArrayToInteger converter;
converter.array[0] = packetBuffer[8];
converter.array[1] = packetBuffer[9];
converter.array[2] = packetBuffer[10];
converter.array[3] = packetBuffer[11];
data_between_8_and_11 = converter.integer;
yield();
Thanks in advance.