thomasfla / Linux-ESPNOW

An attempt at implementing a direct link between a linux station and an ESP module using ESPNOW protocol for real time robot control
BSD 2-Clause "Simplified" License
178 stars 28 forks source link

Does it only support broadcast mode? #6

Open pokliu opened 1 year ago

pokliu commented 1 year ago

I found that this library works fine when using broadcast mode, but if I configure the target address as ESP_mac, then the esp_now_send function call returns a non-zero error.

...
static uint8_t my_mac[6] = {0xA4, 0xC4, 0x94, 0x20, 0x8A, 0x0F};
static uint8_t dest_mac[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
static uint8_t ESP_mac[6] = {0x34, 0x85, 0x18, 0x8F, 0x73, 0x48};
...
handler = new ESPNOW_manager("wlp2s0", DATARATE_1Mbps, CHANNEL_freq_11, my_mac, ESP_mac, false);
handler->set_filter(ESP_mac, my_mac);
...

image

From the packet capture results, it seems that Linux-ESPNOW does not have the ACK ESP32 module.

thomasfla commented 1 year ago

You are correct, I did not implement the ACK of the espnow protocol and only worked with broadcast packet. For our application, we needed low latency, so we used broadcast for this purpose of not having an acknowledgement packet.

I guess you could implement this using this code as a simple base.