简体   繁体   English

iMac上的蓝牙SPP

[英]Bluetooth SPP on iMac

I'm am trying to get a Bluetooth module that implements the Serial Port Protocol to work with a recent iMac. 我正在尝试获取一个实现串行端口协议以与最新iMac一起使用的蓝牙模块。 What I would like is to pair the module, then open it as a serial port and read data from the device, something like "cat /dev/tty.HC-06-DevB". 我想要的是配对模块,然后将其作为串行端口打开并从设备读取数据,例如“ cat /dev/tty.HC-06-DevB”。

The problem I am having is that when I pair the module it shows as connected for about a minute and then reverts to a not connected state. 我遇到的问题是,当我将模块配对时,它显示为已连接大约一分钟,然后又恢复为未连接状态。 While it is in the connected state, I am never able to find the appropriate device to read under /dev. 当它处于连接状态时,我永远无法在/ dev下找到合适的设备进行读取。

The kicker is that I had this working perfectly on a 7 year old iMac, which I sold when I bought a new one a few months ago. 更重要的是,我可以在7岁的iMac上完美运行,几个月前我购买了新iMac时就将其出售。 It's the same Bluetooth module running on an Arduino. 这是在Arduino上运行的同一蓝牙模块。 The only thing that changed is the iMac. 唯一改变的是iMac。

Anyone have any thoughts on this? 有人对此有任何想法吗? It feels like the OS connects and then doesn't know what to do and disconnects 感觉像是操作系统已连接,然后不知道该怎么做并断开连接

Apple removed a lot of Bluetooth support in their more recent models. 苹果在其最新型号中删除了许多蓝牙支持。 My first MacBook Pro (early 2008 version) supported SyncML over Bluetooth so I could pair and sync my Motorola Razr address book with the Address app on the Mac. 我的第一个MacBook Pro(2008年初版本)通过蓝牙支持SyncML,因此我可以将Motorola Razr通讯簿与Mac上的Address应用配对并同步。

Around Snow Leopard or Lion, all that support was removed. 在雪豹或狮子周围,所有支持都被删除。 The hardware is still capable but the software supports much less than it used to. 硬件仍然可以使用,但是软件所支持的却比以前少得多。 Bluetooth for audio is OK, Bluetooth for non-Apple devices beyond audio is very unpredictable. 音频的蓝牙还可以,音频以外的非Apple设备的蓝牙非常难以预测。 So it could just be that Apple removed the device support you were inadvertently relying on. 因此,可能只是Apple删除了您无意依赖的设备支持。

I suggest you have a look at the Mac's console and see what logging output there is when the connection is being negotiated. 我建议您看看Mac的控制台,看看在协商连接时有什么日志输出。 The Console is a surprisingly useful aid to diagnosing connection issues (when you consider how closed Apple are trying to make everything). 控制台是诊断连接问题的令人惊讶的有用辅助工具(当您考虑Apple试图关闭所有组件时的关闭程度)。

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

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