Replies: 2 comments
-
Are you trying to communicate between Picos using BT? 1:1 or 1:many? The BT SPP profile is pretty limited and I doubt that BTStack will let you have 2 slave connections, or be both master and slave at the same time. We don't have a library for BT SPP master use, but it's doable. BLE might be more flexible since it's not really connection based, but it does have lower total BW (however 10KB seems within reason). There's also BT Mesh which they say is more for IoT industrial and commercial for sensors, lighting, etc. That's part of BTStack but no library here implements it. The examples would probably almost "just work" though...that's how I wrote the SerialBT and others! |
Beta Was this translation helpful? Give feedback.
-
Yes, it's 1:many. The server is connected to a wired CAN bus and acts as a gateway for transmitting messages to/from multiple clients. Clients were previously wired into the same bus but this allows them to be untethered. The bus is busy, maybe 1000 msgs/sec * 16 bytes * 8 clients. TCP-over-wifi generally works well but not in congested public places (when everyone has a phone in their pocket) and is demanding of batteries. The byte stream paradigm is very familiar to me, message-based architectures less so. I need to improve my conceptual understanding of BT and BLE. I'd love to dive deep into this but there are too many other projects in the queue ! |
Beta Was this translation helpful? Give feedback.
-
For server-with-multiple-concurrent-clients applications I generally use TCP sockets over wifi. I've been writing socket code for 30+ years and I can do it in my sleep. (The original Pico was limited by the memory available for TCP buffers but Pico 2 can support as many clients as I need).
I'd like to try using BT instead, as a learning opportunity but also to address the problem of wifi congestion at large venues, and maybe improve battery life.
The BTSerial example uses a PC-to-single-Pico model and it's not clear how to pair two or more Picos. Can a BT server support multiple concurrent clients ? BTSerial is preferred because it 'looks like' a socket byte stream but I'm open to other approaches.
Is BT even appropriate for multiple low-latency, bi-directional, high volume byte streams ? I need sub-5ms latency and throughput of at least 10K bytes/sec per client. I only need line-of-sight, max 100 ft.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions