Hello,
I have tested the BLE 2 example (link below) for Android with 2 BLE device (RN4678 and Ebyte E104-BT40).
Location is enable, but when I try to connect, I receive "disconnect" result just few second after. This with android 7, android 8 and android 10.
When I try with the BLE scanner APP , it works fine.
Here the log unfilter to see the difference between B4A BLE example APP and BLE scanner APP :
Thanks for your help.
I have tested the BLE 2 example (link below) for Android with 2 BLE device (RN4678 and Ebyte E104-BT40).
Location is enable, but when I try to connect, I receive "disconnect" result just few second after. This with android 7, android 8 and android 10.
When I try with the BLE scanner APP , it works fine.
Here the log unfilter to see the difference between B4A BLE example APP and BLE scanner APP :
Thanks for your help.
unfilter code:
-------------------------B4A APP------------------------------------
connect() - device: D8:80:39:F1:20:33, auto: true
registerApp()
registerApp() - UUID=bf470bf7-13de-43ef-b36b-d152d6289488
registerClient() - UUID=bf470bf7-13de-43ef-b36b-d152d6289488
onClientRegistered() - UUID=bf470bf7-13de-43ef-b36b-d152d6289488, clientIf=10
onClientRegistered() - status=0 clientIf=10
clientConnect() - clientIf =10, address=D8:80:39:F1:20:33, isDirect=false, transport = 0
btif_get_address_type: Device [d8:80:39:f1:20:33] address type 0
btif_get_device_type: Device [d8:80:39:f1:20:33] type 3
Unsupported transport for background connection
bta_gattc_init_bk_conn unable to connect to remote bd_addr:d8:80:39:f1:20:33
onConnected() - clientIf=10, connId=65535, address=D8:80:39:F1:20:33
onClientConnectionState() - status=133 clientIf=10 device=D8:80:39:F1:20:33
close()
unregisterApp() - mClientIf=10
unregisterClient() - clientIf=10
Disconnected
-------------------------BLE Scanner APP------------------------------------
connect() - device: D8:80:39:F1:20:33, auto: false
registerApp()
registerApp() - UUID=570619e6-f8f3-4b15-99b8-9a31d53e2b42
registerClient() - UUID=570619e6-f8f3-4b15-99b8-9a31d53e2b42
onClientRegistered() - UUID=570619e6-f8f3-4b15-99b8-9a31d53e2b42, clientIf=11
onClientRegistered() - status=0 clientIf=11
clientConnect() - clientIf =11, address=D8:80:39:F1:20:33, isDirect=true, transport = 2
btif_get_address_type: Device [d8:80:39:f1:20:33] address type 0
btif_get_device_type: Device [d8:80:39:f1:20:33] type 3
.....
Connected
[B4X] BLE 2 - Bluetooth Low Energy
This library replaces the previous BLE library. It is simpler to use and it is more powerful. Its API is based on B4i iBLE library which makes it easy to reuse B4i code. See the iBLE tutorial: https://www.b4x.com/android/forum/threads/ble-bluetooth-low-energy-library.46099/#content Tips &...
www.b4x.com