Android Question BLE Connection Issues

Comalco

Member
Licensed User
Longtime User
Further to this old thread: https://www.b4x.com/android/forum/threads/ble-device-not-connecting.103141/#content
I have spent hours today reading through various posts here, and on the wider www, about this issue as I too have the problem many describe.
I have an ESP32 running some small Micropython code that repeatedly sends a simple 2 values from a transducer to a BLE device.
The B4A BLE example app scans, finds the ESP32 device, but won't Connect to it after its selected. After a timeout the Debug reports 'Disconnected'.
The Serial Terminal app on the phone connects without issue, as does nRF Connect. As soon as the phone connects using either of these two apps I can see the ESP32 sending the 2 values......
I think the issue is in the manager.Connect2(device.Mac, False) line in the private Sub scanTimeout_Tick.
The debug Log entry is written on the previous line, but nothing occurs from this line onwards........
Its out of my depth but I will have a look at Github (I think I read somewhere the BLE library was open source on there) as I am curious what manager.Connect2 does....
Would there be any other pointers on what I could try to resolve this issue please ?
 

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 0

wes58

Active Member
Licensed User
Longtime User
Further to this old thread: https://www.b4x.com/android/forum/threads/ble-device-not-connecting.103141/#content
I have spent hours today reading through various posts here, and on the wider www, about this issue as I too have the problem many describe.
I have an ESP32 running some small Micropython code that repeatedly sends a simple 2 values from a transducer to a BLE device.
The B4A BLE example app scans, finds the ESP32 device, but won't Connect to it after its selected. After a timeout the Debug reports 'Disconnected'.
The Serial Terminal app on the phone connects without issue, as does nRF Connect. As soon as the phone connects using either of these two apps I can see the ESP32 sending the 2 values......
I think the issue is in the manager.Connect2(device.Mac, False) line in the private Sub scanTimeout_Tick.
The debug Log entry is written on the previous line, but nothing occurs from this line onwards........
Its out of my depth but I will have a look at Github (I think I read somewhere the BLE library was open source on there) as I am curious what manager.Connect2 does....
Would there be any other pointers on what I could try to resolve this issue please ?
Have a look there: https://www.b4x.com/android/forum/threads/ble2-library-additional-functions.133296/
 
Upvote 0
Top