问题
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