Reputation: 103
Background - What I would like to do is to be able to push buttons on a BT sensor and trigger some actions like tweet or play a particular sound etc. I have a TI CC2541 Sensortag that I would like to control with a python program.
Issue - I am unable to get Mac OS X bluetooth to recognize the BLE on TI Sensortag.
Attempts - I installed lightblue which recognizes the sensor. But I am not sure how that can help control the sensor programmatically. I heard about Bluez in my research, but I guess it is related to linux only systems. I have used Evothings and that can connect to the sensortag through my phone on the same network. I can make small changes to the javascript on evothings studio to capture events from the Sensortag and affect changes on the evothings app.
I am trying to get my Mac to recognize the BLE Sensortag after which I can control the device programmatically. Do I need to buy one of these pluggable BLE dongles to get this to work? OR am I attempting something wrong.
Please advise.
Upvotes: 2
Views: 1159
Reputation: 1745
Oh I see now, I can help you with that.
Here's your recipe to success:
If all the above checks out, and it should given the information you provided, then at hardware level you're golden.
At software level, there are many ways to connect and retrieve data. You can use XCODE and build a native OSX app or you can build a NodeJS app to retrieve data from the tag.
On this blog post you find all you need for the Node scenario. It is documented for the Raspberry Pi however, the code for running this elsewhere, including OSX, is exactly the same
The code is hosted here and I keep it up to date as I make more advancements. https://github.com/kywix/iamsblog/tree/master/SensorTag
Shortly:
btw on the same repo you will find python code as well. I blog regularly about the Sensor Tag.
I will make note of creating a post just for folks like you that seek this type of info, I have been there..
Upvotes: 1