Open guirespi opened 3 months ago
That is strange. I just did a test and ran the 'peripheral' example, and then connected with my iPhone. But I didn't get any pairing request....
Strange indeed haha. Just borrow an IPhone and no pairing request... I guess its an Android problem only now.
Hello! I think I had a similar problem with my Samsung S21. I wasn’t able to pair my phone: after confirming the pairing request (on my phone), the phone was immediately disconnected.
I modified the example by adding PIN authentication (copying the necessary code from the README file), and now it works. I’m able to interact with the example application.
@marcobergamin-videam Hi! Thanks for the suggestion. I'll try as soon i get back to that project.
Hi! First I want to thank you for this porject. I was trying to implement myself the interfaces to build a GATT application and then one post in stackoverflow mentioned your project and I was so relief.
It's not an issue at all, its more a question about how bluez works internally. I compiled the peripheral example to test the application connecting an Android device to the server. I noticed that always a pair request show up and after accept it, the central disconnects. I used wireshark as sniffer to see the packets between my computer and the android device and I notice the localhost asks for a pairing request.
I made some research and I found that linux tries to read the battery characteristic on IOs device and for this operation it is needed the pairing process. I though that maybe in Android devices the same problem exists, so I run bluez without the battery plugin, but the problem is still there.
So, I want to ask you if you ever faced a problem like this and if there is something I am missing in the GATT application or bluez configuration to avoid this pairing. I also noticed that the local host is trying to read some generic characteristics but I don't think that would be the problem. I appreciate if you share with me some knowledge or hints about why is this pairing requested. By the way, I'm using ubuntu.
Thanks again for this project and for taking the time to read this issue!.