-
Notifications
You must be signed in to change notification settings - Fork 489
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
Xiaomi has released new 2.1.1 firmware #298
Comments
Thank you for the hint. |
Thanks Victor, I would expect them to sign the activation on the server side with an unknown private key but lets hope not |
Can i downgrade via Uart? With correct key/token cannot downgrade or change fw. Even if login is correct and OTA seems to work, it doesn't . |
I haven't clarified the whole process yet. It is quite possible that because of these "security worries" Xiaomi has changed the activation and "OTA": PS: I can't clarify because I adhere to the "user agreement" in "MiHome". It is forbidden to view their code and other manipulations with it. And no one wants to publish the binary file of the new official firmware for public access :) |
is this going to get fixed please? thank you |
And I just updated the firmware without checking in here 😞 |
I've made the same mistake by updating to the latest firmware. Hope this will be fixed soon. |
So for those of us who updated to the latest firmware, is there any way to downgrade when the flasher does not connect due to being on unsupported firmware? Catch 22 situation! |
I also can't flat on 2.1.1_0159 version, let me know please it if possible or not. Thanks! |
At the moment, you can only write another firmware using a hardware programmer. |
How would I go about doing that? |
damn, got it with the new firmware so cant install the custom also :( |
A hint may occur when a new version is released. When it will be possible to upgrade version 2.1.1_0159 in Mi Home to the next one. |
To go back to the old version (Original_OTA_Xiaomi_LYWSD03MMC_v1.0.0_0130.bin );
|
@VonalOrdu
|
I have no idea about this. https://github.com/atc1441/ATC_MiThermometer/blob/master/Mi_SWS_Connection.jpg |
The very name of the utility describes: TLSR825x USB-COM Flash Writer v0.4 (TX-SWS only!) :) The picture is from another version of the programmer - https://github.com/pvvx/TlsrComSwireWriter - does not work on FTDI chips! Comment edited: Fixed a link error. |
Are you saying that I am enough like this? |
Yes |
Why didn't this method work? https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html This method worked. Thank you very much for your sharing. |
https://github.com/pvvx/TlsrComSwireWriter - does not work on FTDI chips! (Only Chinese USB-COM chips) On FTDI chips, reception is performed by checking bitwise synchronization with the removal of bad characters from the buffer with error generation, which does not allow emulating "Telink Swire". https://github.com/pvvx/TlsrComProg825x - this programmer uses a loader that switches to work with the RX and TX chip UART pins. |
Hi, So, after sharing my disgrace... How hard is to get one of this USB-COM board and use it to downgrade? any link from Aliexpress? |
Hi. Downgraded using this ch340 usb to ttl rs232 converter: |
Maybe I can't differently, but flash by site only works on Windows "machine". On MacBook I bricked by flash. On Windows "machine" I recovery firmware without problems :) |
Hi Guys, However I didn't used the board referenced by @tharzo, I got with a Friend the FTDI 232 and followed the steps passed by tarzho. I did the downgrade of my firmware from v2 to v1 and then flashed it with the custom firmware v4.5 successfully!! |
I'm not that familiar with soldering and boards, so I decided to buy a new one from Ali, from the same shop as my previous one. It was shipped very fast and fortunately the firmware version of the new device was still on v1.0. |
Is there any expected date when soft 2.1.1 will be supported by Telink Mi Flasher? I was not able to downgrade by Serial |
So far no one is doing this or it is unknown. Disassembling or otherwise viewing codes from Xiaomi is prohibited in the MiHome user agreement. For this reason, other methods that are not prohibited will be used. And this requires the next new version of OTA from MiHome. |
I used windows with the default baud rate. When I tried a different baud rate (with |
Hello. Thank you for your job. Is there any guide for dummies on how to flash the firmware with the USB method? Thank you. |
I've found this video https://youtu.be/BtsxkOS6Zj8 about flashing using an USB/UART adapter. Are all the USB/UART adapters the same? This one https://amzn.to/41FpTf6 is similar to the one shown in the video. But this https://amzn.to/3BIZrGE says that it uses a non cheap chip (FTDI FT232RL). Which one have you used to flash? Thanks. |
My UART adapter uses an FTDI chip. I also tried it the same way as it was done in the video and this did NOT work for me. I also had to connect the RX, 1k resistor and RST pins as described here pvvx#378 (comment) My UART adapter looks exactly like the one from that picture. Then I used the python flasher and NOT the web flasher as described here #298 (comment) |
I've been using three LYWSD03MMC for more than 5 months since I posted here. Two of them use the ATC firmware, and third one with ESP32 to decrypt AES and extract info from advertised data. Now I can compare their power consumption. The battery level of the two with ATC firmware has started dropping, one is now 85% and the other one 99%. The third one that I use ESP32 to decrypt data is still 100%. I monitor every BLE packet, and the advertised data is very few. I suppose the power consumption of the AES decrypt method is more efficient with longer battery life. The advantage of ATC firmware is that the info is more real time and frequent. |
Any thoughts on when / if the firmware OTA option will work again. About to get the wires out! |
The newest FW is Signed by Xiaomi so only they can make a new OTA update. |
After the introduction of firmware signing with certificate keys, purchasing Xiaomi LYWSD03MMC became unprofitable in terms of price and functionality. And this was expected. It is highly likely that Xiaomi's wireless department will suffer the same fate as Nokia's mobile (smartphones) department. Opening-reversing the key will only prolong the agony... |
But it's very easy.
and https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html flasher. |
Did you flash the new ZigBee or did you need to downgrade first?
…On Mon, 23 Dec 2024, 12:38 Tuti4120, ***@***.***> wrote:
The newest FW is Signed by Xiaomi so only they can make a new OTA update.
Flashing by wires is needed
But it's very easy.
I used CP2102 USB TTL 6in1 converter:
image.png (view on web)
<https://github.com/user-attachments/assets/d0f508c0-36ee-40f5-b643-1287377bab87>
- only 3 connections: +V, GND, TX -> P14
and https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html flasher.
—
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIASXJLCBR7KSNU27VJJSD2G774NAVCNFSM6AAAAAA5OISJFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJZGYZTENRTHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
Nevertheless, in my case the USB-COM programmer worked with 5 boards. No need to downgrade first. |
It took awhile to sort through how people did it... but I finally was able to flash 10x LYWSD03MMC B1.5 using https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html and a FT232H board (https://www.adafruit.com/product/2264).
|
So, do you think it's worth buying a gadget like this https://amzn.to/49R8NwI to "recover" the 7 thermostats I have with the new firmware? Would the flashing be done the same as in the video? I have no idea about electronics and I would like to be completely sure about the connections. Could you post a photo with the connections between the thermostat and this CP2102? Thank you very much and happy holidays! |
It did work for me. I have 5 of LYWSD03MMC B1.5. One with old firmware and four with the new one. The connections: You have to configure switches on the CP2102:
Right switch: up. You can flash to original 0130 firmware and use the OTA flasher, or to whatever firmware you want with USB flasher. |
Anyone got hardware flashing to work from a Mac? Or is it still Windows only? |
I am about to try both. I will let you know how it goes
…On Fri, 27 Dec 2024, 15:01 Gerd Knops, ***@***.***> wrote:
Anyone got hardware flashing to work from a Mac? or is it still Windows
only?
—
Reply to this email directly, view it on GitHub
<#298 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIASXJLPSLWEIQ6T3K5TRL2HVTUFAVCNFSM6AAAAAA5OISJFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRTG43TSOBQGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'll chime in just to give a big thanks to this thread, as I've successfully converted 6x LYWSD03MMC B1.5 to ZigBee. The components were: Thermometers from AliExpress Waveshare USB TO TTL (C) 6pin Serial Cable, FT232RNL and its driver Male to male jumper wires (for the sake of easier handling) As I didn't want to solder anything, I just tucked the ends of the jumper cables from GND to -VBAT and VCC to +VBAT below the contacts and it was sufficient to hold a proper contact as for P14 I just held it with one of my hands (Is this is a proper way to do it? Not really, so be careful if you choose to do it like I did). The process was: Additional notes |
@gknops I flashed the thermometer using Mac, but I had to adjust timeouts and delays in the script using cp2102. But it is still not very reliable at the start, it may require many attempts to kickstart the process |
Many thanks - this worked perfectly with windows 11. I also held the data connection manually - going to see if a croc clip will work -as I have 7 more to do. Once I have done a few more I will then move my test to my Mac. |
Hello everyone, I have received a few of these Mi thermometer recently and i bought the CP2102 USB TTL 6in1 converter in order to flash them. I have followed the instructions, connected everything right, the CP2102 is recognised in W11 and on the USBCOM flasher, i have the right firmware (the xiaomi one for the downgrade), i click the flash button, leds starts to blink, it tells me it's done and then, when i want to flash with the telink flasher it tells me i'm still at the 2.1.1_0159 version. I have tried 7 times (on the same thermometer though), i even tried with nothing connected to see if it gives me an error (fun fact no, leds will blink and the USBCOM flasher will tell you everything is ok), cables are ok, i've tried changing the activation time (baudrate 115200). Nothing works. Has anyone got an idea what could be the problem. Thank you ! |
How many times do I have to describe that this programmer has no feedback from the chip. It transmits the firmware without checking. A variant with an attempt to emulate reception on the features of Chinese USB-COM chips is located here: The option to switch to the UART protocol is here: If you need a full-featured programmer for these chips, then buy it from Telink as a BDT. https://aliexpress.ru/item/1005003712968248.html All other COM/UART "programmers" are incomplete emulators of the SWire protocol from Telink. As an example:
What was your purpose in changing the baudrate? The SWS signal bus uses a speed of about 1.5 Mbit/s (up to 2 Mbit/s). It has the ability to synchronize, but not unlimited. The USB-COM adapter cannot transmit a stream of more than 460800 bit/s without interruptions. And everything below that may not be captured by the synchronization of the chip. And if you do not connect the chip power in time, and it is in sleep mode, the startup sequence will not be accepted. To force the chip to start in time, use the RTS signal connection from the adapter to the RST pin of the chip. In sleep mode, the current consumption of the chip is less than that supplied via the TX pin from the adapter. This current is sufficient even for the full operation of the thermometer. If there is no connection to RTS->RST, then connect TX->SWS, +3.3V -> +Bat. After starting the program, connect GND-> -Bat. The standard firmware (XIAOMI) has a 2-second cycle during operation. |
Did you remember about the correct switches position before the flashing? |
I didn't changed it, only the activation time with the baudrate other people used.
It's written at least once on the github page you wrote, just checked, sorry to have missed it. Thanks for the answer and the knowledge. It gives me a few way to troubleshoot the issue. I'm going to try with the RTS pin first. If it still doesn't work, i'll try to change a few parameters just in case, computers (have a few), OS, browser to see if it changes anything, sometimes it works in mysterious ways. If it's still does not work, i'll use the power of buying stuff.
Yep, this one.
Did it in that order but with the CP2102 connected, will try with it not plugged in. Thanks ! Edit : This did the trick.
I was too slow, i wasn't taking my time, there was a few seconds between the connection of the thermometer with the CP2102, but it was still too slow. Once again, a chair to keyboard interface problem. Thanks again. |
This is an incorrect sequence. That is, it will not necessarily work in all cases. As a result, you have a time when the activation signal must arrive - it is only a couple of ms. The processor in the chip does not participate in programming, but if it continues to work, it will disrupt the writing process, which occurs by transferring data through the SWS hardware interface to the SPI driver registers, which are already connected to a separate SPI-Flash crystal. In special cases, if protection is installed by software disabling SWS in the firmware, an RTS-RST connection is required. And then use the command - Erase All Flash. After this, the chip will always be ready to receive control via SWS. A hardware programmer (not USB-COM) does not need such actions. The exception is the programmer from Telink. It requires dancing with a tambourine around the chip. |
@Oxi75 maybe its best to ask this question in the Zigbee firmware repo :) |
But that exact sequence did work for me and CP2101. I'll try to make a video with the next LYWSD03MMC once I'll receive it. |
It seems that the way to update firmware using telink flasher has been forbidden.
The text was updated successfully, but these errors were encountered: