简体   繁体   English

关于Android上的蓝牙的问题

[英]Question about bluetooth on Android

Hi I just read your post Bluetooth RFCOMM / SDP connection to a RS232 adapter in android and I think you probably can help me figure out my little problem. 嗨,我刚刚阅读了您的android系统中RS232适配器的Bluetooth RFCOMM / SDP连接 ,我想您可能可以帮助我弄清楚我的小问题。

I have this BT module connected to a MCU via serial port UART. 我已将此BT模块通过串行端口UART连接到MCU。 Im trying to connect to the bluetooth via my android phone. 我正在尝试通过我的Android手机连接到蓝牙。 I managed to use my app and scan BT devices. 我设法使用我的应用程序并扫描了BT设备。 The scanner (based on BTchat) gives me the MAC. 扫描仪(基于BTchat)为我提供了MAC。 How can I know my device UUID ? 我怎么知道我的设备UUID? It is SPP device also. 它也是SPP设备。

Thank you 谢谢

The device you are trying to connect to doesn't have a UUID from what I understand -- it is just the name and the MAC address. 据我了解,您尝试连接的设备没有UUID,而只是名称和MAC地址。 The UUID is used to uniquely identify the software service itself I believe. 我相信UUID用于唯一标识软件服务本身。

The generic UUID for SPP is: SPP的通用UUID为:

private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");

Let me know if you are able to connect, because I am still having issues. 让我知道您是否可以连接,因为我仍然遇到问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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