Hi All,
A newbie question.
I have a requirement where there will be multiple slave devices (up to 48 slave devices per master) sending data back to a master device on a regular basis. The transmission medium is Bluetooth over virtual serial ports. Each slave device will send around 30 bytes of data per transmission. i was originally hoping to get around all 48 slaves in around 1 minute (ideally).
The set up I have at the moment consists of 6 slave devices and all are set to listen for the master which is requesting data from each slave. The master has 6 serial objects and 6 AStream objects set up so each slave has its own “channel” of communication. Each slave’s code is in a service that will wake up at a period of time, wait for a request from the master, send the data and go to sleep for a while to conserve battery. All serial and AStream objects on the master are re-dimmed when needed.
All is working reasonably well and has a repeatability of successful connections of around 90%. The problem I’m finding is that the master has to connect to each device in a sequential fashion, therefore slowing the refresh rate to get around all slaves. On average it takes around 8 to 10 seconds to successfully address each slave. If I try to request the data too quickly then I get serial errors from the master side.
Would it be better if the master was the listener? I have read a few posts here using network sockets where it looks like the master is the listener and things can be done in a more “parallel” fashion?
Any thoughts on this would be appreciated.
Thanks
Ray
A newbie question.
I have a requirement where there will be multiple slave devices (up to 48 slave devices per master) sending data back to a master device on a regular basis. The transmission medium is Bluetooth over virtual serial ports. Each slave device will send around 30 bytes of data per transmission. i was originally hoping to get around all 48 slaves in around 1 minute (ideally).
The set up I have at the moment consists of 6 slave devices and all are set to listen for the master which is requesting data from each slave. The master has 6 serial objects and 6 AStream objects set up so each slave has its own “channel” of communication. Each slave’s code is in a service that will wake up at a period of time, wait for a request from the master, send the data and go to sleep for a while to conserve battery. All serial and AStream objects on the master are re-dimmed when needed.
All is working reasonably well and has a repeatability of successful connections of around 90%. The problem I’m finding is that the master has to connect to each device in a sequential fashion, therefore slowing the refresh rate to get around all slaves. On average it takes around 8 to 10 seconds to successfully address each slave. If I try to request the data too quickly then I get serial errors from the master side.
Would it be better if the master was the listener? I have read a few posts here using network sockets where it looks like the master is the listener and things can be done in a more “parallel” fashion?
Any thoughts on this would be appreciated.
Thanks
Ray