Android Question B4A App runs fine with Android 5 will not run with Samsung phone running Android 10

fredeady

Member
Licensed User
Longtime User
I'm missing something.. So, I decided to reach out.. I have a B4A/BLE app that runs like a fine sewing machine on a cheap WalMart LG phone running Android 5.1.1.
Try to run the very same app on a Samsung S10 running Android 10 and it refuses to connect via BLE. I've checked all of the usual suspects (non-Google Play apps can be installed, BLE activated, B4A Manifest SDK versions, Nordic forum, etc.). I've also searched this forum for clues.

The BLE target is a Nordic nRF52832. I'm running the latest spin of B4A. I am replacing a previous non-B4A Android app that did not run on the Samsung S10 correctly (same issue as I am having).
Are there any B4A Samsung S10 "tricks" that I am not using?

Thanks in advance for any direction or support anyone can give.
 

fredeady

Member
Licensed User
Longtime User
Update.. Found a reason why it didn't work.. The B4A app was just fine.
The problem was that the Location permission was not activated for the B4A app..
Once I gave the B4A app permission to use Location when the app was in use, it connects every time.

Samsung A11 and S10: Settings -> Apps -> BarkBlaster(or your B4A app) -> App Permissions -> Allow Location
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Update.. Found a reason why it didn't work.. The B4A app was just fine.
The problem was that the Location permission was not activated for the B4A app..
Once I gave the B4A app permission to use Location when the app was in use, it connects every time.

Samsung A11 and S10: Settings -> Apps -> BarkBlaster(or your B4A app) -> App Permissions -> Allow Location
niiiiceeeee

 
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
Unfortunately, always the same result, Location permission was already enabled in my APP and always "Disconnect" message.

I have compared the log between B4A APP and BLE Scanner APP, and I can see that the UUID is not the same, maybe it is the reason?

Thanks


Log B4A vs BLE Scanner APP:
-------------------------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
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Unfortunately, always the same result, Location permission was already enabled in my APP and always "Disconnect" message.

I have compared the log between B4A APP and BLE Scanner APP, and I can see that the UUID is not the same, maybe it is the reason?

Thanks


Log B4A vs BLE Scanner APP:
-------------------------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
is not better ask a new question for your error?

wht do you get when running this example:

Edit: use nRF connect App to make sure you are getting the right information
 
Last edited:
Upvote 0

Arnaud

Active Member
Licensed User
Longtime User
@f0raster0 , thanks for your help.

I have exactly the same error with this APP BLE example :


I follow your advice and post a new thread.

Thanks
 
Upvote 0
Top