Skip to content

Instantly share code, notes, and snippets.

@zvldz
Last active September 24, 2022 23:47
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save zvldz/b40b4873e3c4c1a64ac536e8ce5dbdad to your computer and use it in GitHub Desktop.
Save zvldz/b40b4873e3c4c1a64ac536e8ce5dbdad to your computer and use it in GitHub Desktop.
Updating mgl03 gateway firmware from telnet
@zvldz
Copy link
Author

zvldz commented Dec 29, 2020

Does the ble firmware update fail?

Sometimes it takes about 5 minutes.
The gateway does a firmware check at startup.
You can also try rebooting it.
There were times when firmware 1.4.6_0012 did not update.
I'll recheck if there's different path.

@zslibra
Copy link

zslibra commented Dec 29, 2020

hi zvldz,
Yes, I flash the firmware 1.4.6_0012..

@zvldz
Copy link
Author

zvldz commented Dec 29, 2020

I flash the firmware 1.4.6_0012..

In fw 1.4.6_0012 full.gbl must be moved to /data and reboot gw.

@zslibra
Copy link

zslibra commented Dec 29, 2020

I try to manual reboot the gw after 5 minutes, but /data/firmware/full.gbl file, still exist.

@zvldz
Copy link
Author

zvldz commented Dec 29, 2020

path to full.gbl on fw 1.4.6_0012
/data/full.gbl

@zslibra
Copy link

zslibra commented Dec 30, 2020

I try to mv full.gbl from /data/firmware/ to /data then reboot gw (on fw 1.4.6_0012), after reboot the /data/full.gbl not exist.

@zvldz
Copy link
Author

zvldz commented Dec 30, 2020

/data/full.gbl not exist

so firmware has been updated

@zslibra
Copy link

zslibra commented Dec 30, 2020

Oh yes, it may be more perfect to add BLE firmware path in firmware 1.4.6_0012 to mgl03_update.sh.
Thank you very much zvldz!

@Rai23nZ
Copy link

Rai23nZ commented Feb 28, 2021

Trying
wget -O /tmp/wget http://pkg.musl.cc/wget/mipsel-linux-musln32/bin/wget && chmod +x /tmp/wget
But get
Resolving pkg.musl.cc (pkg.musl.cc)... 104.232.42.245
Connecting to pkg.musl.cc (pkg.musl.cc)|104.232.42.245|:80... failed: Connection refused.

@wantsoftat
Copy link

Trying
wget -O /tmp/wget http://pkg.musl.cc/wget/mipsel-linux-musln32/bin/wget && chmod +x /tmp/wget
But get
Resolving pkg.musl.cc (pkg.musl.cc)... 104.232.42.245
Connecting to pkg.musl.cc (pkg.musl.cc)|104.232.42.245|:80... failed: Connection refused.

similar error

@zvldz
Copy link
Author

zvldz commented Feb 28, 2021

Yes, the site is down.
I'll update the link later

@zvldz
Copy link
Author

zvldz commented Mar 1, 2021

similar error

In this case, try command:

printf 'GET /files/curl HTTP/1.1\r\nHost: mipsel-ssl.vacuumz.info\r\nUser-Agent: Wget/1.20.3\r\nConnection: close\r\n\r\n' | openssl s_client -quiet -tls1_1 -connect mipsel-ssl.vacuumz.info:443 -servername mipsel-ssl.vacuumz.info | sed '/alt-svc.*/d' | tail -n +19 > /tmp/curl && chmod +x /tmp/curl
export PATH="$PATH:/tmp"

Then run first command again.

@RRozga
Copy link

RRozga commented Mar 2, 2021

Then run first command again.

curl -s -k -L -o /tmp/update.sh https://gist.github.com/zvldz/b40b4873e3c4c1a64ac536e8ce5dbdad/raw/mgl03_update.sh && sh /tmp/update.sh

@kingwap99
Copy link

run this command
wget -O /tmp/wget http://pkg.musl.cc/wget/mipsel-linux-musln32/bin/wget && chmod +x /tmp/wget

and got the error as below

Connecting to pkg.musl.cc (104.232.42.245:80)
wget: server returned error: HTTP/1.1 404 Not Found

@zvldz
Copy link
Author

zvldz commented Apr 28, 2021

@AquaCobell
Copy link

Can someone help me, whats wrong there?
miiocli device --ip 192.168.188.43 --token hereismytoken raw_command set_ip_info '{"ssid":"\"\"","pswd":"123123 ; passwd -d admin ; echo enable > /sys/class/tty/tty/enable; telnetd"}'

I always get

Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\Scripts\miiocli.exe\__main__.py", line 7, in <module>
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\miio\cli.py", line 66, in create_cli
    return cli(auto_envvar_prefix="MIIO")
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\miio\click_common.py", line 51, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1655, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 920, in make_context
    self.parse_args(ctx, args)
  File "C:\Users\Nico\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1378, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment