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

Handle Value Notification (UART) decode logic not working #10

Open
letoth opened this issue Aug 10, 2022 · 3 comments
Open

Handle Value Notification (UART) decode logic not working #10

letoth opened this issue Aug 10, 2022 · 3 comments

Comments

@letoth
Copy link

letoth commented Aug 10, 2022

First of all fantastic job you made with miauth! it works with Xiaomi HOTO smart kitchen scale too :)
However after successful state 5, the scale sends notifications which I am not able to decode anyhow.....
tried your UART decode logic, but it does not work :(

Could you please have a quick look, and you might be able to guess how to decode the values ? see the attached log

hoto1.log

@dnandha
Copy link
Owner

dnandha commented Aug 11, 2022

@letoth That's awesome. Thanks for testing miauth with your device!

The UART log you got from the HOTO device looks quite rudimentary: First two bytes simply count up the packet number (iterator), the rest is the encoded message using the iterator as salt - maybe a checksum in the end.

Without having any knowledge about the device, my guess is that it could be possible to decrypt the traffic when you change the decrypt_uart function to something like this (removing header and shifting the arrays):

def decrypt_uart(key, iv, msg):
        it = msg[:3]
        ct = msg[3:-2]
        ...

If this doesn't work, further investigation would be required. Without the device that is not possible for me.

@arjan-kuiper
Copy link

@letoth were you able to decode the notification at this point?

@letoth
Copy link
Author

letoth commented Nov 28, 2022

@arjan-kuiper > no :( but if you could, I would appreciate some hint :)

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