Android Question How to rediscover services with BLE2 library

Augusto

Member
Licensed User
Longtime User
Hi to everybody,

I'm developing an android application that communicate with my own hardware board. I'm using the latest version of B4A and BLE2 library.

The app have to connect to the board, which is configured with its GATT. Then it sends a reboot command to the board, which restarts with another name and another GATT. Here is the problem: with samsung devices all works fine, but with other devices (tried with nexus and LG) I can't see the new GATT, but only the old one.

As hardware requirement, I can't disconnect and reconnect to rediscover the services.

Unfortunately, BLE2 library hasn't a function to rediscover services and characteristics.

Do you have any suggestion which can solve my problem?

Thanks
 

Augusto

Member
Licensed User
Longtime User
Hi Erel,

yes, I tried to scan again, with both method scan and scan2, looking for the specific service I need and a generic scan. But without success.

Tried also to disable and enable bluetooth, but it closes the connection to the remote hardware, so it is useless due to the hardware requirement.

Using inline Java to perform a service discovery could be an option? If yes, could you help me with the code?
 
Upvote 0
Top