-
Notifications
You must be signed in to change notification settings - Fork 3
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
Pairing/Bonding , receiving data from central, latency #1
Comments
I added more example code to show how you can deal with incoming writes....have a look at the CurrentTimeServiceHandler |
I have the same issue when trying to implement HID over GATT using a patched version of this repo. It only works after you first pair. If ever it disconnects it won't come back online, you need to delete the devices on both Android and Windows 10 for it to work again. I tried a bunch of stuff to fix it like calling Had a quick look in blessed and it seems there is some logic to do a scan to get auto connect to work, so I'm considering using it. @weliem Any tips to help me implement HID over GATT would be welcome. For instance, which tools do you use on Android and Windows to inspect Bluetooth devices and comms. |
This repo contains an example app that makes your phone advertise as a peripheral with a HeartRate Service and CurrentTime service. It does not require bonding at all, so I guess it is Windows that is trying to bond. There is also no issue with the connection being dropped when using iOS or Android. You can check using the app 'nRF Connect'. That allows you to connect and see the services the peripheral provides. I have no experience with HID over GATT so can't help you there. |
Thanks for pointing me to nRF Connect, turns out they also have a BLE library that seems really popular. I guess I'll try my luck with it. |
If I run the example on Android 12 or above, the peripheral device doesn't show up on my laptop (blueman-manager). |
There seem to be issues with reconnecting in Android 12+. |
That one is scary. But your issue is with Android 12 when this one is from Android 13. |
It's pretty much the same on 12L and 13 ( I am running lineageos 19.1 and 20.1. |
I think I have that same issue with my HONOR Magic V2 and my eBike the only way I can reconnect is by redoing the pairing. |
Hello,
I have used this example to create a service that acts as a BLE MIDI peripheral on my phone. The issue is everytime I want to use it I need to pair the device again. I am running Win 10 and I have to remove my peripheral from the devices list and add it again. Then I need to re-enter the pin on the phone. If I disconnect, I have to repeat the process. On the win 10 setting (known) devices list it is shown as paired but not connected. I don't know if this issue is because of Win 10 or because I am missing something in the implemaentation of my service. Is there a way to tell the peripheral to (auto-)connect to the central (Win10) (and invoke Bonding from the peripheral)?
Another question is about recieving data from BLE Midi device on the peripheral device. I started from the HeartRateService example and changed the UUIDs to MIDI service and got it working but I haven't implemented recieving Midi data from the Central. Where do i get the MIDI characteristics when sending from the central to the peripheral? I had a look at BaseService.java, but as I understand the methods " onCharacteristicRead" and " onCharacteristicRead" are callbacks invoked when the peripheral device sends or reads data,right? But where do i get the Midi Message sent from the Central Device to the peripheral?
My last question is about the connection interval. I get a lot of Jitter. In BluetoothServer.java I changed .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_BALANCED) , to LOW_LATENCY.
But I think it might have something to do with the connection interval. Is there a way I can set the connection interval from the peripheral device?
I would be glad if you could help me, thanks for this library and the examples, I tried some others before but Blessed was the only one where i got it to work!
The text was updated successfully, but these errors were encountered: