NordicSemiconductor / Android-DFU-Library

Device Firmware Update library and Android app
http://www.nordicsemi.com/dfu
BSD 3-Clause "New" or "Revised" License
773 stars 274 forks source link

dfu update fail 133 error(Individual mobile phones) #375

Open yinxiaojun opened 1 year ago

yinxiaojun commented 1 year ago

DFU Bootloader version (please complete the following information):

Device information (please complete the following information):

Your question

A clear and concise description of what the bug is.

Logs

Add any other context or logs describing the problem here.

P    [2023-01-10 23:28:48.992-0300] [NodicDFUManager] dfuConfig is {"PRN":0,"deviceId":"390","filePath":"/data/user/0/com.watch.life/files/Veryfit/ota/390/14.zip","isNeedAuth":false,"isNeedReOpenBluetoothSwitchIfFailed":true,"macAddress":"D8:58:E7:2E:A3:DA","maxRetryTime":0,"otaWorkMode":0,"platform":-1}
P    [2023-01-10 23:28:48.995-0300] [NodicDFUManager] to enter dfu mode
P    [2023-01-10 23:28:48.996-0300] [EnterDFUModeTask] start...
P    [2023-01-10 23:28:49.227-0300] [EnterDFUModeTask] enter dfu mode success!
P    [2023-01-10 23:28:49.227-0300] [EnterDFUModeTask] finished!
P    [2023-01-10 23:28:50.420-0300] [NodicDFUManager] to scan target dfu Device.
P    [2023-01-10 23:28:50.421-0300] [ScanTargetDFUDeviceTask] start
P    [2023-01-10 23:28:50.427-0300] [ScanTargetDFUDeviceTask] startScanDevices()
P    [2023-01-10 23:28:50.637-0300] [ScanTargetDFUDeviceTask] -------onLeScan :D8:58:E7:2E:A3:DA
P    [2023-01-10 23:28:50.650-0300] [ScanTargetDFUDeviceTask] has find target device, is not in dfu mode
P    [2023-01-10 23:28:50.657-0300] [ScanTargetDFUDeviceTask] task finished.
P    [2023-01-10 23:28:50.665-0300] [NodicDFUManager] (hasFindDeviceAndToConnectDevice) to connect Device
P    [2023-01-10 23:28:55.716-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:28:55.717-0300] [NodicDFUManager] upgrade...findDecive:false
P    [2023-01-10 23:28:55.724-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:28:56.285-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:28:56.286-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:29:05.235-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:29:05.244-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:29:05.251-0300] [NodicDFUManager] wait for restart ...1
P    [2023-01-10 23:29:20.255-0300] [NodicDFUManager] restart, times is 1
P    [2023-01-10 23:29:20.257-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:29:20.257-0300] [NodicDFUManager] upgrade...findDecive:false
P    [2023-01-10 23:29:20.269-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:29:21.848-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:29:21.848-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:29:30.283-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnecting
P    [2023-01-10 23:29:30.888-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:29:30.889-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:29:30.898-0300] [NodicDFUManager] wait for restart ...2
P    [2023-01-10 23:29:45.903-0300] [NodicDFUManager] restart, times is 2
P    [2023-01-10 23:29:45.905-0300] [NodicDFUManager] to scan target dfu Device.
P    [2023-01-10 23:29:45.905-0300] [ScanTargetDFUDeviceTask] start
P    [2023-01-10 23:29:45.909-0300] [ScanTargetDFUDeviceTask] startScanDevices()
P    [2023-01-10 23:29:46.143-0300] [ScanTargetDFUDeviceTask] -------onLeScan :D8:58:E7:2E:A3:DA
P    [2023-01-10 23:29:46.144-0300] [ScanTargetDFUDeviceTask] has find target device, is in dfu mode:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:29:46.144-0300] [ScanTargetDFUDeviceTask] task finished.
P    [2023-01-10 23:29:46.151-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:29:46.152-0300] [NodicDFUManager] upgrade...findDecive:true
P    [2023-01-10 23:29:46.154-0300] [NodicDFUManager] removeBondState D8:58:E7:2E:A3:DA
P    [2023-01-10 23:29:46.164-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:29:47.973-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:29:47.974-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:29:56.943-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:29:56.948-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:29:56.957-0300] [NodicDFUManager] wait for restart ...3
P    [2023-01-10 23:30:11.962-0300] [NodicDFUManager] restart, times is 3
P    [2023-01-10 23:30:11.964-0300] [NodicDFUManager] findDecive trueupdatemac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:11.965-0300] [NodicDFUManager] removeBondState D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:19.484-0300] [NodicDFUManager] to scan target dfu Device.
P    [2023-01-10 23:30:19.485-0300] [ScanTargetDFUDeviceTask] start
P    [2023-01-10 23:30:19.528-0300] [ScanTargetDFUDeviceTask] startScanDevices()
P    [2023-01-10 23:30:19.702-0300] [ScanTargetDFUDeviceTask] -------onLeScan :D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:19.704-0300] [ScanTargetDFUDeviceTask] has find target device, is in dfu mode:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:19.704-0300] [ScanTargetDFUDeviceTask] task finished.
P    [2023-01-10 23:30:19.719-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:19.719-0300] [NodicDFUManager] upgrade...findDecive:true
P    [2023-01-10 23:30:19.724-0300] [NodicDFUManager] removeBondState D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:19.755-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:30:22.180-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:30:22.182-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:30:30.255-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:30:30.257-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:30:30.262-0300] [NodicDFUManager] wait for restart ...4
P    [2023-01-10 23:30:45.268-0300] [NodicDFUManager] restart, times is 4
P    [2023-01-10 23:30:45.269-0300] [NodicDFUManager] to scan target dfu Device.
P    [2023-01-10 23:30:45.269-0300] [ScanTargetDFUDeviceTask] start
P    [2023-01-10 23:30:45.274-0300] [ScanTargetDFUDeviceTask] startScanDevices()
P    [2023-01-10 23:30:45.443-0300] [ScanTargetDFUDeviceTask] -------onLeScan :D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:45.445-0300] [ScanTargetDFUDeviceTask] has find target device, is in dfu mode:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:45.447-0300] [ScanTargetDFUDeviceTask] task finished.
P    [2023-01-10 23:30:45.456-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:45.458-0300] [NodicDFUManager] upgrade...findDecive:true
P    [2023-01-10 23:30:45.459-0300] [NodicDFUManager] removeBondState D8:58:E7:2E:A3:DA
P    [2023-01-10 23:30:45.468-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:30:47.508-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:30:47.509-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:30:56.474-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:30:56.475-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:30:56.479-0300] [NodicDFUManager] wait for restart ...5
P    [2023-01-10 23:31:11.485-0300] [NodicDFUManager] restart, times is 5
P    [2023-01-10 23:31:11.486-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:31:11.487-0300] [NodicDFUManager] upgrade...findDecive:true
P    [2023-01-10 23:31:11.488-0300] [NodicDFUManager] removeBondState D8:58:E7:2E:A3:DA
P    [2023-01-10 23:31:11.498-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:31:13.277-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:31:13.279-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:31:22.271-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:31:22.272-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:31:22.278-0300] [NodicDFUManager] wait for restart ...6
P    [2023-01-10 23:31:37.284-0300] [NodicDFUManager] restart, times is 6
P    [2023-01-10 23:31:37.285-0300] [NodicDFUManager] to scan target dfu Device.
P    [2023-01-10 23:31:37.286-0300] [ScanTargetDFUDeviceTask] start
P    [2023-01-10 23:31:37.290-0300] [ScanTargetDFUDeviceTask] startScanDevices()
P    [2023-01-10 23:31:37.431-0300] [ScanTargetDFUDeviceTask] -------onLeScan :D8:58:E7:2E:A3:DA
P    [2023-01-10 23:31:37.432-0300] [ScanTargetDFUDeviceTask] has find target device, is in dfu mode:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:31:37.433-0300] [ScanTargetDFUDeviceTask] task finished.
P    [2023-01-10 23:31:37.439-0300] [NodicDFUManager] upgrade...mac:D8:58:E7:2E:A3:DA
P    [2023-01-10 23:31:37.441-0300] [NodicDFUManager] upgrade...findDecive:true
P    [2023-01-10 23:31:37.442-0300] [NodicDFUManager] removeBondState D8:58:E7:2E:A3:DA
P    [2023-01-10 23:31:37.451-0300] [NodicDFUManager] upgrade... setForceSendInitFilefalse
P    [2023-01-10 23:31:39.355-0300] [NodicDFUManager:DfuProgressListener] onDeviceConnected
P    [2023-01-10 23:31:39.356-0300] [NodicDFUManager:DfuProgressListener] onDfuProcessStarting
P    [2023-01-10 23:31:47.694-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnecting
P    [2023-01-10 23:31:48.298-0300] [NodicDFUManager:DfuProgressListener] onDeviceDisconnected
E    [2023-01-10 23:31:48.301-0300] [NodicDFUManager:DfuProgressListener] error=133, errorType=2,GATT ERROR
E    [2023-01-10 23:31:48.311-0300] [NodicDFUManager] wait for restart ...7
E    [2023-01-10 23:32:03.316-0300] [NodicDFUManager] out of max retry times, upgrade failed, exit!
E    [2023-01-10 23:32:03.317-0300] [NodicDFUManager] upgrade failed, exit!
joernalraun commented 1 year ago

I would like to additionally point out that the "133 Gatt error" appears in our tests on all Samsung S23 phones running Android 13 (so this might help in getting that error), when trying to flash a Calliope mini or microbit V1. Is there any advice how to get around this?

MarioTheGreatest commented 7 months ago

Did you find a solution?

philips77 commented 1 month ago

Hi, Are you using this DFU Library? I don't recognize these logs. Could you paste here what you're getting from LogCat?

philips77 commented 1 month ago

And I'm also sorry for veeeeery long delay. I just came back to this library after a long time and trying to fix issues.