-
Notifications
You must be signed in to change notification settings - Fork 492
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
Cannot connect after flash of LYWSD03MMC #159
Comments
Hey, please try out Victors version of the firmware: the edited web flasher is also available on his repo: |
Hey atc, thanks, but I get same problem, using new OTA and new firmware as recommended, but this time the log box contains just a little more info. It says "Device Version 1.1, Custom config:[3, 0, 0, 0, 40, 4, 191, 124, 49" ..that line was not in the OTA log box Remove sensor battery, left 5 min, replaced, still same. Cannot connect. Does not show on scan, on any computer or phone. Flashed back OEM firmware, all good again. |
what i do not understand is how can you reflash the thermometer if it is not available on a scan ? how do you meant that? |
I use the web OTA flash. They never appear on BT scan when OEM firmware. I have just noticed, that in Home Assistant, it has already created battery sensors using "discovery" with the Passive_ble_monitor" custom component integration. I was only flashing these with custom firmware to get the battery sensor - but it already has them with stock OEM firmware. They must have changed the firmware. I have only just bought these today. |
to be clear:-
So Is the firmware using BT protocol or standard that is not on some machines? That's all I can think of. |
Older and cheap BLE modules do not support long intervals between beacons, advanced settings are not included in the connection mode and have a short communication distance (low RF TX power). View BT5.0 standards and compare with BT 4.0 ... |
I don't know any linux OS that supports BT5.0. I am flashing the custom fw to Xiaomi LYWSD03MMC sensor. My furthest sensor is about 9 metres away and works fine with OEM fw. I am flashing this custom fw using my Samsung A21s and flashing works fine and the sensor display confirms custom fw is running. However... I use Home Assistant running on a Pi3b where the linux kernel is 5.4.72 with BT 4.1. The sensor is not showing up on a BT scan (on my Pi3b) with your fw in. Reflash to OEM and it's fine. It always appear on my Samsung phone whether OEM or Custom. So it's something to do with my Pi3b controller?
Does/should this excellent promising custom fw work with 4.1/my controller and sensor? OR, is there a setting I can send to the custom fw sensor - using my phone - that will make it "appear" on a scan on my Pi. EDIT:I have upgrade to kernel 5.10.7 and upgraded BT packages. |
@setdetnet it may change name to ATC_xxxxxx, at least mine did |
Maybe it's not your case, but replace the battery with a new one and know that every new battery isn't necessarily good with a load. It was the reason why my sensors didn't reconnect after the custom fw flash, though they showed 3.1-3.2 volts without a load. |
I experienced the same thing. Flashed with custom firmware (latest release at time of posting), and then could not reconnect to the device from my (Linux, Fedora 32) laptop. Had to use an Android tablet to connect to change various properties. |
Thanks for this. I came here because after flashing the custom firmware, the web flasher could no longer connect to the sensor. I tried from two different Chromebooks. After seeing your comment, I tried from my Android phone and it works perfectly. |
I have 4 sensors one of them is flashed with custom firmware. All of them are showing on my phone, but when I try to search them with my laptop it only finds 3 that are on stock firmware. To be clear, the one in question is sitting just next to my laptop, but no sign of it in |
@monte-monte |
In order for a BLE device to be displayed in the system menus of some operating systems, it must transmitt special flags in the advertising package. This is in addition to the transfer of 3 bytes, which increases battery consumption. But none of the operating systems has special drivers for working with specific BLE devices. Alternative version. |
@pvvx well, it seems that there is simple solution for that. Thanks for pointing to the thread. |
Cannot connect after custom flash.
Before flash, the sensor is shown in bluetooth device scan on Samsung Phone, Sony laptop or Raspberry Pi 3. I can also pair and connect the sensor using any of these devices.
Then I flash OTA using the .BIN file in your latest build. After flash, all done well, battery removed, replaced, then sensor. Display reads Atc and then goes through the MAC bytes. So I know its flashed.
However, trying to now scan, pair and connect via linux debian buster bluetoothctl or hcitool no good. Does not show up in Samsung phone bluetooth lists. The sensor does not show up on a scan. Before flash, it showed up and I can connect using Xiaomi app. After flash, the sensor not seen in bluetooth on Samsung Phone, Sony laptop or Raspberry Pi 3.
Flash back to stock and all is good again.
Reason I want stock is for battery display and battery sensor in Home Assistant.
So now I have to go without battery sensor. But your OTA flash web script does obtain the encryption key so I use that in Home Assistant and it works fine using Xiaomi OEM firmware.
I repeated the custom flash -> stock flash -> custom flash , three times, same result. I do notice that in your OTA web flash , after your custom firmware is flashed, your OTA web cannot connect. It says "NetworkError: Connection Failed for unknown Reason. Reconnect 1 from 5" Then it goes to "Reconnect 5 from 5" then disconnects.
Something definitely wrong.
The text was updated successfully, but these errors were encountered: