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

PIN code not working in ATC_v38.bin #247

Closed
Matush8 opened this issue Sep 10, 2022 · 7 comments
Closed

PIN code not working in ATC_v38.bin #247

Matush8 opened this issue Sep 10, 2022 · 7 comments

Comments

@Matush8
Copy link

Matush8 commented Sep 10, 2022

Right after flash to v3.8 I set a new PIN code to 123456

In the log a have found expected messages:
PinCode: '123456'
Send pincode ok

Once disconnected there was no more connection to the device. My PC asks me for a PIN and when I enter 123456 there is a message "Connection failed"
I did this on brand new LYWSD03MMC B1.6

There was no problem with v3.7 and PIN.
I would like to do a downgrade however I'm unable to connect this device anymore because PIN code not working.

Any help?

@Protoncek
Copy link

yep, been there... are you by any chance on Windows?
If so, try to connect with another PC, which you didn't connect to Xiaomi before. The problem (i guess) is that windows "kinda remembers" connection and even though it asks for password then in some strange way it doesn't use it. Try to find device in windows (it remembers it) and delete it. But, good luck if you're on win11... i didn't manage to find where these things are stored, at the end i connected with another PC and deleted password on xiaomi...

@Matush8
Copy link
Author

Matush8 commented Sep 11, 2022

Yes, it's on the Win 10. I've tried another PC (also W10) and there was the same problem with "Connection failed".

Also tried another new LYWSD03MMC unit.
Just to be sure it's not related to that single one.

Now I have two thermometers with the same problem.

@Protoncek
Copy link

Strange... are you sure that you never connected to devices with that "another PC"? try to connect with smartphone (or tablet).

In any way, i tried twice to enable this pin code, each time i've had so many problems and frustrations that i'll have to trash devices that i gave up with it. My 8 thermo's are without pin. I live in a house, so there's practically no chance that someone breaks into my thermometer... but, if it does...well...

@pvvx
Copy link
Owner

pvvx commented Sep 14, 2022

#174 (comment)

@Protoncek
Copy link

Protoncek commented Sep 15, 2022

Windows 10 with most BT adapters only supports bind and pin with one BLE device!

Jesus...really? I didn't know that. That's a serious limitaton... what a bummer! Thanks for this info!

@pvvx
Copy link
Owner

pvvx commented Sep 15, 2022

After binding to a BLE device, windows 10 reads and displays the battery level on the icon... Reads the Battery Service (0x180F)/Battery level state (0x2A1B) characteristic.
A situation is possible that shows last year's level or periodically makes a connection and reads the charge level. There were also such cases.
The descriptions for the latest global updates for Win10 indicated some changes in BLE. (I haven't been able to find an exact description for them.)

https://docs.microsoft.com/en-us/answers/questions/452987/how-many-ble-bondingconnection-are-supported-by-wi.html
The response does not contain the specified number of Windows BLE bind remembered devices.
A typical BLE device typically has a memory of the last 1..4 last bind (MAC addresses).
The Telink SDK has a parameter - memory for the last 4 pairings.
From this we can conclude that the number of pairings is limited by the adapter or its driver. But both the operating system and the BLE extension code in Chrome are involved in the connection.
In the end, there is no exact answer.
The practice of using 5 different BT-USB adapters showed that only 1 bind device is supported. I made this check a year ago and changes are possible ...

@Matush8
Copy link
Author

Matush8 commented Sep 16, 2022

#174 (comment)

Thank you, this helped a lot.

On my second PC I was able to connect with one of these two devices. However, I wasn't able to repeat this on my primary laptop.
I repeated pairing process with the same result until I did this:

Settings - Bluetooth & other devices > ATC_...... click on Remove device

  • It was older device and not the one I wanted to connect

After this I was able to pair with another thermometer and once OS asks for a PIN code it has to be entered without delay.

I can confirm this is not related to firmware v3.8 but to Windows OS. Unfortunately, it simply ignore pairing with another BLE device with PIN and still using stored PIN no matter you are connecting with another device.

Thank you all for you inputs

@Matush8 Matush8 closed this as completed Sep 16, 2022
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