I've made app that allows me to connect to bluetooth le device and lists all services and characteristics. However the only recognized service is 'Device Information Service', there is also 'Unknown Service' but it doesn't seem to pass data that im looking for. I'm sure that device is working properly because official app that was attached to the device works fine. What could be the problem? Is it possible that information that im looking for are passed in unknown service and are somehow encrypted?
-
Are you trying to connect to any health device. ? – Naz141 Sep 06 '16 at 10:46
-
Yes, I'm trying to connect to thermometer. – Michał Witanowski Sep 06 '16 at 10:47
-
You can view the services with a generic app such as nRF Connect for Android or LightBlue for iOS. Of course it's possible that the information is in a vendor specific characteristic, then only their official app knows how to read the data. – Tim Sep 06 '16 at 10:55
-
Actually that's the idea : If you want your device to work with other apps than yours, you use normed characteristics. If you want the users to be able to see the data only with your app, you encapsulate the data in some private vendor specific services. It could be reverse engineered anyway, if the user knows what he's looking for. – Tim Sep 06 '16 at 10:58
-
I've installed nRF Connect, it shows the same services as my app that is 'Device Information Service' and 'Unknown Service' with UUID:cdeacb80- 5235- 43c07-8846-93a37ee6b86d. – Michał Witanowski Sep 06 '16 at 11:07
-
can you post your code which you are trying to connect and get the data from the LE device – Naz141 Sep 06 '16 at 11:19
-
Im using DeviceScanActivity, DeviceControlActivity and BluetoothLeServices form this project https://github.com/googlesamples/android-BluetoothLeGatt. – Michał Witanowski Sep 06 '16 at 11:38
-
Try looking at the characteristics in the service anyway and see if they match what you are after if it was the right service... – Ifor Sep 06 '16 at 15:49
1 Answers
Your app correctly discovers the services, the problem isn't there. The problem is that you expect the service to be a generic one but it isn't, it's a vendor specific service.
A vendor specific
service (characteristic) is easily recognizable : Its UUID is 128 bits long. Also it's not resolved by generic BLE apps such as nRF Connect for the simple reason that they are specific and not generic.
When a company sells a device that implements generic services, they know that it will work with multiple applications but they also know that these applications will also work for the other devices from their competitors. By example, you can buy a heartrate belt from several companies and use them with several fitness apps on your smartphone.
When a company sells a device that implements vendor specific services, they know that it will not work with another application than their own one and that not any competitor will be able to sell a device that also works with their application.
Two different strategies, many different goals.
Basically, the company that designed the device you are playing with did not want you to be able to use another app than their own app to access the data in the device. It's that simple.
Now you still can reverse engineer their service. Use a sniffer, compare the data transferred when using their app with the data actually displayed in the app and maybe you'll find some logic, and learn the hard way how they have hidden the data in their service. However they probably have some clause stating you shall not reverse engineer this or that.
You can see the generic services here, but you won't learn anything more than what I've said : BLE GATT Services

- 1,853
- 2
- 24
- 36
-
In the end i was able to get bluetooth communication protocol form the vendor. So problem solved, thanks for help. – Michał Witanowski Sep 09 '16 at 10:37