OS X Bluetooth programming

╄→尐↘猪︶ㄣ 提交于 2019-12-07 20:32:13

问题


I want to create OS X app to work with Lego Mindstorms NXT 2.0 via Bluetooth.

I tried to make it with Objective C and Python, but there are some problems with both.

About Objective C:

I only found this documentation. There is told about configuration with plist-file, but example of such plist file is not provided, only some data on figure. Where to get it? Maybe I'm doing something wrong? Also, there are some references to /Developer directory, which does not exist.

About Python:

I found nxt-python, but it does not work well with 10.7. I tried to install lightblue, doing everything with instructions for 10.6, it just stops when running setup.py Output:

running install
running build
running build_py
running install_lib
running install_egg_info
Removing /Library/Python/2.7/site-packages/lightblue-0.4-py2.7.egg-info
Writing /Library/Python/2.7/site-packages/lightblue-0.4-py2.7.egg-info

Same thing with PyBluez.

What could you recommend?


回答1:


The pyobjc-framework-CoreBluetooth package should allow you to interact with the macOS CoreBluetooth module through Python.

Another option would be to use an entirely platform independent Bluetooth LE stack, such as the one provided on the Bluegiga BLED112 dongle, and interact with it using the pygatt package.



来源:https://stackoverflow.com/questions/10956563/os-x-bluetooth-programming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!