Wireless Network Protocol
SciNemo
Posts: 91
I am making a project where there are many devices, each with a transmitter and receiver, all operating on the same frequency, that must send short messages to each other. The communication does not have to happen simultaneously, but because the frequency is the same there must be some system so that the devices don't step on each other's toes.
Anyone know a way that I could implement a system to prevent the devices from screwing up each other's messages? A solution that would be possible on the propeller would be most welcome
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
Anyone know a way that I could implement a system to prevent the devices from screwing up each other's messages? A solution that would be possible on the propeller would be most welcome
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
Comments
Another alternative is Mult-master I2C which might be easier to grok.
It would be neat to see a network of props that can communicate with each other and identify which prop has internet access and then that prop provide the access to all other prop "clients"
The ability to have any one of the props act as a internet server upon discovery of its own internet connection, or even link other wifi props so internet access can be found.
@Clock Loop-I'm not sure, but I think Wifi has signals in the Gigahertz range, which would be way out of the reach of generation by a propeller. You could get a module for wifi interfacing, but they are usually quite expensive. As for you other idea, that is basically what I am doing, with some added stuff as well [noparse]:D[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Not the fish.
sites.google.com/site/bitwinproject/
I guess I kinda new the prop couldn't do wifi, hopefully the prop2.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
What, you mean the prop 2 isn't going to run at 3ghz?
Well now,... that needs to be fixed. Where did I put my can of Liquid Nitrogen.
Option 1: One device is the master. It polls the other, and nobody else transmits unless asked. This is the simplest to code, and to recover from a lost message (the master just times out if it doesn't get an answer and asks again or goes to the next device). The big minus is that if the master fails, so does the whole network.
Option 2: Have a token which is passed from device to device, granting the privilege of next comms. Plus is that you don't have an indispensible master unit. Minus is that recovering from a lost message becomes much more tricky, as you must somehow regenerate the token while making sure you don't get multiples.
Option 3: CSMA/CD mentioned by kwinn. This allows any device to transmit at any time, but the network must detect that a collision occurred and then the devices must wait a random amount of time before retrying. Collision detect can be done by doing a checksum on the packet and requiring a reply to verify message receipt. (you won't have Ethernet's ability for the transmitter to detect a collision as it's occurring.) Tricky parts are arranging the truly random delays (it doesn't work if your devices are both sequencing through the same pseudo-RNG) and bandwidth saturation if you get too many devices trying to use the channel.