Android bluetooth

If I wanted to connect to another device via bluetooth, how would I do it?

Nothing I did seems to work. The phone I'm trying to connect to is not an android and has Bluetooth and is detected.

+3
source share
3 answers

The Bluetooth API in this case is very bad ... let's look at java-doc:

Hint: if you are connecting to the Bluetooth serial board then try using the famous SPP UUID 00001101-0000-1000-8000-00805F9B34FB. However, if you are connecting to an Android peer, please have your own unique UUID.

from: link text

Accordingly, your colleague should be visible at.

+5

, , Bluetooth, , Bluetooth, , , ..

0

Bluetooth . 1, 2, , , .

/, . , UUID, SDP- .

Instead of connecting with brute force using BT_ADDR, you essentially initiate the connection through a graceful service discovery, and then the connection follows after determining the base UUID. This of course assumes that you would have done the pairing process at an early stage or that your lower-level stitch would also include the pairing process.

0
source

Source: https://habr.com/ru/post/1768874/


All Articles