Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,559 Views

i can't get services in ble lib(tinyB)

Jump to solution

connect is success. but getting services failed in the ble device. didn't searching services.

using this method -> bluetoothServices = device.getServices();

why happen this problem?


Accepted Solutions
Highlighted
Community Manager
14 Views

Hello cynicalk,

 

 

I have never used this library but I can see that it is using Java to run the example. How did you install Java and this library?

 

Also, have you tried to use gatttool? You can also retrieve the services from a BLE device by using gatttool. You can check this guide: http://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/ http://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/ to learn how to retrieve the services from a BLE device and you can check: https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx to see all BLE services by their code.

 

In case you are interested in using gatttool you can follow this guide: https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-... https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-... to install gatttool on your Edison.

 

 

Peter.

View solution in original post

0 Kudos
6 Replies
Highlighted
Community Manager
15 Views

Hello cynicalk,

 

 

I have never used this library but I can see that it is using Java to run the example. How did you install Java and this library?

 

Also, have you tried to use gatttool? You can also retrieve the services from a BLE device by using gatttool. You can check this guide: http://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/ http://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/ to learn how to retrieve the services from a BLE device and you can check: https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx to see all BLE services by their code.

 

In case you are interested in using gatttool you can follow this guide: https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-... https://software.intel.com/en-us/articles/using-the-generic-attribute-profile-gatt-in-bluetooth-low-... to install gatttool on your Edison.

 

 

Peter.

View solution in original post

0 Kudos
Highlighted
Novice
14 Views

yeah i try that guide. using gatttool. successfully.

T_T

0 Kudos
Highlighted
Community Manager
14 Views

Hi cynicalk,

I'm glad to hear that gatttool worked. Are you able to implement it in your project?

Peter.

0 Kudos
Highlighted
Novice
14 Views

using java? is it possible?.. so.. why make tinyB?

Why do you have your is tinyb? Are you that try to use?

 

isn't to control the device through tinyb? how to get GATT services in java. it is my question.

 

 

 

0 Kudos
Highlighted
Community Manager
14 Views

Sorry, I'm not sure I understand your last post. Are you asking me if it is possible to use the information you retrieve from gatttool on Java? If so, then, I believe you can, but since gatttool gives you raw data (just the services codes), then your best option is to get that data into a file and create a script that "translates" it into something you can understand. You can send the gatttool data to a file by using a system call (https://blog.art-of-coding.eu/executing-operating-system-commands-from-java/ https://blog.art-of-coding.eu/executing-operating-system-commands-from-java/) and you can read data from a file if you do something like what's explained in https://www.caveofprogramming.com/java/java-file-reading-and-writing-files-in-java.html https://www.caveofprogramming.com/java/java-file-reading-and-writing-files-in-java.html.

 

 

Peter
0 Kudos
Highlighted
Employee
14 Views

Hi, I'm the maintainer for TinyB. I added a troubleshooting guide for TinyB here: https://github.com/intel-iot-devkit/tinyb/blob/master/TROUBLESHOOTING.md tinyb/TROUBLESHOOTING.md at master · intel-iot-devkit/tinyb · GitHub . If you need additional help, I'd prefer you create issues through Github since I don't get notifications from the communities site.

0 Kudos