I want to connect 3 devices via Bluetooth.
As for example I use BluetoothChat. So How I understand I should use different UUID for this devices. I have been trying to connect via such UUID=766c82f0-e1b4-11df-85ca-0800200c9a66, which I 've get it from Web UUID generator. But it doesn't work at all.
I have succesfully connected (to 1 device) if I used UUID=00001101-0000-1000-8000-00805F9B34FB
Where can I get UUID?
Imagine, that u have a one or more services. Each service have its own UUID. UUID=00001101-0000-1000-8000-00805F9B34FB is special one for SPP. Some devices (for example, Bluetooth serial board) will not work if u not set SPP UUID. But for peer-to-peer connection between Android devices such as smartphones u may use your own generated UUID. Devices must set same UUID to found each other and connect. UUID format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx where x=[0,...,9]|[A,...,F]. Good idea is to set xxxxxxxx-xxxx-xxxx-xxxx- to Your generated unique id. Second part xxxxxxxxxxxx may be set to Your server MAC address without ":". On client side u may construct UUID from known generated unique id (embedded to Your app) and server MAC address without ":". You can get server MAC address during Bluetooth device discovery.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With