Closed n3rd4i closed 1 year ago
I suspect this might have to do with some missing python dependency ?
user@home:~/bluez$ pip freeze | grep miauth
miauth==0.9.6
I forgot to mention that I had to upgrade my dashboard from M365 to M365 PRO variant. This is a clone dashboard (for a XM365 PRO). It implements Nordic's NUS.
@n3rd4i Sorry for the late reply. The pip package did not contain the latest repo code. I have pushed a new pip version, please upgrade your miauth
package with pip install -U miauth
to version 0.9.7 and check if the issue still exists. Thanks!
Ok, with version 0.9.7 I've tried (kind of works now), command:
miauth -m -f -s AA:BB:CC:DD:EE:FF
When success I get:
Namespace(command=None, fwver=True, m365=True, mac='AA:BB:CC:DD:EE:FF', nb=False, register=False, register_did=None, serial=True, token_file='./mi_token', verbose=False)
Connecting
enabling notifications for: 6e400003-b5a3-f393-e0a9-e50e24dcca9e
enabling notifications for: None
found old 55ab encryption -> recovering key
Retrieving serial number
Serial no.: 12345/12345678
Retrieving firmware version
Firmware version: 85.5
Disconnecting
Sometimes I get:
Namespace(command=None, fwver=True, m365=True, mac='AA:BB:CC:DD:EE:FF', nb=False, register=False, register_did=None, serial=True, token_file='./mi_token', verbose=False)
Connecting
enabling notifications for: 6e400003-b5a3-f393-e0a9-e50e24dcca9e
enabling notifications for: None
found old 55ab encryption -> recovering key
Retrieving serial number
Traceback (most recent call last):
File "/home/user/.local/bin/miauth", line 8, in <module>
sys.exit(main())
File "/home/user/.local/lib/python3.8/site-packages/miauth/cli.py", line 152, in main
m365_main(ble)
File "/home/user/.local/lib/python3.8/site-packages/miauth/cli.py", line 89, in m365_main
resp = mc.comm("55aa032001100e")
File "/home/user/.local/lib/python3.8/site-packages/miauth/mi/m365client.py", line 104, in comm
raise Exception("Checksum mismatch in response")
Exception: Checksum mismatch in response
I don't know if this the above is a problem or not, but the whole idea is to get battery SOC so I can shutoff charging if is 80%.
I'm thinking I need, -c but I've no clue what COMMAND
actually is, where can I find docs about it?
-c COMMAND, --command COMMAND
send command (w/o checksum) to uart and print reply
The output of the command
miauth -m -d -s -v -r AA:BB:CC:DD:EE:FF