是否有任何实际的 Android 手机实现蓝牙 spp 配置文件

发布于 2024-10-15 16:21:02 字数 300 浏览 5 评论 0原文

有谁知道目前有一款 Android 手机实际上支持蓝牙 SPP 配置文件吗?我在网上花了几天时间试图找到一款,但没有看到任何声称支持 SPP 配置文件的手机。此外,我注意到各种各样的帖子,人们无法让他们的应用程序正常工作,因为他们使用的手机不支持 SPP 配置文件,或者它已在他们的手机上被禁用。我在这里错过了什么吗?在我致力于开发 Android 蓝牙应用程序之前,我想确保它确实可以完成。

我希望答案是我们通过蓝牙 API 实现 SPP 配置文件,因此我们可以在任何支持它的 Android 操作系统级别(即 2.0 或更高版本)上使用 RFCOMM。这是正确的吗?

Does anyone know of a current Android cell phone that actually supports the Bluetooth SPP Profile? I have spent days online trying to find one, and nowhere do I see any cell phones that say they support the SPP profile. Furthermore, I have noticed all kinds of postings where people cant get their applications to work correctly because the phone they are using does not support the SPP profile, or it has been disabled on their phone. Am I missing something here? Before I commit to developing my Bluetooth application for Android, I want to make sure it can actually be done.

I am hoping that the answer is that we implement the SPP profile via the Bluetooth API, and therefore we can use RFCOMM on any Android OS level that supports it, i.e., 2.0 or above. Is this correct?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

吃→可爱长大的 2024-10-22 16:21:02

SPP 是 RFCOMM,来自文档

最常见的蓝牙套接字类型是 RFCOMM,这是 Android API 支持的类型。 RFCOMM 是一种基于蓝牙的面向连接的流式传输。它也称为串行端口配置文件 (SPP)。

所以,是的,任何 API 级别 5 (2.0) 或更高版本的设备都将支持 BluetoothSocket,因此也支持 SPP。

SPP is RFCOMM, from the docs:

The most common type of Bluetooth socket is RFCOMM, which is the type supported by the Android APIs. RFCOMM is a connection-oriented, streaming transport over Bluetooth. It is also known as the Serial Port Profile (SPP).

So yes, any device at API level 5 (2.0) or above will support BluetoothSocket and therefore SPP.

药祭#氼 2024-10-22 16:21:02

@GAZ 这似乎不是真的。以运行 Android 2.3 的 Droid Incredible S 为例。现在安装一个名为蓝牙远程控制的应用程序。该应用程序显示了它找到的所有 BT 设备的列表,但明显没有找到那些仅宣传 SPP 的设备。我可以在 Nexus S 上使用同一个应用程序,它会找到 Incredible 错过的相同设备。我只能假设是运营商禁用了手机上的串行蓝牙 - 作为防止网络共享的一种方式。

自从我第一次发布这个答案以来,我发现了无法发现某些蓝牙设备的可能原因。看来,当主要设备类别为 BluetoothClass.Device.Major.MISC (0) 时,许多手机在发现过程中只是跳过此设备,尽管我无法想象为什么。如果有人对解决方法有想法,我很想听听。

@GAZ This does not appear to be true. Take the Droid Incredible S, for example, running Android 2.3. Now install an app called Bluetooth Remote Control. The app displays a list of all BT devices it finds but remarkably does not find those that advertise only SPP. I can use that same app on my Nexus S and it finds the same devices that the Incredible misses. I can only assume that it is the carrier that disabled serial Bluetooth on their phones - as a way of preventing tethering.

Since I first posted this answer I have discovered the probable cause of the failure to discover some Bluetooth devices. It appears that when the major device class is BluetoothClass.Device.Major.MISC (0), many phones simply skip this device during discovery, although I can't imagine why. If anyone has thoughts on a workaround, I would love to hear them.

蓦然回首 2024-10-22 16:21:02

事实证明,这个错误有一个解决方法(设备类别 0 被跳过)。在这里找到它:http://zornsoftware.talsit .info/blog/pairing-spp-bluetooth-devices-with-android-phones.html

Turns out that there is a workaround for this bug (device class 0 being skipped). Find it here: http://zornsoftware.talsit.info/blog/pairing-spp-bluetooth-devices-with-android-phones.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文