An open API service indexing awesome lists of open source software.

https://github.com/ehsundar/sensortile

a simple intro to get data from ST sensortile (using BLE)
https://github.com/ehsundar/sensortile

Last synced: 5 months ago
JSON representation

a simple intro to get data from ST sensortile (using BLE)

Awesome Lists containing this project

README

          

sensortile


sensortile is a multi-sensor device, giving us many physical data such as acceleration, temprature, etc. you can find out more about sensortile on official website. there is also an example application (android/ios) for recieving and monitoring sensortile data. the android SDK and example app source code are available on github: here!



while trying to use sensortile to catch some physical data (on a platform that's not android) i found out there is no datasheet or GATT table for using sensortile BLE; however there is some standard rules. i will attach a sample python script (uses bluepy) so you will see the raw data.


here is the GATT table:


characteristics:


Feature
Handle
UUID


ProximityGesture::Motion Intensity
0x000d
00140000-0001-11e1-ac36-0002a5d5c51b


FeatureAcceleration::FeatureGyroscope::FeatureMagnetometer
0x0010
00e00000-0001-11e1-ac36-0002a5d5c51b


FeatureAccelerationEvent
0x0013
00000400-0001-11e1-ac36-0002a5d5c51b


FeatureMicLevel
0x0016
04000000-0001-11e1-ac36-0002a5d5c51b


FeatureMemsSensorFusionCompact
0x0019
00000100-0001-11e1-ac36-0002a5d5c51b


FeatureCompass
0x001c
00000040-0001-11e1-ac36-0002a5d5c51b


FeatureActivity
0x001f
00000010-0001-11e1-ac36-0002a5d5c51b


FeatureCarryPosition
0x0022
00000008-0001-11e1-ac36-0002a5d5c51b


FeatureMemsGesture
0x0025
00000002-0001-11e1-ac36-0002a5d5c51b


FeatureAudioADPCM
0x0028
08000000-0001-11e1-ac36-0002a5d5c51b


FeatureAudioADPCMSync
0x002b
40000000-0001-11e1-ac36-0002a5d5c51b

each characteristic contains 3 description. you must write value 0x0100 to first description of each char (this is a standard method). then sensortile will send you data continuously as notification. you could enable multiple notifications at the same time. notifications will arrive as characteristic value. so you can distinguish notifications.



  • note

  • for two first chars, data has following patern:
    2byte


  • note

  • audio formatting is ADPCM. you cannot find any library to dicode this format to PCM(WAV) (except a corrupt python lib!). so you have two ways: write decode yourself! or use sox library.




    //end