dgiese / dustcloud

Xiaomi Smart Home Device Reverse Engineering and Hacking
GNU General Public License v3.0
2.22k stars 255 forks source link

Cannot get my mi robot to flash #264

Closed Deepdelver closed 4 years ago

Deepdelver commented 4 years ago

Hi, first thnx for your great work! I'm running ubuntu, but i cannot get firmware flash to work.

mirobo --debug discover --handshake true INFO:miio.vacuum_cli:Debug mode active INFO:miio.device:Sending discovery to <broadcast> with timeout of 5s.. DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b'' DEBUG:miio.device:Got a response: Container: data = Container: data = b'' (total 0) value = b'' (total 0) offset1 = 32 offset2 = 32 length = 0 header = Container: data = b'!1\x00 \x00\x00\x00\x00\x0f\x95\x91\xe4\x00\x00\xa5\x88' (total 16) value = Container: length = 32 unknown = 0 device_id = unhexlify('0f9591e4') ts = 1970-01-01 11:46:16 offset1 = 0 offset2 = 16 length = 16 checksum = b'HrY5JnlSNOeHQeTA' (total 16) INFO:miio.device: IP 192.168.8.1 (ID: 0f9591e4) - token: b'487259354a6e6c534e4f654851655441' INFO:miio.device:Discovery done

mirobo --ip 192.168.8.1 --token 487259354a6e6c534e4f654851655441 update-firmware ~/Downloads/v11_003468.pkg Going to update from /home/frank/Downloads/v11_003468.pkg INFO:miio.updater:Serving on 0.0.0.0:39267, timeout 10 INFO:miio.updater:Using local /home/frank/Downloads/v11_003468.pkg (md5: 0e826a71550cf7b9e5ec68a4b8cd3910) Hosting file at http://192.168.8.169:39267/v11_003468.pkg ERROR:miio.protocol:unable to parse json '': Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "/home/frank/.venv/bin/mirobo", line 11, in <module> sys.exit(cli()) File "/home/frank/.venv/lib/python3.6/site-packages/miio/click_common.py", line 59, in __call__ return self.main(*args, **kwargs) File "/home/frank/.venv/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/frank/.venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/frank/.venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/frank/.venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/frank/.venv/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/home/frank/.venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/frank/.venv/lib/python3.6/site-packages/miio/vacuum_cli.py", line 609, in update_firmware update_res = vac.update(url, md5) File "/home/frank/.venv/lib/python3.6/site-packages/miio/device.py", line 363, in update return self.send("miIO.ota", payload)[0] == "ok" File "/home/frank/.venv/lib/python3.6/site-packages/miio/device.py", line 278, in send self.__id = m.data.value["id"] TypeError: 'NoneType' object is not subscriptable Can you please help me? I used the cloud builder with the recommended, v1 version.

Deepdelver commented 4 years ago

Problem was that my vacuum has firmware 4004, reset to factory solved the problem.