Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support Xiaomi Multimode Gateway 2 on firmware 1.0.7 #1166

Closed
rumianoesa opened this issue Oct 13, 2023 · 137 comments
Closed

Fix support Xiaomi Multimode Gateway 2 on firmware 1.0.7 #1166

rumianoesa opened this issue Oct 13, 2023 · 137 comments
Labels
question Further information is requested

Comments

@rumianoesa
Copy link

Is it supported?

@simkcy
Copy link

simkcy commented Oct 13, 2023

waiting for update

@isilcala
Copy link

I just upgraded and the telnet stopped working, therefore I lost all the zigbee devices in HA.

@AlexxIT AlexxIT added the question Further information is requested label Oct 14, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

Theoretically it can be supported via key. But only for users who has key for gateway

@isilcala
Copy link

I do have a key and it was working fine, until the upgrade. Did you mean the key might have changed during the upgrade?

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2023

Key and token are different things. Key never changes, token changes with every new setup

@YikLiu93
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

@wittyfilter
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

Same here, and I didn't find a way to downgrade it.

@billwong1113
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

Same here, and I didn't find a way to downgrade it.

我马上去买了一个备用,怕以后买不到1.0.6的版本了

@YikLiu93
Copy link

这么卷吗,大佬们应该会更新吧

@rickyho1555
Copy link

全部用不了,希望大佬们更新吧

@izonekers
Copy link

话说那个KEY是怎么来的?现在还能获取吗?上面不是说有key就能连?

@YikLiu93
Copy link

话说那个KEY是怎么来的?现在还能获取吗?上面不是说有key就能连?

点开之前配置里面喔发现有key,但是也没有效果,还是提示telnet的问题

@YikLiu93
Copy link

话说那个KEY是怎么来的?现在还能获取吗?上面不是说有key就能连?

提示错误的打开telnet的命令

@GanChangAn
Copy link

I woke up this morning and found that the automatic update was updated, and now all Bluetooth mesh devices are no longer available, I don't know when there will be an update, or is there a way to downgrade?

Same here, and I didn't find a way to downgrade it.

我马上去买了一个备用,怕以后买不到1.0.6的版本了

哈哈~~~销量+1

@bingoscc
Copy link

狗东重新买了一个拿出来 把之前的装进去七天无理由了 刚用了一个来月就赶上这波更新T^T
新的到手1.03 暂时对新设备没需求就这这么提心吊胆的用着先。。。

@0v3rW4tch
Copy link

啥时候能有更新呢?或者说解决方案?

@YikLiu93
Copy link

狗东重新买了一个拿出来 把之前的装进去七天无理由了 刚用了一个来月就赶上这波更新T^T
新的到手1.03 暂时对新设备没需求就这这么提心吊胆的用着先。。。

啊你这。。。。。。

@z799631318
Copy link

唉,啥时候才能跟新啊,我的蓝牙按钮一直在失控状态

@ghggn
Copy link

ghggn commented Oct 27, 2023

Theoretically it can be supported via key. But only for users who has key for gateway

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet"
is that mean if i have no key , i can't add gateway 2 to HA anymore?
is it possible to add gateway 2 to HA without a key in future?

thank for your work, it's great.

@zhcong
Copy link

zhcong commented Oct 27, 2023

Theoretically it can be supported via key. But only for users who has key for gateway

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet" is that mean if i have no key , i can't add gateway 2 to HA anymore? is it possible to add gateway 2 to HA without a key in future?

thank for your work, it's great.

1.0.7 version closed telnet? is that mean no way to gain token?

@zhcong
Copy link

zhcong commented Oct 27, 2023

other way for control ble/zigbee device is xiaomi_miot. But device switch slow because in cloud model.

@z799631318
Copy link

控制 ble/zigbee 设备的另一种方式是 xiaomi_miot。但设备切换速度较慢,因为在云模型中。

我就是用的这种方法但是蓝牙mash的开关不能用

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 27, 2023

If you has gateway previously in Hass, than you should have a key in config folder. If you doesn't have a key - there is no known method to open telnet.

@zhcong
Copy link

zhcong commented Oct 28, 2023

控制 ble/zigbee 设备的另一种方式是 xiaomi_miot。但设备切换速度较慢,因为在云模型中。

我就是用的这种方法但是蓝牙mash的开关不能用

我也有一个人体感应开关,走米家的智能场景了。后面打算换掉这个,都用以使用mqtt。

@maodun96
Copy link

Theoretically it can be supported via key. But only for users who has key for gateway理论上可以通过key支持。但仅适用于拥有网关密钥的用户

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet"我在提交列表中看到它现在支持 1.0.7 版本,但我没有在配置日志中提交的密钥,它仍然显示“错误的 telnet” is that mean if i have no key , i can't add gateway 2 to HA anymore? 这是否意味着如果我没有密钥,我就无法再将网关 2 添加到 HA 了? is it possible to add gateway 2 to HA without a key in future? 将来是否可以在没有密钥的情况下将网关 2 添加到 HA?

thank for your work, it's great.谢谢你的工作,太棒了。

Theoretically it can be supported via key. But only for users who has key for gateway

i seen it support 1.0.7 version now in commit list, but i have no key to submit in config dailog, it still show "wrong telnet" is that mean if i have no key , i can't add gateway 2 to HA anymore? is it possible to add gateway 2 to HA without a key in future?

thank for your work, it's great.

The integration also automatically saves the key to the following places:
集成还会自动将密钥保存到以下位置:

/config/.storage/core.config_entries
/config/.storage/xiaomi_gateway3/keys.json

AlexxIT/Blog#13

@maodun96
Copy link

有没有已经升上去的兄弟试试,密钥路径在
/config/.storage/core.config_entries
/config/.storage/xiaomi_gateway3/keys.json

我是在第一个文件里找到,搜你原来设定成功时网关的IP。
按作者说的,这个密钥是永不改变的。如果有人重新连上了麻烦回复下我。我想升级又有点怂。

@maodun96
Copy link

@z799631318
Copy link

@zhcong @rickyho1555 @z799631318 @0v3rW4tch @YikLiu93 @izonekers
我key和token都获取到了Add Gateway using Token里填完之后还是报错误的打开telnet命令

@maodun96
Copy link

@zhcong @rickyho1555 @z799631318 @0v3rW4tch @YikLiu93 @izonekers
我key和token都获取到了Add Gateway using Token里填完之后还是报错误的打开telnet命令

谢谢老哥,我赶紧停下了升级的想法!

@niceboygithub
Copy link

niceboygithub commented Jan 20, 2024

总结一下我的方法,根据楼上使用方法 5-2-2-2-2-2 在我的小米多模网关2中开启telnet后,用putty连接到网关之后,用户名是root,没有密码,输入命令agetprop | grep miio就能获取到key,然后就可以添加到ha了

Uploading {0AE2CD88-2FF0-AD36-BAA0-9E4914B812C5}.png…

The password of your gateway was removed by XG3 before so you can login without password after re-enable telnet.

Every gateway has generated different password when shipped out from manufacturer.(Expect the gateways were shipped before 2019, the oldest gateway used the account/password in admin/admin)

@MrGuAm
Copy link

MrGuAm commented Jan 20, 2024

@MrGuAm 总结一下我的方法,根据楼上使用方法 5-2-2-2-2-2 在我的小米多模网关2中开启telnet后,用putty连接到网关之后,用户名是root,没有密码,输入命令agetprop | grep miio就能获取到key,然后就可以添加到ha了 Uploading {0AE2CD88-2FF0-AD36-BAA0-9E4914B812C5}.png…

你的网关之前成功连接过HA? 我的到手1.07, 5-2... 打开telnet,用putty连接,输入用户名root后,登陆失败 密码不能为空。

对的,我之前是连接过ha的,因为换设备了,之前的ha没有备份,也尝试过重置网关

@dukeiii
Copy link

dukeiii commented Jan 21, 2024

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.

The UART method worked for me as well, brand new gateway with firmware 1.07, never connected before.
A few reminders for beginners (Yes I made these mistakes, fortunately, bf it's too late and everything still works)

  1. The backplate is held down by two screws under the rubbery piece. (Only realized it halfway trying to pry open the backplate by force, phew...)
  2. Soldering was straightforward, the wiring sequence from the board to UART programmer should be Gnd-Gnd, Rx-Tx, Tx-Rx (quite obvious, just for someone new to this like me)
  3. Get the token and the key following the Tera Term session. You might need to correct the token besides having the key, while completing the GW3 integration.

IMG_4403

@sulliwane
Copy link

Naive question: How to avoid Xiaomi Multimode gateway 2 from upgrading to another newer firmware in the future? (otherwise doesn't seem sustainable to solder UART every time it auto updates no?)

@juren8848
Copy link

幼稚的問題:如何避免小米多模網關 2 將來升級到另一個更新的固件?(否則,每次自動更新時焊接 UART 似乎都不可持續,不是嗎?

米家APP里有设置,禁止自动升级固件

@drakut
Copy link

drakut commented Jan 29, 2024

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.

The UART method worked for me as well, brand new gateway with firmware 1.07, never connected before. A few reminders for beginners (Yes I made these mistakes, fortunately, bf it's too late and everything still works)

  1. The backplate is held down by two screws under the rubbery piece. (Only realized it halfway trying to pry open the backplate by force, phew...)
  2. Soldering was straightforward, the wiring sequence from the board to UART programmer should be Gnd-Gnd, Rx-Tx, Tx-Rx (quite obvious, just for someone new to this like me)
  3. Get the token and the key following the Tera Term session. You might need to correct the token besides having the key, while completing the GW3 integration.

IMG_4403

Thank you for hope )
So:

  1. I've bought controller USB-TTL (USB-UART) on chip FT232RL, like in this article; Used 3.3V on plate-switch to make 3.3V between Tx и Gnd. I found it's characteristics firtsly in google by photo, after on Ali by founded goods. So I've bought analog in nearly shop.
  2. I've made cable like this scheme.
  3. I've downloaded TeraTerm from official site, version 5.1, because other links were not workable.
  4. I've powered off my Xiaomi-Gateway and connected it to controller with my self-made cable. Connected conroller to my PC Windows by USB-type-C.
  5. I've started TeraTerm, but I didn't see correct port in list for "COM"-option. I thought that there must be some element in list with word "USB". I choosed COM1. When I started macros gw_global_tool.ttl ("Control -> Macro") I choosed xiaomi multimode gateway 2 hub e1, but my gateway is Xiaomi Smart Multi Mode Gateway 2 (DMWG03LM).
  6. I powered ON my Xiaomi Smart Multi Mode Gateway 2 as were in instruction on screen afterrunning macro.
  7. Nothing happened in TeraTerm...

Questions, help me please:

  1. Is the controller selected correctly? May be I need another (CH340G, CP2102, PL2303, CH340, CH9102X... other)?
  2. Is my TeraTerm usable for these operations? Tried version 4.108 - the same "nothing result"
  3. Voltage 3.3V is right?
  4. The choice (gateway 2 hub e1) after starting macros was right?

Friends, please be more lenient towards newbies in flashing and do not skimp on details.

@dukeiii
Copy link

dukeiii commented Jan 30, 2024

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.

The UART method worked for me as well, brand new gateway with firmware 1.07, never connected before. A few reminders for beginners (Yes I made these mistakes, fortunately, bf it's too late and everything still works)

  1. The backplate is held down by two screws under the rubbery piece. (Only realized it halfway trying to pry open the backplate by force, phew...)
  2. Soldering was straightforward, the wiring sequence from the board to UART programmer should be Gnd-Gnd, Rx-Tx, Tx-Rx (quite obvious, just for someone new to this like me)
  3. Get the token and the key following the Tera Term session. You might need to correct the token besides having the key, while completing the GW3 integration.

IMG_4403

Thank you for hope ) So:

  1. I've bought controller USB-TTL (USB-UART) on chip FT232RL, like in this article; Used 3.3V on plate-switch to make 3.3V between Tx и Gnd. I found it's characteristics firtsly in google by photo, after on Ali by founded goods. So I've bought analog in nearly shop.
  2. I've made cable like this scheme.
  3. I've downloaded TeraTerm from official site, version 5.1, because other links were not workable.
  4. I've powered off my Xiaomi-Gateway and connected it to controller with my self-made cable. Connected conroller to my PC Windows by USB-type-C.
  5. I've started TeraTerm, but I didn't see correct port in list for "COM"-option. I thought that there must be some element in list with word "USB". I choosed COM1. When I started macros gw_global_tool.ttl ("Control -> Macro") I choosed xiaomi multimode gateway 2 hub e1, but my gateway is Xiaomi Smart Multi Mode Gateway 2 (DMWG03LM).
  6. I powered ON my Xiaomi Smart Multi Mode Gateway 2 as were in instruction on screen afterrunning macro.
  7. Nothing happened in TeraTerm...

Questions, help me please:

  1. Is the controller selected correctly? May be I need another (CH340G, CP2102, PL2303, CH340, CH9102X... other)?
  2. Is my TeraTerm usable for these operations? Tried version 4.108 - the same "nothing result"
  3. Voltage 3.3V is right?
  4. The choice (gateway 2 hub e1) after starting macros was right?

Friends, please be more lenient towards newbies in flashing and do not skimp on details.

Check the device manager in your computer. see if the USB-serial com port was setup correctly, it might need additional drivers to work.

@ymj0424
Copy link

ymj0424 commented Jan 30, 2024

@dukeiii @niceboygithub
I connected my Gateway2 by UART, downloaded gw_global_tool and followed the instructions.
Here's the output:

== Gateway Global Tool version:20231019==

   >>Power ON Gateway NOW!<<


IPL gdf99011
D-17
HW Reset
9c80916d 20000a4f
Resume? N, addr 20000a4f
miupll_233MHz
SPI 54M
128MB
BIST0_0001-OK
SPI 54M
[BBT] Found table @ 0x00020000

Checksum OK

IPL_CUST gdf99011
Export ENV 1



U-Boot 2015.01 (May 16 2022 - 18:08:06)

Version: P3g0aab5db
I2C:   ready
DRAM:
WARNING: Caches not enabled
SPINAND_I:  [FLASH] Found SNI in block 0.
[FLASH] dev_id = 0xee
[FLASH] mfr_id = 0xa1, dev_id= 0xe4 id_len = 0x2
[SPINAND] RFC ues command 0x6b with 0x08 dummy clock.
[SPINAND] Program load with command 0x32.
[SPINAND] Random load with command 0x34.
[FLASH] Unlock all block.
[FLASH] Use BDMA.
128 MiB
MMC:   MStar SD/MMC: 0
ENV: offset = 0x480000 size = 0x40000
ENV1: offset = 0x4c0000 size = 0x40000
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
clk=12M, u16Div=0 u32Duty=0x2cf u32Period=0x4af
[halPWMPadSet][107] (pwmId, padId) = (1, 5)
clk=12M, u16Div=0 u32Duty=0x4af u32Period=0x4af
[halPWMPadSet][107] (pwmId, padId) = (2, 6)
clk=12M, u16Div=0 u32Duty=0x4af u32Period=0x4af
[halPWMPadSet][107] (pwmId, padId) = (3, 7)
gpio debug MHal_GPIO_Pad_Set: pin=43
gpio[43] is 1
gpio debug MHal_GPIO_Pad_Set: pin=44
gpio[44] is 1
gpio debug MHal_GPIO_Pad_Set: pin=59
gpio[59] is 0
gpio debug MHal_GPIO_Pad_Set: pin=62
gpio[62] is 1
gpio debug MHal_GPIO_Pad_Set: pin=63
gpio[63] is 0
gpio debug MHal_GPIO_Pad_Set: pin=61
gpio[61] is 1
gpio debug MHal_GPIO_Pad_Set: pin=60
gpio[60] is 1
gpio debug MHal_GPIO_Pad_Set: pin=44
gpio[44] is 0
gpio debug MHal_GPIO_Pad_Set: pin=63
gpio[63] is 1
gpio debug MHal_GPIO_Pad_Set: pin=59
gpio[59] is 1
gpio debug MHal_GPIO_Pad_Set: pin=60
gpio[60] is 0

NAND read: device 0 offset 0xa20000, size 0x500000
Time:480262 us, speed:10916 KB/s
 5242880 bytes read: OK
incorrect device type in MISC
incorrect device type in LOGO
##  Booting kernel from Legacy Image at 22000000 ...
   Image Name:   MVX4##P3##gd69a517KL_LX409##[BR:
   Image Type:   ARM Linux Kernel Image (lzma compressed)
   Data Size:    2188600 Bytes = 2.1 MiB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
-usb_stop(USB_PORT0)
-usb_stop(USB_PORT2)
   Uncompressing Kernel Image ...
[XZ] !!!reserved 0x21000000 length=0x 1000000 for xz!!
   XZ: uncompressed size=0x46b000, ret=7
OK
atags:0x20000000

Starting kernel ...

early_atags_to_fdt() success
Booting Linux on physical CPU 0x0
Linux version 4.9.84 (yanjinming@compilex64-ipg) (gcc version 9.1.0 (GCC) ) #6 SMP PREEMPT Mon Oct 23 14:07:12 CST 2023
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
CPU: div instructions available: patching division code
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
early_atags_to_fdt() success
OF: fdt:Machine model: PIONEER3 SSC020A-S01A-S
[ERR] LX_MEM, LX_MEM2, LX_MEM3 not 1MB aligned
LXmem is 0x7fe0000 PHYS_OFFSET is 0x20000000
Add mem start 0x20000000 size 0x7fe0000!!!!

LX_MEM  = 0x20000000, 0x7fe0000
LX_MEM2 = 0x0, 0x0
LX_MEM3 = 0x0, 0x0
EMAC_LEN= 0x0
DRAM_LEN= 0x0
deal_with_reserved_mmap memblock_reserve success mmap_reserved_config[0].reserved_start=
0x27c00000

deal_with_reserve_mma_heap memblock_reserve success mma_config[0].reserved_start=
0x27700000

cma: Reserved 2 MiB at 0x27400000
Memory policy: Data cache writealloc
percpu: Embedded 14 pages/cpu @c7f9c000 s25688 r8192 d23464 u57344
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32480
Kernel command line: root=/dev/mtdblock8 rootfstype=squashfs ro init=/linuxrc LX_MEM=0x7FE0000 mma_heap=mma_heap_name0,miu=0,sz=0x500000 cma=2M mmap_reserved=fb,miu=0,sz=0x300000,max_start_off=0x7C00000,max_end_off=0x7F00000 mtdparts=nand0:1664k@0x140000(BOOT0),1664k(BOOT1),256k(ENV),256k(ENV1),128k(KEY_CUST),5m(KERNEL),5m(KERNEL_BAK),16m(rootfs),16m(rootfs_bak),1m(factory),20m(RES),-(UBI)
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 114592K/130944K available (2616K kernel code, 239K rwdata, 1336K rodata, 176K init, 180K bss, 14304K reserved, 2048K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc8000000 - 0xff800000   ( 888 MB)
    lowmem  : 0xc0000000 - 0xc7fe0000   ( 127 MB)
    modules : 0xbf800000 - 0xc0000000   (   8 MB)
      .text : 0xc0008000 - 0xc02964f4   (2618 kB)
      .init : 0xc040a000 - 0xc0436000   ( 176 kB)
      .data : 0xc0436000 - 0xc0471c90   ( 240 kB)
       .bss : 0xc0473000 - 0xc04a02f0   ( 181 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
        Build-time adjustment of leaf fanout to 32.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
ms_init_main_intc: np->name=ms_main_intc, parent=gic
ms_init_pm_intc: np->name=ms_pm_intc, parent=ms_main_intc
ss_init_gpi_intc: np->name=ms_gpi_intc, parent=ms_main_intc
Find CLK_cpupll_clk, hook ms_cpuclk_ops
arm_arch_timer: Architected cp15 timer(s) running at 6.00MHz (virt).
clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1623fa770, max_idle_ns: 440795202238 ns
sched_clock: 56 bits at 6MHz, resolution 166ns, wraps every 4398046511055ns
Switching to timer-based delay loop, resolution 166ns
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop (skipped), value calculated using timer frequency.. 12.00 BogoMIPS (lpj=60000)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: update cpu_capacity 1024
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x20008280 - 0x200082cc
CPU1: update cpu_capacity 1024
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (24.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 16 (order: -2, 1024 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations


Version : MVX4##P3##gd69a517KL_LX409##[BR:release]#XVM

GPIO: probe endhw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
SCSI subsystem initialized
[DrvPWMDutyQE0 L1064] grp:0 x0(0)
[DrvPWMDutyQE0 L1064] grp:0 x0(0)
[DrvPWMDutyQE0 L1064] grp:0 x0(0)
[DrvPWMDutyQE0 L1064] grp:0 x0(0)
[NOTICE]pwm-isr(58) success. If not i6e or i6b0, pls confirm it on .dtsi
clocksource: Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 2, 20480 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 128 (order: 0, 6144 bytes)
UDP-Lite hash table entries: 128 (order: 0, 6144 bytes)
NET: Registered protocol family 1
hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
workingset: timestamp_bits=30 max_order=15 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
jffs2: version 2.2. ? 2001-2006 Red Hat, Inc.
fuse init (API version 7.26)
io scheduler noop registered
io scheduler deadline registered (default)
libphy: Fixed MDIO Bus: probed
mousedev: PS/2 mouse device common for all mice
=======gpio_free(43 & 44);==for ti_zb======
lumi_btn_probe key=42!!
[ss_gpi_intc_domain_alloc] hw:42 -> v:62
input: main-key as /devices/virtual/input/input0
i2c /dev entries driver
1f221000.uart0: ttyS0 at MMIO 0x0 (irq = 33, base_baud = 10800000) is a unknown
1f221200.uart1: ttyS1 at MMIO 0x0 (irq = 34, base_baud = 10800000) is a unknown
1f220400.uart2: ttyS2 at MMIO 0x0 (irq = 35, base_baud = 10800000) is a unknown
[MHal_GPIO_Check_PE] set gpio85 PE
MSYS: DMEM request: [emac0_buff]:0x00000812
MSYS: DMEM request: [emac0_buff]:0x00000812 success, CPU phy:@0x27440000, virt:@0xC7440000
libphy: mdio: probed
mdio_bus mdio-bus@emac0: /soc/emac0/mdio-bus/ethernet-phy@0 has invalid PHY address
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 0
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 1
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 2
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 3
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 4
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 5
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 6
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 7
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 8
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 9
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 10
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 11
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 12
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 13
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 14
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 15
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 16
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 17
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 18
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 19
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 20
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 21
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 22
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 23
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 24
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 25
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 26
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 27
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 28
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 29
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 30
mdio_bus mdio-bus@emac0: scan phy ethernet-phy at address 31
[emac_phy_connect][3534] connected mac emac0 to PHY at mdio-bus@emac0:00 [uid=11112222, driver=Generic PHY]
[ms_cpufreq_init] Current clk=799999872
[FLASH] Found SNI in block 0.
[FLASH] dev_id = 0xee
MSYS: DMEM request: [BDMA]:0x00000840
MSYS: DMEM request: [BDMA]:0x00000840 success, CPU phy:@0x27441000, virt:@0xC7441000
[FLASH] mfr_id = 0xa1, dev_id= 0xe4 id_len = 0x2
[SPINAND] RFC ues command 0x6b with 0x08 dummy clock.
[SPINAND] Program load with command 0x32.
[SPINAND] Random load with command 0x34.
[FLASH] Use BDMA.
nand: device found, Manufacturer ID: 0xa1, Chip ID: 0xe4
nand: 128 MiB, MLC, erase size: 128 KiB, page size: 2048, OOB size: 64
12 cmdlinepart partitions found on MTD device nand0
Creating 12 MTD partitions on "nand0":
0x000000140000-0x0000002e0000 : "BOOT0"
0x0000002e0000-0x000000480000 : "BOOT1"
0x000000480000-0x0000004c0000 : "ENV"
0x0000004c0000-0x000000500000 : "ENV1"
0x000000500000-0x000000520000 : "KEY_CUST"
0x000000520000-0x000000a20000 : "KERNEL"
0x000000a20000-0x000000f20000 : "KERNEL_BAK"
0x000000f20000-0x000001f20000 : "rootfs"
0x000001f20000-0x000002f20000 : "rootfs_bak"
0x000002f20000-0x000003020000 : "factory"
0x000003020000-0x000004420000 : "RES"
0x000004420000-0x000008000000 : "UBI"
[wakeup source] HW gate_xtal:0 SourceNum:1
[wakeup source] WakeupSource:61

[ss_gpi_intc_domain_alloc] hw:61 -> v:63
[ss_gpi_irq_set_wake] hw:61 enable? 1
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
[mstar_pm_init] resume_pbase=0x200114F5, suspend_imi_vbase=0xC8057000
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler
VFS: Mounted root (squashfs filesystem) readonly on device 31:8.
devtmpfs: mounted
This architecture does not have kernel memory protection.
[emac_phy_link_adjust] EMAC Link Down
net.core.rmem_default = 163840
net.core.rmem_max = 163840
net.core.wmem_default = 524288
net.core.wmem_max = 1048576
net.ipv4.tcp_mem = 924  1232  1848
net.ipv4.tcp_rmem = 4096  87380  325120
net.ipv4.tcp_wmem = 4096  131072  393216
mount: mounting none on /sys failed: Device or resource busy
mount: mounting none on /sys/kernel/debug failed: Device or resource busy
Mstar_ehc_init version:20180309
Sstar-ehci-1 H.W init
Titania3_series_start_ehc start
[USB] config miu select [70] [e8] [ef] [ef]
[USB] enable miu lower bound address subtraction
[USB] init squelch level 0x2
BC disable
==20180309==> hub_port_init 1 #0
Plug in USB Port1

*** _import_default_cfg, /etc/ssw105at-wifi.cfg ***

sstar1xxx_hci_init() start
sstar1xxx_dev_probe(): SSW105AT device "SSW105AT" found !
SSTAR1XXX HCI TX Task started.
MAC address from e-fuse
EFUSE configuration
Read efuse chip identity[105a0000]
r_calbration_result- 0
sar_result- 0
crystal_frequency_offset- 99
tx_power_index_1- 86
tx_power_index_2- 87
MAC address - d0:7c:b2:61:b0:ca
rate_table_1- 60
rate_table_2- 0
flash_file /tmp/flash.bin not found
str_table =
 sstar105at_if_chk_mac2: is not need to check MAC addres 2 for this model
sstar105at_adj_config: clear hci rx aggregation setting
sstar105at_adj_config: clear hci tx aggregation setting
sstar105at_adj_config: clear hw beacon
sstar105at_adj_config: not support external PA for this chip
ht40 rate gain value 0
SSTAR1XXX RX Task started.
sstar1xxx_usb_rx_task: nr_recvbuff=5
wait 0 ms for usb rom code ready
[Isp_Driver_Init]
[s32CurClkIdx] = 2
[ISP] Request IRQ: 51, 87
[IspMid_Driver_Init]
ispsclttl:0
[CSI] probe
vif driver probe
Create device file. vif_ints,0
jpe driver probed
[DRV_DIVP_PROC_Init]
AudioProcInit 299
module [sys] init
MI_SYSCFG_SetupMmapLoader default_config_path:/config/config_tool, argv1:/config/load_mmap,argv2:/config/mmap.ini
config...... cmdpath:/config/config_tool, argv0:/config/load_config
config...... cmdpath:/config/config_tool, argv1:/misc/config.ini
config...... cmdpath:/config/config_tool, argv2:/misc/PQConfig.ini
config...... cmdpath:/config/config_tool, argv3:(null)
mi_sys_mma_allocator_create success, heap_base_addr=20000000 length=20000
module [ao] init
module [ai] init
ubiattach /dev/ubi_ctrl -m 10  -d 0
UBI device number 0, total 160 LEBs (20316160 bytes, 19.4 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
ubiattach /dev/ubi_ctrl -m 11  -d 1
chan change ch 6, type 1, off_chan 0
INIT SSTAR CONTROL GENERIC NETLINK MODULE
UBI device number 1, total 479 LEBs (60821504 bytes, 58.0 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
[WatchDogInit 15] init watch dog, timeout:30s
fw_manager.sh revision: 2
pre-revision: 2

hostname: Mijia_Hub_V2-B43B
type: ZHWG16LM, model: lumi.gateway.mcn001
mDNSResponder: mDNSResponder (Engineering Build) (Nov  3 2022 17:41:48) starting
mDNSResponder: Unable to parse DNS server list. Unicast DNS-SD unavailable
mDNSResponder: mDNSPlatformSourceAddrForDest: connect 1.1.1.1 failed errno 101 (Network is unreachable)

However, the output stuck at the last line. What should I do?

@niceboygithub
Copy link

However, the output stuck at the last line. What should I do?

Check the UART connection rx of the gateway.

@drakut
Copy link

drakut commented Jan 30, 2024

Success! @niceboygithub @serrj-sv thanks a lot! You make this world much better (my card was declined to buy you a coffee, but a'll try to find another way to thank you). So, mistakes I've made:

  1. Use good USB-cable to connect UART to your PC. At first I used cable that were in complectation with my hub - do not use it, it only to power hub. If no new devices appiared in OS (Windows) after connecting - use another cable.
  2. Setup driver for UART. At first I didn't see any new devices because I used bad usb-cable. With windows 10 may be you shoud not need it. In my OS new COM-port appeared automatically after using good USB-cable (samsung).
  3. The most problem was to connect 3-pin cable to rx-tx-grnd on plate of hub - I used selfmade-device shown on photo, made with super-glue and insulating tape.
    20240131_003804

@ymj0424
Copy link

ymj0424 commented Jan 31, 2024

However, the output stuck at the last line. What should I do?

Check the UART connection rx of the gateway.

I re-soldered the UART cable agian, changed another UART cable, but it still stuck at the last line.

@ymj0424
Copy link

ymj0424 commented Jan 31, 2024

However, the output stuck at the last line. What should I do?

Check the UART connection rx of the gateway.

I re-soldered the UART cable agian, changed another UART cable, but it still stuck at the last line.

Success! The root cause why it stuck at the last line is that the USB to TTL module have different mode. After I switch it to the correct mode, it worked.

@7yang7
Copy link

7yang7 commented Feb 17, 2024

However, the output stuck at the last line. What should I do?

Check the UART connection rx of the gateway.

I re-soldered the UART cable agian, changed another UART cable, but it still stuck at the last line.

Success! The root cause why it stuck at the last line is that the USB to TTL module have different mode. After I switch it to the correct mode, it worked.

Hello @ymj0424 , I have the same problem, please tell me what does switching to another mode mean? Which USB to TTL do you use?

@ymj0424
Copy link

ymj0424 commented Feb 18, 2024

However, the output stuck at the last line. What should I do?

Check the UART connection rx of the gateway.

I re-soldered the UART cable agian, changed another UART cable, but it still stuck at the last line.

Success! The root cause why it stuck at the last line is that the USB to TTL module have different mode. After I switch it to the correct mode, it worked.

Hello @ymj0424 , I have the same problem, please tell me what does switching to another mode mean? Which USB to TTL do you use?

tb_image_share_1708221238755 jpg
This is the USB to TTL module I used. You can see the switch on the module, which refers to the different mode(This module has three modes, USB to TTL, USB to 485 and USB to 232).

@roseybear098765
Copy link

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.
    need help
    11
    12

@ww5vca
Copy link

ww5vca commented Mar 7, 2024

@niceboygithub @AlexxIT

I don't know what did you do before using gw_global_tool. You made the all partitions of the flash was REMOVED. The gw_global_tool won't cause the all partitions removed. And please use gw_global_tool on a good gateway.

I re-soldered the UART with another programmer and everything worked. This is a 100% method to get the key for version 1.0.7_0019.

  1. Solder the wires for the UART.
    288732383-a4a1acfe-3a71-435f-b0c6-23adfe63e0f9
  2. Download gw_global_tool. Read the instructions, get the key.
  3. Add via XiaomiGateway3 to Home Assistant.
    need help
    11
    12

I have the same problem and try to open the ttl file with notepad. Then I looks like a html file (about 181KB)...... I don't know what happend. Then I download it again and it is correct(about 9KB).

If it still error. Maybe you can try with an old Tera Term like 4.1x. 这里讲的:https://www.bilibili.com/read/cv27175398/?jump_opus=1

@SlippinDylan
Copy link

不能动手的同学,看一下这个教程(For our friends abroad: for those who can't get their hands dirty, check out this tutorial
Foreign friends to translate, hard work)
https://www.bilibili.com/read/cv32763868/?jump_opus=1

@LOVE2CMOL
Copy link

我对上面的各位的方案进行了整合以及实验 还不会刷的可以参考下这个教程
Translation: I have integrated and experimented with the solutions provided by everyone above. Those who are not familiar with it can refer to this tutorial.
https://bbs.hassbian.com/thread-24421-1-1.html

@SlippinDylan
Copy link

我对上面的各位的方案进行了整合以及实验 还不会刷的可以参考下这个教程 Translation: I have integrated and experimented with the solutions provided by everyone above. Those who are not familiar with it can refer to this tutorial. https://bbs.hassbian.com/thread-24421-1-1.html

This solution is a good solution to the pain point of not being able to add 1.0.7 version upgrades to the ha. The only thing you need to be aware of is the wiring and the fact that you can't use a virtual machine (ps: my Windows 11 VM in my mac didn't work, and I ended up finding a Windows 10 host that did). I also had a bit of trouble with the wiring, mainly rx and tx, so for those of you who upgraded to 1.0.7 and can't get it to connect, be bold, it only cost me 15 bucks to get it to work, be bold!

@Giglik
Copy link

Giglik commented Mar 16, 2024

Anyone tested new firmware 1.0.7_0021? Does it work with gateway 3 addon?

@LOVE2CMOL
Copy link

Anyone tested new firmware 1.0.7_0021? Does it work with gateway 3 addon?

My device firmware 1.0.7_0021 and it can be used normally.

@Shm1ks
Copy link

Shm1ks commented Mar 31, 2024

Hello everyone, This is my first time doing this, I work in C++ and Python. What about the encoding? why does my gateway show this? and how to translate this? #3-1�9!#3-1A!!'��=���%-9�_]y!#3-1�-#-��9!#3-1�������9%7=/��9!#3-1�9!#3-1A!!'��=� ��#''���IKPFCFPIIOPO�R���!9=5�995��/5=A;=5A=77�'5#1/���������IHS�R�K�!E�-#-��IHS �R�K�-E�-#-��E���=9/��75�;-A9��%������7����U�뻪�-95�#%;5����!='�����gu{��������� 5���gu{�--{���==-'=;'5���gu{����;
5����!33A9/=#����[����e]�m�yacW[ag�qucu[my�cuWgmci�eawUgu��U�뻪�-95�#%;5����!='� 5���gu{�--{���==-'=;'5���gu{����;
5��������i-{���RTOQz��1m#-���E�-#-�=9/�7!1��-%5!�����rR���%3A%=#=15�/�--!#����I� �%9#����I�%��I�em�!#75-�1=5=�%�I�%��rR���%/!#=%5��e-+-=Ao;AS�������I�%��rR���%
�%wcY[5!#75��u#1-#55�{-'7���c!�������������������=���%wcY[ 5!#75
�U#=;'5�!�=�wcY�5�'-��U#-9=�wcY�Yw�#==-'=;'5���%wcY[5!#75
�%wcY_'=3!! 5}77!5 ��9!##59���������3=-'57�5������c5!�-�#=9/=;'5����

@Shm1ks
Copy link

Shm1ks commented Mar 31, 2024

== Gateway Global Tool version:20240218==

Power ON Gateway NOW!<<

y��u�173�������w�����oQ�[55���=����95�����������[5%5��c��=77�����������IKEt:
m��e o
��V����e�띛�e{��{mYW�A����iXZ�^�����e��R��Uԛ�#7�=;'5��������������+�y/59)%�ai�� ������������������������S5cS����+�y�ޯUۅ!����������e=
��w[}e�����T_��k�-�y=9/5�#!�5#=;'57��VՍ����-��R�Ve��s!#7�Ycm�-#�;'!9)������Isg}Y oE�75A-7����55���Isg}YoE�%3-7����=���75A-7���5��-7A'5#��������IY_mc}cwE�[sy�5�9! �9'!9)����IY_mc}cwE�_%�'!=7�-/�9!%%=#7��������IY_mc}cwE�[=#7!%�'!=7�-/�9!%%=#7�� ������Isg}YoE�U#'!9)�=''�;'!9)����Isg}YoE�U5�{we}���렶��e-{��eey����eY=�Yw�eey�� ���]���
���5�����������-
5������������]����!335�����9�����-
5������������[������5'� �a����5'��u
���=3���_5���=3��I/='Qe=7Y5EI���E��%m7��=7m7������������1-!�75;1�eo='Aq_maA_=7 AY5��-#�����L�
J]�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
J]�E�-����1-!�75;1�e o='Aq_maA_=7AY5��-#�����L�
JU�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
JM�E�-�� ��1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
JM�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#��� ��L�
JM�E�-����1-!�75;1�eo='Aq_maA_=7AY5��-#�����L�
JM�E�-����L�
���ڪ1�eo='Aq_maA_= 7AY5��-#�����L�

@ZhangCheng-2021
Copy link

有人测试过新固件1.0.7_0021吗?它可以与 gateway 3 插件一起使用吗?

不可以,我正在想办法解决

@spysir
Copy link

spysir commented Apr 21, 2024

各位大佬找到解决方案了吗?固件版本1.0.7_0021

@Mioooooo
Copy link

没连接过ha 但是固件版本是1.0.7 手残不想拆机,请问还有其他获取key的办法吗

@felix0324324
Copy link

没连接过ha 但是固件版本是1.0.7 手残不想拆机,请问还有其他获取key的办法吗

同問…要付錢搞也行…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests