Hello All,
Me again. After doing some testing I determined that the uiFlow code is adding 10 bytes of information (preData
) to the beginning of the text being sent. Maybe some type of checksum. This can be seem here.
Most the preData
bytes are constant, either 1
or 0
. Below is preData
I created in the Arduino IDE and sent to a M5StickC Plus to get the receive callback to be triggered.
// Sent from Arduino IDE, ESP32, #include <esp_now.h>
// The 3 combinations for header3, header5, header6 and cmd after the comment (//) trigger the uiFlow receive callback.
// Changing any of the values causes the uiFlow receive callback not be to triggered
// There must be a some type of checksum calculation within the M5Stack uiFlow code.
data.header1 = 1;
data.header2 = 1;
data.header3 = 0; // 0, 1, 2 Seems to be a counter, rolling over a 255
data.header4 = 0;
data.header5 = 222; // 222, 249, 144 Seems to be a checksum of some kind
data.header6 = 67; // 67, 111, 27 Seems to be a checksum of some kind
data.header7 = 0;
data.header8 = 0;
data.header9 = 0;
data.header10 = 0;
strcpy(data.cmd, "on");// on, on, on
esp_now_send(broadcastAddress, (uint8_t *)&data, sizeof(data));
Can someone point me to the code which creates the 10 bytes of information?
Thanks You
Austin