Android-DFU-Library icon indicating copy to clipboard operation
Android-DFU-Library copied to clipboard

Android 14 GATT 133 1

Open MarioTheGreatest opened this issue 1 year ago • 7 comments

Where do you suspect the issue?

Issue related to Android version or specific device

Version

2.4.1 (Latest)

Describe the issue

image

On Android bellow 14 the DFU library uploads the firmware as expected, but on Android 14 for some reason it will make 3 attempts while stuck on onDeviceConnecting and then return GATT Error 133 1. I have tried disableMtuRequest() and setPacketsReceiptNotificationsValue(1) but it doesn't fix the issue.

Relevant log output

No response

MarioTheGreatest avatar Apr 05 '24 11:04 MarioTheGreatest

I am having similar issue on android 14, Samsung phone. After 3% it throws an error - GATT INVALID PDU.

sumitemizentech avatar Apr 05 '24 16:04 sumitemizentech

Same issue on the Samsung devices with OS version 14 Connection state change error: 133 newState: 0 An error occurred while connecting to the device: 133. Working fine with other Vendors.

SEAbdulbasit avatar Jul 15 '24 17:07 SEAbdulbasit

When i pair first and then try to update the firmware then it works fine.

SEAbdulbasit avatar Jul 24 '24 07:07 SEAbdulbasit

I have the same problem here. I need to apply for the dynamic permission ACCESS_FINE_LOCATION. After applying, it's done.

christian-zs avatar Aug 26 '24 08:08 christian-zs

Where do you suspect the issue?

Issue related to Android version or specific device

Version

2.4.1 (Latest)

Describe the issue

image

On Android bellow 14 the DFU library uploads the firmware as expected, but on Android 14 for some reason it will make 3 attempts while stuck on onDeviceConnecting and then return GATT Error 133 1. I have tried disableMtuRequest() and setPacketsReceiptNotificationsValue(1) but it doesn't fix the issue.

Relevant log output

No response I have the same problem here. I need to apply for the dynamic permission ACCESS_FINE_LOCATION. After applying, it's done.

christian-zs avatar Aug 26 '24 08:08 christian-zs

Seeing the same issue here, except my app has already been granted the ACCESS_FINE_LOCATION permission (and even ACCESS_BACKGROUND_LOCATION) and I'm still seeing the issue. Worth noting though is that I only see the issue when the screen is locked.

Update: I downloaded the source code for 1.12.0, which was the previous version my app was using before I updated my targetSdk to 34 and had to update this library. I made minimal modifications to the source code of 1.12.0 to target 34 and use ContextCompat to register recievers. Long story short, once I got it to compile and got the jar loaded into my app, this issue no longer occurs. So it's definitely a bug in the library itself, and definitely something that was implemented since 1.12.0.

roland-ryan-rm avatar Aug 26 '24 22:08 roland-ryan-rm

Hello, Last week we released version 2.6, which should fix scanning in background. Did you try it?

As it appears only in background, I suspect it's related to scanning without a ScanFilter (or actually, with an empty one). Recent Android versions began to check if the filter isn't empty. In that case the phone doesn't scan and in result cannot connect to the device advertising with address +1.

Since 2.6 the filters are no longer empty and you may customize them using: https://github.com/NordicSemiconductor/Android-DFU-Library/blob/4123bdd5f20c5f8a1a51cb61546b4fc132513dec/lib/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java#L1987-L1990

philips77 avatar Sep 18 '24 09:09 philips77