Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA Error: NotSupportedError: GATT operation failed for unknown reason. #29

Closed
freeskyflying opened this issue Oct 28, 2023 · 13 comments
Closed

Comments

@freeskyflying
Copy link

freeskyflying commented Oct 28, 2023

everything is ok from step 1-4
but after step 4 , flash firmware ATC_ota_400000
when i reboot device ,reflash website
connect shows:
21:50:33: Reconnect 5 from 5
21:50:33: Hardware Revision String: B1.7
21:50:33: Software Revision String: V4.4
21:50:33: Firmware Revision String: github.com/pvvx
21:50:33: Detected Mi device
21:50:33: NotSupportedError: GATT operation failed for unknown reason.
21:50:33: Something went wrong, too many reconnects

the displayer is still work

@Mostalk
Copy link

Mostalk commented Oct 28, 2023

I had a similar error when I flashed from a computer, try from your phone

@booroondook-eng
Copy link

Try to extract and insert the battery.

@adamlc
Copy link

adamlc commented Oct 31, 2023

Also try a different battery. I've found if the battery is a bit on the low side it may throw random errors like above

@MartynIden
Copy link

i have a problem with hw B1.7 revision too, brick after first flashing via air (no connect, no screen), then flashed via UART - all worked fine but get another brick after OTA (z2m) on ver 1.0.3
reflashed 1.0.3 via UART again and brick after OTA to 1.0.5

revision 1.7 little shitty)) another device hw B1.4 worked fine

@Adrian-czw
Copy link

I have exactly the same symptom hw B1.7 - after uploading the software and rebooting, the sensor screen displays nothing. Battery replaced with new one and reset done.

With another hw B1.4 device, the transition to Zigbee was successful.

@devbis
Copy link
Owner

devbis commented Oct 31, 2023

I don't have any idea why OTA on B1.7 works incorrectly. Feel free to share your thoughts. #36

@pvvx
Copy link

pvvx commented Nov 2, 2023

For B1.7, B1.9, B2.0, the code from ATC1441 used to work with the display controller (BU9792FUV) in the Zigbee firmware is not quite correct.
Failures often occur and the display readings fly off.
Partially helps to reset the power supply...

@mtdn
Copy link

mtdn commented Nov 7, 2023

Same error with B1.6. Tryed on several devices with PC and phone.

Flashing ATC_ota_40000 is OK. After reconnect:

Status: Hardware Version: LYWSD03MMC B1.6, Software Version: 4.4
Vbat: 3113 mV , Temp: 25.97°C, Humi: 52.32%, ID: 58, Reed switch counter: 0, flg: 0x04:r0/t0
14:06:50: Searching for devices
14:06:56: Connecting to: ATC_203A9D
14:07:00: Hardware Revision String: B1.6
14:07:00: Software Revision String: V4.4
14:07:00: Firmware Revision String: github.com/pvvx
14:07:00: Detected custom Firmware
14:07:00: Hardware Version: LYWSD03MMC B1.6, Software Version: 4.4, Sensor: SHT4x
14:07:00: Custom config HEX string: 55051000002804a9313104b4

And when trying to flash anithing after ATC_ota_40000.bin (not only z03mmc.bin) I have error "Update error: NotSupportedError: GATT operation failed for unknown reason."

I think that is important: all firmwares stops on "Sending block nr: 7 from ..." when flashing

Status: Sending block nr: 7 from 8078, 0% done, time since start 0.02s
Vbat: 3113 mV , Temp: 25.97°C, Humi: 52.32%, ID: 58, Reed switch counter: 0, flg: 0x04:r0/t0
14:06:50: Searching for devices
14:06:56: Connecting to: ATC_203A9D
14:07:00: Hardware Revision String: B1.6
14:07:00: Software Revision String: V4.4
14:07:00: Firmware Revision String: github.com/pvvx
14:07:00: Detected custom Firmware
14:07:00: Hardware Version: LYWSD03MMC B1.6, Software Version: 4.4, Sensor: SHT4x
14:07:00: Custom config HEX string: 55051000002804a9313104b4
14:14:31: File: z03mmc.bin
14:14:31: File size: 129236 bytes
14:14:31: Count: 8078
14:14:34: Start DFU
14:14:40: Update error: NotSupportedError: GATT operation failed for unknown reason.
14:14:40: Disconnected.

@devbis devbis changed the title cant connect after flash firmware ATC_ota_400000, hw B1.7 OTA Error: NotSupportedError: GATT operation failed for unknown reason. Nov 7, 2023
@pvvx
Copy link

pvvx commented Nov 7, 2023

@mtdn - Clarification is not possible - there is no source code ATC_ota_40000.bin.

There are only guesses - ATC_ota_40000.bin does not clear the Flash area for writing OTA.
OTA firmware is loaded into a different area, and there may be dependencies on this.
As a result, after the ATC_ota_40000.bin, OTA is no longer available.

@jumakki
Copy link

jumakki commented Nov 11, 2023

@mtdn, I had same issue with B1.6. Flashing with Android phone, same as I used for flashing ATC_ota_40000, failed repeatedly on block nr 7. But I was able to flash Zigbee successfully using this flasher #50 when using Linux PC.

@nicolashimmelmann
Copy link

Had the same issue with revision B1.6 several times, on all 4 devices that I bought. Flashing ATC_ota_40000.bin went smoothly after activation, but flashing z03mmc.bin always gave an error after the first battery-out/in and connecting to the ATC_XXXX device.

What helped was simply retrying:

  • just remove the battery, put it back in, reload the TelinkMiFlasher website and try to connect and flash z03mmc.bin again.
  • If it still does not work, connect the GND and Reset Pins on the back side until the device shows up for connection, connect again on the flasher website, and flash z03mmc.bin again.
  • just retry until it works.

I was able to flash all 4 devices after a maximum of 3 tries per device. But I have no idea what the cause for the issue is. As others reported above, it stops at "Sending block nr: 7 from ..." and shows the " NotSupportedError: GATT operation failed for unknown reason."

@pvvx
Copy link

pvvx commented Dec 3, 2023

z03mmc.bin from devbis is not supported in BLE OTA TelinkMiFlasher.html.
z03mmc.bin does not support BLE OTA booting.
The use of ATC_ota_40000.bin from devbis is not recommended due to many problems for users.

TelinkMiFlasher.html supports downloading Zigbee firmware in *.zigbee file format with BLE firmware version from 4.6.

When selecting the firmware file in TelinkMiFlasher.html, copy and paste the link https://github.com/devbis/z03mmc/releases/download/1.0.6/1141-0203-10063001-z03mmc.zigbee.

If there is a “disconnect” when starting the flashing, reconnect and repeat OTA. The reasons for 'disconnect' may be due to difficulties in preparing Flash to write firmware to another area. Not all BT adapters can maintain a connection at varying intervals.

@devbis
Copy link
Owner

devbis commented Dec 14, 2023

I received V1.6 HW sensors and confirm that OTA in transitional firmware is broken.
After some research I found out that enabling uart breaks the ability to use OTA.
For this case I just disable LCD for 1.5/1.6 revisions in transitional fw, now update works correctly.
For already stuck devices the only known way is to flash via UART/SWS.

@devbis devbis closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests