-
Hi All, As per the FAQ https://custom-components.github.io/ble_monitor/faq#how-to-get-the-mibeacon-v4v5-encryption-key I've had success with the LYWSD03MMC, but I'm finding that the TelinkFlasher https://atc1441.github.io/Temp_universal_mi_activate.html is hanging/timing out on the new XMWSDJ04MMC. Anyone seen this problem?
and then it unfortunately hangs. the logs show:
and the console shows:
Anyone else had luck with the XMWSDJ04MMC? Is there any step I'm missing? |
Beta Was this translation helpful? Give feedback.
Replies: 18 comments 37 replies
-
I don’t think this sensor is supported, it is not mentioned here |
Beta Was this translation helpful? Give feedback.
-
I wondered about that, yet Victor's repo has begun to have explicit support for it: I tried I'm wondering if there are hardware versions here as well, that might indicate why some units are working and others are not? |
Beta Was this translation helpful? Give feedback.
-
Ah, ok, didn't see that on the main page. I think its easier to ask on Victor's repo directly, he should be able to tell. |
Beta Was this translation helpful? Give feedback.
-
https://pvvx.github.io/XMWSDJ04MMC/XMWSDJ04MMC_Utils.html Before “Activating Mi”, you need to reset the binding to Mi Home by long pressing the button on the thermometer. To activate: If the buttons on the thermometer are pressed correctly, you will get: Console log:
There is an assumption that XMWSDJ04MMC switches to activation mode when it receives a request for an additional scan (associated with that MAC). XMWSDJ04MMC uses a new mi-activation variant. Built-in support for BT4+ adapters with a large MTU. Mi-Home, upon activation, does not check the readiness flag for activation, and there "dancing with a tambourine" and buttons for users is even more difficult. -- The MI-OTA procedure js code is required to complete the custom firmware for XMWSDJ04MMC. Everything else is already there and tested (I flashed it through a typical debug connector from SiLabs located on the thermometer's printed circuit board). |
Beta Was this translation helpful? Give feedback.
-
After a long delay, I tried it again.
And that's where it hangs. The logs say:
Is the |
Beta Was this translation helpful? Give feedback.
-
Item 3 didn't work. |
Beta Was this translation helpful? Give feedback.
-
OK, I tried this variation:
The Status says
5 times. The I tried this three times, with the same result each time :-/ EDIT: I tried on a different Android phone, with the same results. |
Beta Was this translation helpful? Give feedback.
-
I had similar problems in Mi-Home. |
Beta Was this translation helpful? Give feedback.
-
This action removes the binding to Mi-Home. Deletes the keys and the device status changes to "not registered".
This action puts the device into active BLE connection mode. If something described above is not done, then the registration commands will not be processed. Registration commands will remain unanswered, and the request will end with a timeout (minutes). |
Beta Was this translation helpful? Give feedback.
-
An example with completely erased Flash and writing only program code to the device. After activation, clicked "get" "Known Device ID". If the device has already been previously registered, then the known device ID will be the old one and the old value will be used. Reading the ID is possible with the "Get" button. But, when activated, you should not issue any commands. Otherwise, the sequence of the activation cycle is violated and activation is not possible. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanations. So the device id is not important in this case. I keep getting what seems like time-outs. I've turned off all computers that have BLE scanning, so the only device doing scanning is the phone in my hand. I get a good "Connected" status, but then the "Mi Activation" times out. If I have a good "Connected" status (including correct temperature readings) but the activation times out, what does that mean? The only reason I brought up the hardware versions is that I remember that LYWSD03MMC had multiple hardware versions show up in the wild and I thought maybe that could be a reason for a slight difference in behavior. BTW, at no point have I used the Mi app, which I assume is correct. But I just wanted to check. |
Beta Was this translation helpful? Give feedback.
-
Oh my god, I switched to a fourth computer, and it worked on the first try. The score card so far:
I put the bind key in the Home Assistant Passive BLE monitor integration and the thermometer is working well. What have we learned? That not all Chrome implementations, no matter how recent, work the same? Or is it likely to be the different BLE hardware on the different devices? Is there any sense in trying to dig a bit deeper in terms of what was causing time-out in the first two cases? |
Beta Was this translation helpful? Give feedback.
-
XMWSDJ04MMC uses Bluetooth 5+ and implements an activation algorithm with a transmit/receive packet size of more than 250 bytes. The old version, with a small MTU, is also supported.
Instability must be looked for in the MTU size negotiation on the connection. |
Beta Was this translation helpful? Give feedback.
-
Just for information to others reading this: I just tried successfully with a xiaomi note 8 pro. |
Beta Was this translation helpful? Give feedback.
-
I have the same issue, tried with Windows10 machine, MBP, KLIPAD phone, all stuck at the same step :
Got issues trying to activate it via the MiHome app as well, getting stuck at various steps. |
Beta Was this translation helpful? Give feedback.
-
Hello all, I just purchased a XMWSDJ04MMC sensor and wanted to add it to home assistant. I was hoping to install a custom firmware like on the old ones that I have, remove the encription key and perhaps use BTHome, but I have some issues understanding what to do. In the begining I started with telink flasher (https://atc1441.github.io/Temp_universal_mi_activate.html)... but got no where as the activation is not happening. For the XMWSDJ04MMC Utils, I kept the button pressed for 7 seconds, released, after display reset. I once again press the button for one or 2 seconds and after this press connect. It connects but then what?
thank you |
Beta Was this translation helpful? Give feedback.
-
I got it working. I used the linux token_extractor and got the bind key! The nice question now would be if there are any plans to make a custom firmware for this device! that would be nice actually! :) |
Beta Was this translation helpful? Give feedback.
-
The chip manufacturer (Silicon Labs) and Mijia uses a cryptographic signature for the OTA firmware. |
Beta Was this translation helpful? Give feedback.
Oh my god, I switched to a fourth computer, and it worked on the first try.
The score card so far:
I put the bind key in the Home Assistant Passive BLE monitor integration and the thermometer is working well.
What have we learned? That not all Chrome implementations, no matter how recent, work the same? Or is it likely to be the different BLE hardware on the different devices?
Is there any sense in trying to dig a bit deeper in terms of what was causing time-out in the first two cases?