Hi to everyone,
Last weeks I've been working on the connection between the bcm20737 and my custom Android app.
For my application I don't need bonding neither passkey or anything which I thought that would make the things easier (this will be relevant later), during my way I discovered what it is to work with BLE + Android, that with some mobile phones everything goes super smooth and with others, usually older mobiles with older Android OS, things turns into a bit of a nightmare, with the majority of them trying some reconnections on the Android side I reach to good connections with the device and good user interactions (Still the user interaction is not as good as with the newer mobiles, any advice in this field will be also really appreciate), the problem came with one mobile, more especificall an old Samsung with Android 5.1 Lollipop, with this mobile even with reconnections connection is taking a lot of minutes.
This mobile is always trying to connect the gatt and almost never calls the service discovery, while in the device side it says that is perfectly connected, eventually all the times that reaches the service discovery function it works flawlessly.
But the problem is not this one, the problem comes now. Tired of trying stuff in the Android side I decided to try example projects of the WICED IDE and see how the mobile and the device behave. Trying the hello_sensor project I saw that the discovery of services worked flawlessly in the mobile, and after studying the differences I reach the conclusion that the missing point was this specific line.
With this line the service discovery on the mobile works like a charm, it is incredible.
So, where is the problem? The problem is that with this line the calls from the android app to disconnect the device doesn't work and even if I close the app it stays connected for a couple of minutes, at least on the device side (So it doesn't advertise anymore), also, I don't require any securityrequest in my application cause I don't want to bond the device with the mobile, cause this can cause issues on the android side, and to be totally honest I don't really know what is what this line does.
So if anyone could shed some light in this matter for me I will really appreciate it. Any advise, info about lesmp methods, anything.
Thank you so much and sorry for the long post.