Code Monkey home page Code Monkey logo

mgl03_fw's Introduction

Thanks to Buy Me A Coffee

mgl03_fw's People

Contributors

zvldz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mgl03_fw's Issues

All zigbee device disconnect

Hi, please can someone advise.
After the update. (respectively downgrade of the firmware from v1.5.0_0027 to v1.5.0_0026) all zigbee devices were disconnected. I also left enough time to join. With no result. Is there any possibility that it will reconnect at once or do I have to reset all devices one by one and reconnect?

Should I already take this difficult step, is it worth switching the gateway to zigbee2mqtt?
Thank you for your response.

how to rollback to factory default firmware?

I just installed the firmware provided here.
but there seems something wrong, because I cannot add any zigbee devices from HA and Mi home app.
such as when I switch it to zigbee2mqtt or mi home, I got an error message "Unknown error occurred"
all I can do is switched to zha mode, but this mode cannot be added any zigbee devices.

so Is there any way to rollback to factory default firmware to restart everything again

monit binary

Hi. Please add monit binary to your firmware https://mmonit.com/monit/
Possible use cases:

  • test if socat is running and restart it in case of process absence
  • test network connectivity and restart wifi in case of failure
  • monitor /var/log/message and do some actions
  • etc

What features does it provides compared to stock fw

Currently I am using stock firmware with the Home Assistant and seems to be working ok. Sometimes I have problems if power goes down and I have manually reopen telnet. So, I wonder what main differences this custom firmware has compared to original stock firmwares?
And if I understand correctly even if I flash with this custom firmware the MI home will continue to work?

1.4.6 and 1.5.0 differences

HI. Can sombebody help me, that what are the differences between 1.4.6_0012 vs 1.5.0_0026?

Both are used as main fw in AlexxIT XiaomiGateway3 HA component.
Now a use the 1.4.6_0012 mod version, but since a few days my devices got offline, and i couldn't reconnect it.

Is there any improvement in 1.5.0 fw? What new in this fw? (I could find information )
Thanks

Unable to connect the gateway to WiFi after fw rewrite

Hi guys,
I've followed the procedure to rewrite the firmware using rtkboot_115200.bin and mgl03_1.4.7_0160_mod20210309.uart files.
The procedure went fine but unfortunately I'm unable to connect the gateway to my WiFi - the Mi Home phone app sees the gateway but it doesn't connect to the access point.
Any idea how to solve this issue?
Thanks

Unable to flash custom firmware for Xiaomi Multimode Gateway 2 CN (DMWG03LM)

Not sure why, this does not happen on my Xiaomi Multimode Gateway 1 CN (ZNDMWG03LM)

image

/home # wget -O /tmp/curl "http://master.dl.sourceforge.net/project/mgl03/bin/cu
rl?viasf=1" && chmod +x /tmp/curl
Connecting to master.dl.sourceforge.net (216.105.38.12:80)
curl 100% |*******************************| 2271k 0:00:00 ETA
/home # export PATH="$PATH:/tmp"
/home # curl -s -k -L -o /tmp/update.sh https://raw.githubusercontent.com/zvldz/
mgl03_fw/main/firmware/mgl03_update.sh && sh /tmp/update.sh
/tmp/curl: line 1: syntax error: unexpected "("
/home #

No space under /tmp to use

First I wget the firmware zip to /tmp and it stucks during unzip. Command df shows there is no space anymore. Strange thing is that I can not find the zip file or the unzipped (if any) files under /tmp. Is it safe to leave mount point / with no space?

Can I use /data/miio to unzip the firmware zip file and flush the bin files from there?

Filesystem           1024-blocks    Used Available Use% Mounted on
/dev/root                10368     10368         0 100% /
ubi0_0                   46904     12628     31848  28% /data
/data/miio               46904     12628     31848  28% /data/miio

Which files are safe to delete?

# du -d1
19345   ./bin
18276   ./data
0       ./dev
589     ./etc
0       ./home
21036   ./lib
0       ./mnt
0       ./proc
0       ./sys
1355    ./usr
560     ./var
61160   .

Wrong firmware file header...trying to flash via UART

Hello:
my xiaomi gateway 3 has a firmware with version 1.5.1_0032 it doesn't have its telnet port open so in order to get it working in Home Asisstant I'm trying to flash it to mod version 1.5.0_0102 so I follow the instructions written in https://github.com/serrj-sv/lumi.gateway.mgl03/tree/main/uart_recovery as follows:

1.Download mgl03_uart_recovery.ttl
2.Download and install Tera Term
3.Run Tera Term
4.Choose "Serial -> COM port", OK
5.Choose "Control -> Macro"
6.Open .mgl03_uart_recovery.ttl file you downloaded in step [1]
7.Follow on-screen instructions
8.Perform Factory Reset: after Gateway fully booted click on it's button 10 times repeatedly.

When I get to point 7 Teraterm shows the following message: "Please choose corresponding firmware (mgl03_xxxxxxxxx.uart)"
Then I click in the file root_1.5.0_0102_mod20210816.bin extracted from the zip file. Then Teraterm show me the message "Wrong firmware file header!"
What am I doing wrong?

Thanks to all in advance

Can't flash Zigbee Firmware

Hi!
Trying to update the Zigbee Fimware fails both from the Xiaomi3 HA Integration and telnet and I think I bricked it since zigbee2mqtt can't connect anymore.
Output from telnet firmware update attempt:
# sh /tmp/mgl3_zigbee_flash.sh

Xiaomi Gateway 3 (mgl3) Zigbee firmware flashing script

Found firmware files: 1: ncp-uart-sw_mgl03_6_6_2_stock.gbl 2: ncp-uart-sw_mgl03_6_7_10_z2m.gbl 3: ncp-uart-sw_mgl03_6_7_8_z2m.gbl Select firmware: 2
You selected: ncp-uart-sw_mgl03_6_7_10_z2m.gbl

Preparing Killing default zigbee software killall: socat: no process killed killall: daemon_app.sh: no process killed Done

Press Ctrl+C to cancel in 5 seconds!

Detected EZSP v7 Rebooting to bootloader Sending upload command Sending ncp-uart-sw_mgl03_6_7_10_z2m.gbl, 1548 blocks: Give your local XMODEM receive command now. Xmodem sectors/kbytes sent: 0/ 0kRetry 0: Got 65 for sector ACK Retry 0: NAK on sector Xmodem sectors/kbytes sent: 122/15kRetry 0: Got 0d for sector ACK

The gateway is not added to the Mi Home if the region China is selected

I installed the stock firmware (firmware/stock/mgl03_1.5.0_0102/) on my gateway, now I can add a gateway to Mi Home only if the region of Russia is selected, if I choose the region of China, then the process of adding to Mi Home is not completed, how can I fix it? all other devices I have in the China region.

workaround wget/curl issues

I was trying to follow the tutorial to update my gateway, but I found a problem.

When running the commands, the network would not find the files to be downloaded, I don't know why, but it would try to use IPv6 instead of IPv4 and say that the network is unavailable.

From the gateway telnet I could ping and do HTTP requests to the Home Assistant.

My workaround solution was to enable the www folder in the /config of the Home Assistant, then download the script to that folder, then use wget http://<hass_ip_address>:8123/local/mgl03_update.sh then execute the script.

This way it worked for me.

Thanks for the wonderful work, I hope this instruction can contribute to anyone that is having the same issue as I was.

1.5.4_0052

the new version is 1.5.4_0052 can i update ?,,thx

Xiaomi gateway 3 ethernet

Hello. Thank you for your work.
I soldered the rj45 connector to Xiaomi Gateway 3. But I can’t figure out how to make the gateway automatically connect to ethernet instead of wifi. There is only one way on the ethernet using telnet, but it does not suit me, because after each restart I need to enter this command. How can I change the firmware of the gateway so that it automatically turns on ethernet?
Thanks

Openwrt on RTL8197F?

Seems like openwrt has been officially ported to RTL8197F. Did anyone try to build image for mgl03? It'd be great to have more control over this little device.

Updating zigbee firmware of mgl03 gateway via telnet for Zigbee2MQTT

Hello, good morning, I can't update Gateway 3 with firmware for Zigbee2MQTT, it doesn't give any error, but it doesn't continue, I attach a screenshot.
Is it better to use this firmware to use Zigbee2MQTT right now I have mgl03_1.5.0_0102_mod20210816 ?
Thank you so much
update

A few questions

  1. What happens if I update the firmware of the gateway in Mi home? Will the hack be gone and I have to wait for the new version of hack? Currently the connections are stable with version 1.5.0_0102, just curious about how the firmware update works.

  2. Currently the latest version is 150, but according to the scripts below, version 123 is used instead. Is it intended?

BLE_VER=$(grep -oe '1\.[23]\..' /tmp/full*gbl | sed 's/\.//g')
if [ -z $BLE_VER ]; then
    echo "! BLE firmware version is not detected. Use 125."
    BLE_VER=123
fi
  1. I take a look at the shell and it seems what matters is the invocation of run_ble_dfu.sh and fw_update. So maybe on the hard way I just need to wget the 3 files from an outer web server and flush them?

Correct way to reset Gateway

Hello.
Can you please tell me how to reset the device with cleaning the file system? Pressing the button ten times does not clear the file system.
The problem I have is that after removing the Zigbee devices, I cannot add them to MiHome again.
The same devices work through a gateway with @AlexiT integration for support zigbee2mqtt.

RCP zigbee firmware

Do anyone know which pins EFR32MG is using on mgl03 for UART? I'm trying to convert this gateway from NCP to RCP and I don't want to brick a zigbee module.

Official firmware update

I do not need to use the device in HA anymore, so I flashed stock 1.5.4 firmware via SSH. But still I can not update it to latest official version via mihome app. What should I do to fix it?

Gateway and zigbee offline after update

Hi,

Tried af couple of times to update via telnet from mgl03_1.5.1_0032_mod20211108 to mgl03_1.5.4_0052_mod20220221

After updating the gateway and all the zigbee units are offline Mi Home app.
Tried to reset gateway - but it does not even respond to 10 sek. press. It beeps but does not reset proparly. Gateway is connectable via Telnet - so i've downgraded to mgl03_1.5.1_0032_mod20211108 again. Now everything is online in the app again.

Any suggestions?

BR
drrosens

telnet not starting after failed ncp-uart-sw_mgl03_6_6_2_stock.gbl flash

I tried to revert to original firmware without success and after reboot telnet does not start:

Found firmware files:
1: ncp-uart-sw_mgl03_6_6_2_stock.gbl
2: ncp-uart-sw_mgl03_6_7_10_z2m.gbl
3: ncp-uart-sw_mgl03_6_7_8_z2m.gbl
Select firmware: 1
You selected: ncp-uart-sw_mgl03_6_6_2_stock.gbl

Preparing
Killing default zigbee software
killall: socat: no process killed
killall: daemon_app.sh: no process killed
killall: Lumi_Z3GatewayHost_MQTT: no process killed
Done

Press Ctrl+C to cancel in 5 seconds!

Detected EZSP v7
Rebooting to bootloader
Sending upload command
Sending ncp-uart-sw_mgl03_6_6_2_stock.gbl, 1443 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 0/ 0kRetry 0: Got 65 for sector ACK

and it freezed. After reboot telnet does not start on gateway, I can't connect, only ping works... I think I bricked it...
I tried to reset it pressing button for 10s, I discovered it in Mi home, configured wifi, but telnet still does not start. It works with Mi home, but I can't connect using telnet and use in HomeAssistant. I also cannot flash it from Mi home, because it displays that I'm using latest version... Can I do something more?

Telnet connection refused

Hello,

Putty refuses to connect through telnet, i am using port 23 and the right IP, from 3 devices the gateway is pingable.
Telnet by Home Assistant is open so it should accept the connection.

What am i doing wrong?

Screenshot from 2023-05-21 16-39-31
Screenshot from 2023-05-21 16-41-22
Screenshot from 2023-05-21 16-41-31

I don't know what have I done,

I have upgrade to modified FW mgl03_1.5.0_0026,
I tried find some sh by find / -name .sh and run it then I found my gateway was offline from MiApp,
my gateway LED no longer in blue, it's in yellow blinking, how can I fallback?

also why telnet will get freeze if I run some command, or even only ls /bin or cat a file?

thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.