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

Newly flashed device works in Zigbee but not BLE OTA plus weird display cycling #4

Open
tbaumann opened this issue Feb 20, 2024 · 8 comments

Comments

@tbaumann
Copy link

Hi,

I just flashed this firmware (I liked the idea to regain BLE Flash support). First I flashed my LYWSD03MMC first with the pvvx/ATC_MiThermometer firmware and then this one. (https://github.com/pvvx/BZdevice/blob/master/bin/1141-020a-02053001-Z03MMC.zigbee)

The device was able to bind to Zigbee (ZHA) and shows temps there. (Firmware version 0x02053001)

But the Telink OTA is no longer able to connect to it. How do I still use BLE flashing? (There is a ATCz BLE device visible)

Also, how is the screen configured? I can't read or write the userInterface attributes like in pvvx/ZigbeeTLc#28

The Display is currently cycling through C,F and --- (BT logo on all the time)

@tbaumann
Copy link
Author

2024-02-20-14-31-56-926.mp4

@tbaumann
Copy link
Author

When the --- appear the BLE connection gets disconnected. I think it's in some kind of boot loop.
Also I don't think there are any zigbee updates happening. Except when the device is switched on.

@pvvx
Copy link
Owner

pvvx commented Feb 20, 2024

Register the thermometer to the Zigbee network.
Next, Zigbee OTA is possible.
BLE OTA is unstable on these versions.
You may have to use TelinkOTA.html several times.


For Zigbee everything is similar https://github.com/pvvx/ZigbeeTLc/

A solid "BT" icon indicates a connection loss or the thermometer is not registered with the Zigbee network.

The Display is currently cycling through C,F and --- (BT logo on all the time)

The “reset” contact is closed to “-Vbat”.

@tbaumann
Copy link
Author

The Display is currently cycling through C,F and --- (BT logo on all the time)

The “reset” contact is closed to “-Vbat”.

Unfortunately not. The pin is clear and undamaged. And the battery new.
I tried to hold the reset pin down, nothing really happens. Except I think it sometimes went into zigbee pairing mode for a moment. But it retested before it could do anything.

I can't do zigbee OTA because the device doesn't actually stay on the network. If I power it off and on I sometimes get a temperature update, but anything else will not work.

Something put it into a boot loop I think.

I will try to revert back via Telink OTA, but I'm not 100% sure what .bin file to use. It doesn't like the .zigbee files..

@Psytoshgen
Copy link

same here....

@henkiejan1
Copy link

Same here. Even flash back and clear to complete flash with the USB-COM flasher looks not fix it. The flash with USB-COM flasher looks like it goes all ok. But at the end exactly the same thing is happy: it hangs in the look like post above

@pvvx
Copy link
Owner

pvvx commented Mar 10, 2024

Try to reflash with preliminary erasing of the entire flash. (This will also change the MAC on the device. It will exclude the possibility that the current MAC address is already stuck somewhere...)
However, this has a greater impact on BLE, since capacitor calibrations for quartz and binding BLE setup is loaded from Flash. After erasing them everything works fine. And if there is garbage there, there may be problems.
For Zigbee, it is enough to perform a reset by connecting the “reset” pin to “-Vbat” for a while as described in the general instructions...
I have never observed the problems with ZHA described here. And my count of the number of firmwares with various options has long exceeded a thousand...
Zigbee very rarely gets stuck during registration. But this is due to the coordinator, the channel load (in the HA log there is a warning about 95% of the channel load) and the software in the HA. After a subsequent reset, the binding is guaranteed to work. An EFR32MG21 coordinator with an Ethernet connection is used.

In the Zigbee coordinator compiled from the Telink SDK for debugging, registration and binding of clusters always succeeds. A different radio channel is used, where all my other Zigbee devices do not work and do not interfere...

I don't use Z2M - Z2M has too many problems.

@henkiejan1
Copy link

I am happy. I got restored it and it works again with the only Zigbee firmware.

Things i did:

  1. Connected the wires as described on https://zigbee.blakadder.com/Xiaomi_LYWSD03MMC.html (For me i use a ESP8266 as usb to serial adapter. The reason: i am so sure that it will use 3.3V and not 5V what a lot adapters do. I uploaded before connecting to the temperature sensor this very simple sketch.
  2. As described i flashed with USB-COM tool from you @pvvx https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html with for me the original Xiaomi firmware: this one.
  3. after that: i removed the reset cable and the 100kOhm transistor / rx wire and reboot
  4. Device came available in bluetooth devices. Connected to it with Telink OTA tool of @pvvx and with the correct zigbee firmware
  5. After reboot it joins to the Zigbee network without any problems.

Strange enough when i flashed direct z03mmc.bin to the sensor it would not come available or joins my Zigbee network. Maybe i did something wrong. But anyways it's nice my sensor works again! :)

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

4 participants