- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have developed an app for iOS and Android to use BLE.
If I use iOS app there is no problem, I get all the services and I can read and write all the characteristics.
The problems begin when I use the Android app because I can´t get all the services.
I tried to get the services with CySmart app and this problem also happen.
Any ideas why this happens?
Thanks,
Héctor
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a problem with the default generated UUID values. Please refer to the following KBA and change to a different UUID and it will work; PSoC 4 BLE Troubleshooting Guide – KBA220490
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Hector,
Please connect your phone via USB to your computer. Then run the app till the point of error. You will see the logs in the Logcat window of Android Studio. Share those logs so that we can have a better insight into what's going wrong.
Also, do let us know more about which Android phone you are using.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Dheeraj,
Thanks for your response.
The Android phone is a Huawei P9 Lite.
This is the logcat after i try to get the characteristics.
I achieve to get some of the services and the characteristics but not all of them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The error is occuring because the UUID is null. Please set a breakpoint at the line of code where you run getCharacteristic() and run debug. Check if you see the UUID parameter or not. Analyze the code to fix the errors accordingly.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The UUID I use is the one that I have set in the BLE module that I'm using, CY8C4247LQQ-BL483.
The problem is that the Android device doesn't get correctly two of the services I have created earlier in the BLE module and,when I try to get the characteristics of the service is when I get that the uuid is null.
One of these services with which i have problems is received by the device but without characteristics and the other one is not even received.
In the image above you can see 6 services, but there should be 7, and services 4 and 5 should have two characteristics, but the last one has none.
I use the same UUIDS in the app for iOS and there is no problem getting services and characteristics, I can use all of them but in Android there are 2 services that I can't.
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is different about the two services which are seeing problems in Android? Can you check the configurations again in Creator? Make sure you check if it works in CySmart app as well for every alteration you make.
Please share your PSoC Creator project if possible.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no difference. I have created both the same way.
I have used CySmart app with iOS and Android and it works in the same way as my app, with iOS no problem, but with Android two services, with their characteristics, don´t work.
I will try to share the code...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, please share your project if possible, it will be easier to debug.
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried using another phone?
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I have used a Samsung Galaxy A8.
With this phone the problems are the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This looks like a problem with the default generated UUID values. Please refer to the following KBA and change to a different UUID and it will work; PSoC 4 BLE Troubleshooting Guide – KBA220490
Regards,
Dheeraj