- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello community!
I am using a Psoc 63 CYBLE-416045 processor and I need to be able to connect by BLE as Master to multiple Slaves.
Both the master and slaves are the same processor. I need to be able to send commands to as much of them as posible at the same time. The objective is to minimize the time needed for disconnecting from one device and reconnecting to another, i've seen that once the device is connected to the master the communication speed es much higher.
Is this possible? is there any code example i could refer to?
Thank you in advance for any information related to this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tomi,
Can I suggest something? As long as the data you need to send to ALL slaves is the same and not too long (<31 bytes), you can just advertise it with the Master in Beacon mode. It is in effect one-way from the Master to all listening slaves. It's simple. You just create the Advertisement packet you want and schedule the broadcasting intervals.
Pro: You don't get (or expect) a response from any of the slaves.
Con: You don't get (or expect) a response from any of the slaves.
If you need to to have confirmation from the slaves that they received the message, there is a way.
Once you broadcast, you can go into listening (Scanning mode) to hear advertisement packets from your slaves that are responding. Each slave would have a different BDADDR to identify which slave is responding. You can then have an internal list to 'check off' which ones responded.
I have example code of two projects: Beacon and Scanner. One will advertise and the other listen. This may be a good starting point for you.
PSoC6-BLE-Beacon-and-Scanner-Creator-projects
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
tomi,
Can I suggest something? As long as the data you need to send to ALL slaves is the same and not too long (<31 bytes), you can just advertise it with the Master in Beacon mode. It is in effect one-way from the Master to all listening slaves. It's simple. You just create the Advertisement packet you want and schedule the broadcasting intervals.
Pro: You don't get (or expect) a response from any of the slaves.
Con: You don't get (or expect) a response from any of the slaves.
If you need to to have confirmation from the slaves that they received the message, there is a way.
Once you broadcast, you can go into listening (Scanning mode) to hear advertisement packets from your slaves that are responding. Each slave would have a different BDADDR to identify which slave is responding. You can then have an internal list to 'check off' which ones responded.
I have example code of two projects: Beacon and Scanner. One will advertise and the other listen. This may be a good starting point for you.
PSoC6-BLE-Beacon-and-Scanner-Creator-projects
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
len,
That seems like a very good idea! wil be trying that thank you very much
Tomi