Not Receiving Correct ESPNOW Payload Values
Posted: Sun Oct 04, 2020 10:00 pm
Hello, I am using the current master branch version of espnow and trying to transmit and receive a payload.
However when I print the value I am receiving on the second esp32 in the example_espnow_data_parse function like
I get a repeating value of 251. I am assume esp_fill_random should put random values in buf->payload instead of 251 every time (except when it first connects).
Here is what I am receiving:
If I add this to example_espnow_data_prepare and comment out esp_fill_random
I still see the same results as above with just getting a value of 251.
How do I pull values from the uint8_t payload array?
However when I print the value I am receiving on the second esp32 in the example_espnow_data_parse function like
Code: Select all
printf("PAYLOAD: %u\n", buf->payload[0]);
Here is what I am receiving:
Code: Select all
PAYLOAD: 251
I (21815) espnow_example: Receive 0th broadcast data from: 30:ae:a4:8d:ee:2c, len: 10
I (22815) espnow_example: send data to ff:ff:ff:ff:ff:ff
PAYLOAD: 251
I (22815) espnow_example: Receive 1th broadcast data from: 30:ae:a4:8d:ee:2c, len: 10
I (23815) espnow_example: send data to ff:ff:ff:ff:ff:ff
PAYLOAD: 251
I (23815) espnow_example: Receive 2th broadcast data from: 30:ae:a4:8d:ee:2c, len: 10
PAYLOAD: 64
I (23815) espnow_example: Receive 0th unicast data from: 30:ae:a4:8d:ee:2c, len: 10
PAYLOAD: 251
I (24735) espnow_example: Receive 1th unicast data from: 30:ae:a4:8d:ee:2c, len: 10
PAYLOAD: 251
I (25735) espnow_example: Receive 2th unicast data from: 30:ae:a4:8d:ee:2c, len: 10
Code: Select all
buf->payload[0] = 42;
How do I pull values from the uint8_t payload array?