I am trying to read data from TI SensorTag from a bluetooth enabled linux PC using C programming. But I didn't get any programming API of bluez so that I can discover BLE profile and GATT profile to get sensor reading. There is no documentation I found. Can anyone please help me out?
Asked
Active
Viewed 2,512 times
0
-
1The best way to understand is to download the bluez source code and pick apart the `gatttool`. It's written in C. – Tim Tisdall Apr 14 '15 at 20:10
-
1I am trying but at least there should be a documentation for that. From source code it is very tough and time consuming. Also hell lot of dependencies are there – ninja.stop Apr 15 '15 at 07:11
-
Yes! I know! But it is what it is. All the documentation is around using the DBUS interface which doesn't handle unique attributes such as the accelerometer on the SensorTag. The gatttool has a function for each argument you can pass to it, so you just have to find the function doing the thing you want and figure that out. – Tim Tisdall Apr 15 '15 at 13:46
-
I am having another problem with yocto. the glib is not working, rather say bluez not recognizing it although it is installed. hence I am unable to do a single code even if I try to understand bluez source codes – ninja.stop Apr 17 '15 at 05:50
-
1well, that's a completely different question... one I wouldn't be able to help you with. – Tim Tisdall Apr 17 '15 at 13:42
1 Answers
0
I am caught by this problem for a long time.It's hard for me to read bluez's code. Today I found a python library implement some gatt function simply which only need you to give simple parametres unlike bluez(it needs some parametres which are hard to understand).there's a src in it where you maybe you can read to understand the .cpp to programm you .c hope useful~

shuo Han
- 79
- 6