pvvx / ATC_MiThermometer

Custom firmware for the Xiaomi Thermometers and Telink Flasher
https://github.com/pvvx/pvvx.github.io/tree/master/ATC_MiThermometer
Other
2.97k stars 207 forks source link

[Feature request] Support for CGG1 possible? #41

Closed MacSass closed 2 years ago

MacSass commented 3 years ago

Hello, great firmware / solution you have build. Works perfectly - love it on my LYWSD03MMC. Incredible what is possible and how a commercial product can be made so much better! Thank you!

I´m wondering if it was possible to add the CGG1 model. It seems to use the same type of encrypted advertisement in recent FW, but has a very nice e-paper display with low energy consumption. Link to respective model here: www.aliexpress.com/item/1000008051178.html

Would love to see that supported. Thanks again for making and documenting all this for us.

Regards - MacSass

kroon040 commented 3 years ago

I also tried TelinkOTA, but after clicking "Start Flashing"

TelinkOTA not work in CGG1-M. This is a program for OTA projects with Telink SDK, no third-party (mijia) protections.

The atc1441 TelinkFlasher will not work with the CGG1-M (and many others). The data is not signed correctly and when connecting it expects a UUID that CGG1-M does not have. The correct signature for the binary OTA firmware file is put by the utility from the Telink SDK, and not from the Ai-Thinker-Open Telink_825X_SDK (!): https://github.com/pvvx/ATC_MiThermometer/tree/master/utils All original OTA files (Xiaomi LYWSD03MMC, MHO-C401, CGG1-M, ...) are signed with this particular utility. There is no such thing for Linux. The size of the binary file must be correctly specified in the bootloader header (and have 0xXXXX4).

Use https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html and act consistently...

What is the correct way of flashing? I found the CGG1_v31.bin file but how , it doesn't work with activate.

pvvx commented 3 years ago

Use https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html and act consistently...

What is the correct way of flashing? I found the CGG1_v31.bin file but how , it doesn't work with activate.

All Ok. To activate, press the button before connecting. Described in the standard instructions for CGG1-M.

00:42:05: Searching for devices
00:42:10: Connecting to: Qingping Temp & RH M
00:42:15: Detected Telink OTA service
00:42:15: Connected
00:42:18: Activating now, please wait...
00:42:20: Activation successfull
00:42:21: Received device infos are correct
00:42:21: Login successfull
GraphOriginal
00:42:24: Load firmware file 'CGG1_v31.bin'...
00:42:25: File size: 64148 bytes
00:42:25: Count: 4010
00:42:27: Start DFU
00:42:52: Update done after 24.112 seconds
00:42:56: Disconnected.
kroon040 commented 3 years ago

Use https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html and act consistently...

What is the correct way of flashing? I found the CGG1_v31.bin file but how , it doesn't work with activate.

All Ok. To activate, press the button before connecting. Described in the standard instructions for CGG1-M.

00:42:05: Searching for devices
00:42:10: Connecting to: Qingping Temp & RH M
00:42:15: Detected Telink OTA service
00:42:15: Connected
00:42:18: Activating now, please wait...
00:42:20: Activation successfull
00:42:21: Received device infos are correct
00:42:21: Login successfull
GraphOriginal
00:42:24: Load firmware file 'CGG1_v31.bin'...
00:42:25: File size: 64148 bytes
00:42:25: Count: 4010
00:42:27: Start DFU
00:42:52: Update done after 24.112 seconds
00:42:56: Disconnected.

Tnnx, I got it working.

sermayoral commented 3 years ago

Hi everybody.

I has the ClearGrass versión (UUID 00010203-0405-0607-0809-0a0b0c0d1912) that it doesn't work: https://github.com/pvvx/ATC_MiThermometer/issues/81

Waiting for a hope to find a solution to hack this model :-).

If I can help in some way. Default advertising interval for this model is more than horrible...

yerkanian commented 3 years ago

Just to clarify the activation/flashing procedure for the new CGG1-M (with GOOSEM20XXXXXXX 106308/00096720 or similar markings and production date 2020.03) once again:

Press and hold the button on the back of CGG1-M for 2 seconds until the Bluetooth icon starts blinking on the e-ink display, and then click the 'Connect' and 'Do Activation' buttons on the TeLink Flasher. Took me an hour to figure out why the activation was timing out...

Once again, great job on the firmware, @pvvx!

kelchm commented 3 years ago

FYI -- it looks like the new CGG1 'M' is now available from Amazon in the US. I ordered one the other day and while not as new as those I've ordered directly from China, its still new enough to be the telink variant.

przemhb commented 3 years ago

I've just received "ClearGrass Temp & RH Monitor M Version", production date 2020.01. It came with FW version 1.1.2_0020. TelinkMiFlasher returns an error "NotFoundError: No Services matching UUID 00010203-0405-0607-0809-0a0b0c0d1912 found in Device." nRF Connect among UUIDs shows 0xFE59.

Correct me if I am wrong, but it seems it is yet another variant - marked as CGG1-M, but in fact an old CGG1.

pvvx commented 3 years ago

nRF Connect among UUIDs shows 0xFE59.

UUID from Nordic DFU - 0xFE59 https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__nrf__dfu__ble.html

Stephan3 commented 2 years ago

Hey i bought a few devices within the last two years from different Sources and got lywsdcgq/01zm everytime. I opened one to share pictures here. I like the idea this project broadcasts the data.

IMG-0779 IMG-0780 IMG-0781 IMG-0782 IMG-0783

I havent found the information here if its supported allready. the webflasher had not connected to it. I have about 10 here ready to brick.

Bitman-GR commented 2 years ago

From the chip details , it seems to be a Nordic chip inside ( nrf51822 ) , not Telink ! This could be perhaps detected also with UUID info from nRFconnect app as stated previously .

V4n1X commented 2 years ago

Hey i bought a few devices within the last two years from different Sources and got lywsdcgq/01zm everytime. I opened one to share pictures here. I like the idea this project broadcasts the data.

I havent found the information here if its supported allready. the webflasher had not connected to it. I have about 10 here ready to brick.

I have also one here, the hoping for a support maybe in the future.