-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect Android BLE sample app #792
Comments
Yup, got one idea but I would like to first ask:
|
I have used three phones 1. Xiaomi POCO F1 - Android 10 I was thinking there might be some issue with the dependency version or something but not sure as the same app is working with one of the iOS peripheral app but not working with the web app written in python using raspberry pi(acting as peripheral). But this python app also working with others except this one android sample app where I got this logs |
Perhaps the peripheral is badly written? Have you tried to debug? |
Yes, I checked. I was getting no logs or errors in peripheral side also the peripheral app is working with all other applications so this makes me think that might be some issue in this library or somewhere I am doing wrong in implementing this library. Not sure at all, got stuck in this since 3 days |
The error status is provided by the OS. That is most probably because the peripheral is not up to BLE spec. |
Ok, so if that is the case. What should be our approach? What are the alternative modes for setting notifications? Could you please guide me on this |
Also sometimes If I am not getting logs, it is going to connecting state and quickly disconnected where I am getting connection timeout popup |
You may verify if your fake peripheral is correct in terms of BLE specification or you may try different things (like the modes) and see what will stick
RxBleConnection#setupNotification(UUID, NotificationSetupMode) – Javadocs should give you enough background
I am already doing that – I will just not dive into how the Raspberry Pi peripheral is written as this is typically a rabbit hole. If several implementations of Android BLE stack give you status 253 then it is most probably problem with the peripheral's implementation |
Hey, Thank you for your suggestion. I have analysed both side peripheral and android central app and found there was issue in central android app. It was failing for the notify characteristics while setting notifications. Now two things are happening here let me explain you. There are two peripheral app:
Central app is android sample app. Earlier it was "setupIndication" for the notify characteristics and it was working fine with iOS peripheral app but not with Web peripheral app, but as I changed this to "setupNotification" it started working with web peripheral app(written in python using raspberry pi) and now getting same error in iOS peripheral app which I was getting for web app earlier when it was "setupIndication". So, just wanted to check with you is this some kind of limitation or is there any other way also to fix this which can be work with both peripherals. Thanks in advance..!! |
The characteristic you want to have notifications/indications from needs to support them. Check its properties. If you will set debug logs on the RxAndroidBle you would get a list of characteristics with their properties. I bet that on connecting to iOS you would get a different result than when connecting to RPi. |
I checked but nothing works for me. Updated my previous comment to make it more understandable. Please check and let me know if you found anything. |
I'm absent till Monday. I'll prepare a Wiki article on how to debug such cases |
Please set DEBUG log level on the client and paste connection logs for both RPi and iOS – there should be enough info there to diagnose the problem |
Here are the logs when I am trying to connect
Any idea?
The text was updated successfully, but these errors were encountered: