Closed aaron-neal closed 4 years ago
For now, I have used bus.set_id(random(1, 254)); to get round this issue. But I am hoping to use all 10 device, and cannot risk a clash. Addtionally, hardcoding of IDs is not a route I would like to take.
Ciao @porkyneal yes, you are right, thank you for raising this. The ESPNOW strategy and in particular find_remote_node
are not designed to handle mac addressess. It looks find_remote_node
should receive a second mac
parameter. In send_frame
the strategy needs to parse the packet to get the mac address if present within the payload and pass it to find_remote_node
.
@porkyneal we have recently added MAC support within the PJON format this is why ESPNOW
is in this state.
To be able to communicate with all devices keeping the acknowledgement my suggestion is to use PJON_NOT_ASSIGNED
device id for all nodes, after find_remote_node
is patched it should work fine. Let me know if you want to attempt to fix the source or you want me to do it.
Ciao @porkyneal I have merged your pull, made few minor changes and added you in the list of contributors. Thank you again for your support.
No worries, appreciate the quick responses!
Many thanks for your great library, got up and running very quickly with two ESP32s. My problem now comes when I am trying to talk between 3 or more ESP32s
I am using #define PJON_INCLUDE_MAC
My aim is to only use Mac Addresses to communicate with specific devices, rather than the PJON ID, is this possible?
I seem to have a problem where when sending to a device that was the second device to have registered, the message gets sent to the first device to be registered., But fails because the info.rx.mac does not match that device. My short debugging time looks to point at the fact all the devices have an ID of 255.
I think find_remote_node always returns position 0, which then uses the MAC address that registred first.
Any pointers would be greatly appreciated.