General Question re Comms

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,156
I have a design problem that I’m just starting to work in.

I need to implement many-to-many bidirectional communications. I can envision a design using wireless comms, a wireless router and telnet protocol.

But I’m curious as to if I can accomplish many-to-many bidirectional comms with Bluetooth. This would obviate the need to include a wireless router in the design.

Which is a simpler solution? I will add that I am familiar with IP communications and have never worked with Bluetooth
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,156
I’ve decided to play with Wi-Fi connections, using ESP-01 modules.

I’ve not decided whether to use external Wi-Fi access points or using a local ESP-01 as the access point.

I’m leaning toward the latter as it provides exactly what I need. Communications between nodes will be via Telnet.

The application is for my animatronic scenes. There will be 10-2o groupings if 2-5 nodes. So each scene will have one access point implemented via an ESP-02. Two to five nodes will communicate with each other. All I need is an ASCII message to be exchanged in a many-to-many “mesh”,

Each local AP will be used to exchange Telnet messages. The message will contain a destination node, plus two numeric values. The destination node will identify which node to surprise. The first value will identify an action. The second is a parameter for the action (execution time or identification of code to be executed or a parameter for the code to be executed).

It’s important that nodes in one area are ignored by nor affected by communication to nodes in any other area.

If anyone thinks this protocol can be implemented easier with Bluetooth, please let me know!!!

Thanks
 
Last edited:

Ya’akov

Joined Jan 27, 2019
9,071
Telnet doesn't seem the best choice. I would use multicast UDP. If you need guaranteed delivery, you can work that out a layer up from the IP stack. I would probably opt for redundant messages rather than ACKs. Alternatively, you could have the nodes poll a master to ensure messages are delivered.

Perhaps a token passing scheme on top of UDP...
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,156
Telnet doesn't seem the best choice. I would use multicast UDP. If you need guaranteed delivery, you can work that out a layer up from the IP stack. I would probably opt for redundant messages rather than ACKs. Alternatively, you could have the nodes poll a master to ensure messages are delivered.

Perhaps a token passing scheme on top of UDP...
Thanks for the advice! My first reaction is that I don’t want multicast. The software at each node is multi-tasking and having to continually having to react to irrelevant messages, may affect the multitasking. Each node may be executing about twelve tasks and up to 64 tasks, in a cooperative multi-tasking environment. This function will be affected by continuous network polling and processing.

Basically, I’d prefer each node to react only when it’s being addressed. With static IP addresses, I can ensure that this happens. Using addresses in the 10.x.y.z, I can assign all nodes in one scene to a Subnet ic 10.scene.x.y, where x=o are network devices and x=1 are nodes.

Along the same lines, redundant messages would impose a processing delay that may affect the multitasking.

Delivery is guaranteed because after the client receives a message, the next message comes from that client. I.e., client 1 sends message A to client 2. Client 2 is the only source for message B... if it doesn’t send message B, so what? The action sequence is interrupted.... And message A will be sent again some time in the future and the entire sequence will be executed.

All nodes are contained in a 50 sq.ft. area, so the likelihood of a missed message is small.
 

Ya’akov

Joined Jan 27, 2019
9,071
Given the constraints, I would expect that a lighter weight UDP messaging scheme would be preferable. You can use unicast, but with no requirement to ACK the traffic will be much less and the processing load too.

Telnet has a lot of useless overhead for your application.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,156
Given the constraints, I would expect that a lighter weight UDP messaging scheme would be preferable. You can use unicast, but with no requirement to ACK the traffic will be much less and the processing load too.

Telnet has a lot of useless overhead for your application.
Ok, I defer to your experience. When I get the base Arduinos to connect, I’ll approach you again to get some direction as to how to proceed.

Thanks immensely!
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,156
I can’t help myself. From the perspective of an individual node, will that node ever receive traffic that is not intended for it?
 

Ya’akov

Joined Jan 27, 2019
9,071
I can’t help myself. From the perspective of an individual node, will that node ever receive traffic that is not intended for it?
UDP is just as unicast as TCP, but it has much less overhead.

TCP has a bunch of guaranteed delivery junk built in, UDP (User Datagram Protocol) leaves it up to you to handle ACKs, NAKs, sequencing, and retires if you want any of them. It just squirts a message at the intended destination and moves on.
 

Thread Starter

djsfantasi

Joined Apr 11, 2010
9,156
UDP is just as unicast as TCP, but it has much less overhead.

TCP has a bunch of guaranteed delivery junk built in, UDP (User Datagram Protocol) leaves it up to you to handle ACKs, NAKs, sequencing, and retires if you want any of them. It just squirts a message at the intended destination and moves on.
Good information. I always thought that UDP was only a broadcast protocol
 
Top