Peer to Peer communication #116
Replies: 2 comments 2 replies
-
Using GATT will work. However, you will need to encode your chat protocol in GATT write/notify operations. Another possibility is to use L2CAP sockets. They are the equivalent of TCP connections in the Bluetooth world and will allow you to directly send and receive data between devices. You will also need to broadcast advertisements, so that both devices can find each other. |
Beta Was this translation helpful? Give feedback.
-
Is there any reason, why this doesn't work? I am kinda at my wits end. This is running on two devices, but when i send stuff from one device it doesn't get to the other device it seems. I have also tried this with GATT, but I'd rather do it with L2CAP because of the close resemblance to TCP. @surban |
Beta Was this translation helpful? Give feedback.
-
I am trying to develop a sort of chat for two BLE devices, where each device should be able to send and receive data to the other. What is the best way to go about this? Do I use GATT and have services running on both devices, so I can send data between them using clients, or is there a better way. Basically I'd like to know the best way to have two or more devices, that act as central+peripheral, connected to one another.
Please help me with this. Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions