atc1441 / ATC_MiThermometer

Custom firmware for the Xiaomi Thermometer LYWSD03MMC and Telink Flasher via USB to Serial converter
2.81k stars 472 forks source link

LYWSD03MMC Keeps disconnecting and doesn't save changes. #267

Closed AmphibianDev closed 2 years ago

AmphibianDev commented 2 years ago

I have used Telink Flasher v4.4 to upload the custom firmware "ATC_v38.bin". After that every time I am connecting back in ~10 seconds it will automatically disconnect.

7:32:54 pm: Searching for devices
7:33:04 pm: Connecting to: ATC_64E04C
7:33:12 pm: NetworkError: Connection failed for unknown reason.
7:33:12 pm: Reconnect 1 from 5
7:33:16 pm: Hardware Revision String: B1.7
7:33:16 pm: Detected custom Firmware
7:33:16 pm: Hardware Version: LYWSD03MMC B1.7, Software Version: 3.8, Sensor: SHT4x
7:33:16 pm: Custom config: [133, 96, 0, 0, 40, 4, 169, 124, 49, 5, 60]
7:33:26 pm: Disconnected.

If I try to change the config in that 10 sec window, its says successful but is not, it doesn't save.

First time:

7:29:22 pm: Searching for devices
7:29:27 pm: Connecting to: ATC_64E04C
7:29:38 pm: Hardware Revision String: B1.7
7:29:38 pm: Detected custom Firmware
7:29:38 pm: Hardware Version: LYWSD03MMC B1.7, Software Version: 3.8, Sensor: SHT4x
7:29:38 pm: Custom config: [133, 96, 0, 0, 40, 4, 169, 124, 49, 5, 60]
7:29:48 pm: New custom config: [135, 96, 0, 0, 40, 4, 169, 124, 49, 5, 60]
7:29:48 pm: Settings 55876000002804A97C31053C was send successful
7:29:51 pm: Disconnected.

Second time:

7:30:14 pm: Searching for devices
7:30:56 pm: Connecting to: ATC_64E04C
7:31:02 pm: Hardware Revision String: B1.7
7:31:02 pm: Detected custom Firmware
7:31:02 pm: Hardware Version: LYWSD03MMC B1.7, Software Version: 3.8, Sensor: SHT4x
7:31:02 pm: Custom config: [133, 96, 0, 0, 40, 4, 169, 124, 49, 5, 60]
7:31:18 pm: New custom config: [135, 96, 0, 0, 40, 4, 169, 124, 49, 5, 60]
7:31:18 pm: Settings 55876000002804A97C31053C was send successful
7:31:21 pm: Disconnected.

The weird thing is that I have 4 devices, the first 2 everything worked correctly and with the last 2 have this problem. All of them where firmware uploaded using the same phone. (The problem exist on the pc too, windows 10) I tried a restart by unplugging the battery from the device but the problem still persist.

AmphibianDev commented 2 years ago

Managed to get it working, my intuition was right. Just disconnect the battery, but wait at least 5 - 10 minutes before reconnecting it. Or just short the negative and positive terminals and you don't need to wait.