简体   繁体   中英

How to create multiple bluetooth socket connection between Android device and PC?

UUID u = UUID.fromString(MY_UUID);
BluetoothSocket btsoc = device.createRfcommSocketToServiceRecord(u);
btsoc.connect();

This will create the bluetooth connection with PC. Can I create another socket connection with different UUID? In normal socket, we could distinguish it with port number on one IP address.

Yes, you can create many connections using different UUIDs. You can check this question ( Multiple bluetooth connection ) for further details.

;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM