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

LYWSD03MMC not connectable #547

Closed
phako opened this issue Sep 26, 2024 · 9 comments
Closed

LYWSD03MMC not connectable #547

phako opened this issue Sep 26, 2024 · 9 comments

Comments

@phako
Copy link

phako commented Sep 26, 2024

I have flashed a LYWSD03MMC with v47 BTLE firmware. Shortly after flashing I can connect to the sensor for configuration, but after a short while I can no longer connect to it, nor getting any measurements out of it. It is visible in my btle scanner, though.

The display updates fine. The first update was done by OTA from vendor fw to yours, in an attempt to recover the device I did a serial flash through the UART web flasher.

Is the sensor just broken? Is there any way to get some debugging out of the device?

@bzgec
Copy link

bzgec commented Sep 26, 2024

I had similar problem when I set advertising interval too big (to 10 seconds). I could not connect to LYWSD03MMC from Linux PC (authentication timeout), but I could connect to sensor from Android phone. I just changed it back to default value and I could connect to sensor from Linux PC.

I have just found a note in README which could be another solution:

On Linux, when installing large advertising intervals, change the file '/etc/bluetooth/main.conf', variables: LEScanIntervalAutoConnect= LEScanWindowAutoConnect=. Value in ms.

@phako
Copy link
Author

phako commented Sep 27, 2024

I am using an ESPhome btproxy, not Linux. Settings are default, I did not change anything. And also the device is not visible at all, that apparently is cached in the btle scanner I used previously.

@jksmurf
Copy link

jksmurf commented Oct 17, 2024

I have the exact same issue with one of my two devices, both HW v 1.4 LYWSD03MMC with ATC_v47.bin BTLE firmware.

  • One of the devices, which I flashed OTA from a non 2.1.1_0159 FW (i.e. LOWER than that FW revision) is working fine (and integrates into HA using BTHome).

  • However the device that just doesn't connect to BTLE (but shows up just fine on a scanner) originally had 2.1.1_0159 FW, which I downgraded to the Original_OTA_Xiaomi_LYWSD03MMC_v1.0.0_0130.bin), then flashed to ATC_v47.bin using pvvx Telink Flasher.

  • This went fine, although often to "see" the current config (and amend it) I have to click connect in the flasher, it gets stuck, so I press reconnect and it comes up with the normal screen wtth the blue boxes for flashing various FW.

I use a Xiaomi Gateway 2 flashed to BLE using 3rd Part FW as my Bluetooth Gatweway but I also tried adding a BT Adapter direct to my Rpi4 running HA, without an improvement.

I have flashed and reflashed various FW but would love to have some ideas how to troubleshoot or what to test next?
I do not need to go to the Zigbee, prefer the BLE one.

XXX

@phako
Copy link
Author

phako commented Oct 27, 2024

I experiemented a bit (basically trying to go to zigbee which also did not work), The device is connectable and configurable in the flasher if I connect 3.3V (from UART or similar). With the battery in, no dice. the battery has 3.0something volts. Can't get the BTHome proxy to see it, though

@phako
Copy link
Author

phako commented Oct 27, 2024

Hm. I think this is actually a problem with the bluetooth proxy and it being completely overwhelmed by the number of devices available in my environment

@jksmurf
Copy link

jksmurf commented Oct 27, 2024

Maybe same issue as me ?
Simple solution?

#559

@phako
Copy link
Author

phako commented Oct 27, 2024

No, it's different. BTHome is working in principle, I have more sensors that just work, one that is stubborn

@jksmurf
Copy link

jksmurf commented Oct 27, 2024

Ok. I presume you have reflashed up and down to original and a few times to check ?

@phako
Copy link
Author

phako commented Oct 27, 2024

yes. It is now available all the time in random btle scanners and the OTA flasher, just not seen on the esphome btproxy. So this can be closed

@phako phako closed this as completed Oct 27, 2024
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

3 participants