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.75k stars 196 forks source link

Cannot connect to device via TelinkMiFlasher website for update and configuration #459

Open Robert-Versteegen opened 6 months ago

Robert-Versteegen commented 6 months ago

Tried to update a new device (hardware v1.5 LYWSD03MMC with the flasher url but the device would not connect. Flashing the device with the atc1441 flasher url would connect instant and i'm able to flash the ATC_v46.bin file, and back to stock mi v130 firmware.

From the pvvxflasher site no connection. not from an edge browser on win11, nor from a android chrome browser. Device is listed in the devices, but unable to connect. Unable to connect to other currently working devices as wel.

Done a number of these devices in the past. for update and configuration. Due to the fact i'm not able to connect, i cannot set the device type to the BTHome.

Is there an issue with the flasher? or am i the only one

pvvx commented 6 months ago

Everything is working. Just tested on different options.

Robert-Versteegen commented 6 months ago

thanks for testing.. so it must be something here.

sanosis commented 6 months ago

Arch Linux - current, bluez 5.71-3, chromium 120.0.6099.199-1 The process is stuck on 'Connecting to:'

Robert-Versteegen commented 6 months ago

Hi, sometimes i still get the "connecting to:"... also.. What i do is i use the OTA flash url in another tab This connects the device succesfully.. then in the flasher URL i can connect to the device also and do my update and config.

KlausHans commented 3 months ago

Got heavy connection problems here too. I am using Chromium on the latest Ubuntu. grafik I was able to flash the firmware and already connected to it afterwards. Then the connection seemed lost so i tried to reconnect. No success. Now i am trying since 10 minutes to connect again. Other tab didn't helped. Bluetooth disabled and enabled on the pc didn't helped. Battery reinserting in the Xiaomi device didn't helped. PC restart didn't helped. Now i am out of ideas. Edit: I flashed a second device. There the connection works fine. I remembered, that i played with some parameters on the problematic one. For example i changed the advertising interval to 10000 ms. Maybe this is the culprit. Edit2: Hm, now i have the same problem on the second device. I didn't changed anything there.

pvvx commented 3 months ago
  1. Not all USB-BT adapters work with an interval of 10 seconds.
  2. On Linux, you must configure Bluez to be compatible with the Bluetooth SIG standard. This is done in the Bluez configuration files. Connection delays must be set to the required 10 seconds to comply with Bluetooth standards. Taking into account the possible missed reception - by 22 seconds. Also add the ability to run Bluez in "experimental mode". Otherwise it doesn't work with BLE. Bluez only supports BT4.2 released in 2014. And today this is completely outdated software, like most of the applications and APIs, including the Linux kernel itself.
KlausHans commented 3 months ago

Not all USB-BT adapters work with an interval of 10 seconds.

Ok, thanks for the info. Is there a way to reset the firmware without connecting to it?

I tried Windows and i tried my Laptop. Always the same with the misconfigured one. The other one connects fine today, though.

Robert-Versteegen commented 3 months ago

Hi, some late comment about my config. tried it mostly from my android. now it runs on v14. it resolved itself, and i can now use the flasher url directly. phone update or site change, cant say. from my point of view this issue can be closed

pvvx commented 2 months ago

Ok, thanks for the info. Is there a way to reset the firmware without connecting to it?

In most cases, the advertising interval of 10 seconds is served by smartphones with Android. Try connecting and reducing the interval.

README: If you have a smartphone with BT5.0+ and the nRFConnect program, then you can reset all settings to default by connecting to a thermometer and sending the 0x56 command, as shown in the screenshot: