I'm working with the TI SensorTag in the Swift environment and am able to connect, but only the UUIDs for temperature, humidity and barometric pressure advertise as services, but not the magnetic, gyro and accel sensors. Are the examples of getting the sensor to advertise these services using Swift?
TI SensorTag Accelerometer service not advertising
1k views Asked by Thou Maker AtThere are 4 answers
Could it be you have the latest Sensortag (CC2650) but that you are using a library that is specific for the original Sensortag?
For a list of the CC2650 services, the GATT table can be found at the bottom of this page: http://www.ti.com/ww/en/wireless_connectivity/sensortag2015/tearDown.html
The Node Sensortag is also quite useful, it supports both and shows the differences: https://github.com/sandeepmistry/node-sensortag/tree/master/lib
I have had the same problem. What happened with me was that the battery was going flat and the first thing to stop working was the gyro-acc-mag. What was confusing was that the Lux, temperature and other sensors all worked fine.
I do my dev work now with the tag powered via USB. Alternatively you could replace your battery every now and then?
I recommend to use the IBM wearables SDK to connect to sensorTag, it it written in swift and has easy API for working with all the sensors.
Take a look: http://wearables.mybluemix.net/
Code: https://github.com/ibm-wearables-sdk-for-mobile/ibm-wearables-swift-sdk