ESP-NOW using multiple hubs

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

ESP-NOW using multiple hubs

Postby catotonic » Fri Oct 21, 2022 11:43 am

I am trying to develop a plantwide network of sensor that might have dozens of nodes. If limited to 10 or 20 nodes I would need the ability to set up multiple hubs in close proximity to one another. There would be only one communication session going on at a time. Is it possible to set up two or more hubs or clients close enough to one another that they might be able to "hear" each others transmission and still maintain data integrity?

wuyuanyi
Posts: 28
Joined: Wed Mar 09, 2022 11:54 am

Re: ESP-NOW using multiple hubs

Postby wuyuanyi » Sun Oct 23, 2022 4:09 pm

I don't understand what the hub is for. Do you want to use the 'hub' as a signal relay to re-transmit the ESP-NOW packet to a far-away node?

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

Re: ESP-NOW using multiple hubs

Postby catotonic » Sun Oct 23, 2022 6:35 pm

In a one to many topology, I am using the term hub to describe the esp32 that originates a request or message and acts as an AP communicating to many ESP32 nodes. For example: One AP to, say, 10 nodes or endpoints would constitute network A. If I had another similar network called B, what mechanism is there to keep the two APs and the different endpoint from the different networks from cross talking?

wuyuanyi
Posts: 28
Joined: Wed Mar 09, 2022 11:54 am

Re: ESP-NOW using multiple hubs

Postby wuyuanyi » Sun Oct 23, 2022 8:28 pm

Would the hubs A and B talk to each other?
If no, maybe put them in different channels?
If yes, I would not try to physically isolate them but use software approach to filter the intended packets.
One idea came across my mind is to use encryption with different set of keys for the nodes in different subnet. But I have never tried this way.

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

Re: ESP-NOW using multiple hubs

Postby catotonic » Sun Oct 23, 2022 10:21 pm

I have read that ESP-NOW uses both MAC and IP addressing but I have not found a good article about when or if to use either or both.
I will have a CPU sending out one request at a time directed to a single endpoint which could be on either network.

Would it be best to set fixed IP's on everything, use software MACs or broadcast and use an ID in the message to check if the receiving endpoint should respond. If there is a document or site that explains some of this, I would prefer. But so far what I found are example of simple small networks.

wuyuanyi
Posts: 28
Joined: Wed Mar 09, 2022 11:54 am

Re: ESP-NOW using multiple hubs

Postby wuyuanyi » Mon Oct 24, 2022 5:38 pm

catotonic wrote:
Sun Oct 23, 2022 10:21 pm
I have read that ESP-NOW uses both MAC and IP addressing but I have not found a good article about when or if to use either or both.
I will have a CPU sending out one request at a time directed to a single endpoint which could be on either network.

Would it be best to set fixed IP's on everything, use software MACs or broadcast and use an ID in the message to check if the receiving endpoint should respond. If there is a document or site that explains some of this, I would prefer. But so far what I found are example of simple small networks.
ESP-NOW uses broadcast or point-to-point unicast with the MAC address of the receiving device. You may hard-code the mac addresses of each device or design some sort of device discovery mechanism (e.g., broadcast an ID and all node will respond with its type, etc.), depending whether the system is fixed or need the flexibility to change the structure.

How the receiving endpoint should respond to your request is application-specific and ESPNOW does not supply them in their protocol. You may need to implement them on your own.

My application uses ESP-NOW to exchange data between tens devices using only broadcast and handle the packet in software. This way prevents the re-transmittion if the packet is lost. You may need to roll out your own application protocol to handle the packets.

catotonic
Posts: 36
Joined: Sun Jul 16, 2017 6:55 pm
Location: Houston, TX
Contact:

Re: ESP-NOW using multiple hubs

Postby catotonic » Mon Oct 24, 2022 6:10 pm

Thanks wuyuanyi,
I think my plan will be to use different channels for networks that are close to one another and to broadcast to everyone on a network using software ID to control which one responds.

Who is online

Users browsing this forum: No registered users and 84 guests