dnandha / miauth

Authenticate and interact with Xiaomi devices over BLE
GNU Affero General Public License v3.0
28 stars 10 forks source link

Add spaces to printed data #4

Closed The-Compiler closed 2 years ago

The-Compiler commented 2 years ago

e.g.:

>>> data = bytes.fromhex("b5dca0aec31a8932d0f53cbcbcf0cfdd833c355cada1025cc076e013439ddec2b4017b546a11d79a758db9d015a2ed8926cf82179b593679187d623b5e430fca")
>>> data.hex()
'b5dca0aec31a8932d0f53cbcbcf0cfdd833c355cada1025cc076e013439ddec2b4017b546a11d79a758db9d015a2ed8926cf82179b593679187d623b5e430fca'

vs.

>>> data.hex(" ")
'b5 dc a0 ae c3 1a 89 32 d0 f5 3c bc bc f0 cf dd 83 3c 35 5c ad a1 02 5c c0 76 e0 13 43 9d de c2 b4 01 7b 54 6a 11 d7 9a 75 8d b9 d0 15 a2 ed 89 26 cf 82 17 9b 59 36 79 18 7d 62 3b 5e 43 0f ca'

I'm currently contemplating whether to port the implementation to my Garmin smartwatch (and their own programming language...), and this made it a bit easier to try and understand the whole communication.