Xiaomi WiFi Router 3G V2

Updated build

1 Like

Thanks Gingernut, it's clearer..... and for this update.

I need to find a tutorial of tftpd32 software to flash my router before to begin.

I never used it ...

Here are some generic instructions for tftpd32

Ensure the PC has a static IP address on ethernet port.

youtube video
https://youtu.be/mAh3DkmxG8g

More updates.

enjoy

I have a doubt.
A USB to TTL Serial Adapter is necessary to modify the bootdelay-value or only a ch341a ?

Thanks.

@Gingernut Is your compiled firmware different to the official snapshot builds?

Yes, it has many included packages like Luci, Simple adblock, WOL, Ban IP, DDNS and more.

1 Like

Hi,

I modified the bootdelay but it wasn't possible directly with the built in editor.
I read the chip, save the file, modified the boot value, erase the chip and write the file modified.
Now when i plug the router, the led flashes orange. I don't know if it's normal ???

I put the new file.bin in tftp folder.
After i assign the ip 192.168.31.100/24 to my PC and connect the LAN-cable to the router then power the router, hold the reset button and launch tftp but nothing is happening.

Could you help me ?

This happened to me at first, orange light no bootup. You won't be able to tftp anything untill it boots correctly.

I think more than likely because the change to the bootdelay value is not edited correctly and it's address has moved.

Erase the chip, load your flash backup to the program and do the hex edit directly then write it to the chip.

Thank you very much for the instructions. I managed to flash my first router with OpenWrt thanks to you.

A few tips for other new OpenWrt users like me:

  • The ch341a programmer recommended by Double-G can also be used as a USB to serial adapter by moving the jumper. Pin 1 to Pin 2 = programmer. Pin 2 to pin 3 = serial / TTL.
  • When transfering with TFTP, connect the ethernet-cable in one of the two LAN-ports, and not in the Internet-port.

Hi Gingernut,

If I plug my router, after several seconds, the led become blue and the router works perfectly.
If I plug my router and hold the reset button, the led flashes orange. Same things with original or modified (bootdelay value) backup.

Thanks to support me.

@Gingernut : I tried several times to flash following your instructions but always the same problem : if I plug my router and hold the reset button, the led flashes orange.
I don't undestand.

If you plug in your router does it boot correctly, as in, you can access the Xiaomi webUI?

If not, restore the unmodded flash back up you saved and get it to boot first.

I had serial connected the whole time so I could see what was happening when booting.

Before your post, I configured my CH341 as a serial adapter (shunt on pin2-3 and connected to RX TX GND) to see what was happening when booting (i used Putty).

1/ I pluged the router normally and I saw the menu with the countdown (5s) so the boot delay modifification was OK. After, i followed the instructions (choose 2 and confirm Y), specify the IPs, file name, and with tftp , i can flash the router with your last release. Perfect !

2/ On the other side, if i plug the router and hold the reset button. I see that (below) and the led flashes orange (no boot). It's not a problem now but ..... for the others.


===================================================================
                MT7621   stage1 code Oct 28 2018 20:39:32 (ASIC)
                CPU=500000000 HZ BUS=166666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0xa, 1/0 = 692/332 29000000
PLL2 FB_DL: 0xd, 1/0 = 539/485 35000000
PLL4 FB_DL: 0x10, 1/0 = 585/439 41000000
do DDR setting..[01F40000]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1    1
000E:|    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1    1
000F:|    0    0    0    1    1    1    1    1    1    1    1    1    1    1    0    0
0010:|    1    1    1    1    1    1    1    1    0    0    0    0    0    0    0    0
0011:|    1    1    1    0    0    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
DRAMC_DQSCTL1[0e0]=13000000
DRAMC_DQSGCTL[124]=80000033
rank 0 coarse = 15
rank 0 fine = 64
B:|    0    0    0    0    0    0    0    0    0    0    1    1    1    0    0    0
opt_dle value:11
DRAMC_DDR2CTL[07c]=C287223D
DRAMC_PADCTL4[0e4]=000022B3
DRAMC_DQIDLY1[210]=0A090809
DRAMC_DQIDLY2[214]=05080707
DRAMC_DQIDLY3[218]=0C080909
DRAMC_DQIDLY4[21c]=0B080B09
DRAMC_R0DELDLY[018]=0000201F
==================================================================
                RX      DQS perbit delay software calibration
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    9 7 8 10 6 7 7 5 7 6
10 |    7 9 7 11 8 9
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center
y=0-7bit DQ of every group
input delay:DQS0 =31 DQS1 = 32
==================================================================
bit     DQS0     bit      DQS1
0  (1~62)31  8  (1~60)30
1  (1~59)30  9  (1~58)29
2  (1~60)30  10  (1~61)31
3  (1~62)31  11  (1~57)29
4  (1~60)30  12  (1~60)30
5  (1~62)31  13  (2~62)32
6  (1~60)30  14  (2~63)32
7  (1~62)31  15  (1~60)30
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    9 8 9 10 7 7 8 5 9 9
10 |    8 12 9 11 8 11
==================================================================
==================================================================
     TX  perbyte calibration
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2
DQ loop=15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=15,  finish count=1
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=2
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
DRAMC_DQODLY1[200]=88888888
DRAMC_DQODLY2[204]=88888888
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done
                CPU=500000000 HZ BUS=166666666 HZ
===================================================================


U-Boot 1.1.3 (Apr  8 2019 - 13:34:42)

Board: Ralink APSoC DRAM:  128 MB
Power on memory test. Memory size= 128 MB...OK!
relocate_code Pointer at: 87fb0000

Config XHCI 40M PLL
RT2880_RSTSTAT_REG 0xc0030000
***************************
Board power on Occurred
***************************
flash manufacture id: c8, device id 40 18
find flash: GD25Q128C
============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR3
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: SPI Flash
Date:Apr  8 2019  Time:13:34:42
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 880 MHZ ####
 estimate memory size =128 Mbytes
#Reset_MT7530
set LAN/WAN LLLLW

restore_defaults:0


 NetTxPacket = 0x87FE52C0

 KSEG1ADDR(NetTxPacket) = 0xA7FE52C0

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 ETH_STATE_ACTIVE!!
BOOTP broadcast 1

 NetOurIP
checksum bad
checksum bad

 NetOurIP
checksum bad
checksum bad
DHCPHandler: got packet: (src=5353, dst=5353, len=32) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=5353, dst=5353, len=70) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=64977, dst=5355, len=26) state: 3
Filtering pkt = -1
checksum bad
checksum bad
 .... etc.....

3/ I connected directly the router to my PC (ethernet) and reach the router on 192.168.1.1.

4/ After settings, I pluged a LAN port of the router to my Internet box. The router works, Wifi OK but the IP router don't appeared in the DHCP of my internet box ???

5/ Is it possible to reach directly the configuration of the router with this configuration (Router connected to my box and with IP internet box 192.168.1.1) ?

Thanks again.

Question : IP of your internet BOX ? Also 192.168.1.1 ?

If yes change XIAOMI IP by exemple with 192.168.1.10 and connect with this new IP

You need to know what your internet gateway router's IP address is, maybe it is also 192.168.1.1 so you'll have to change the IP of the Xiaomi to some other in the same subnet.

I'm not totally sure what you want to achieve but If you want the Xiaomi to be just a wireless AP there is an Openwrt tutorial on how to set it up.

Yes, my internet gateway router's IP address is 192.168.1.1, I change it to 192.168.1.10.
I followed this tutorial to configure the Xiaomi as a wireless AP.

https://openwrt.org/docs/guide-user/network/wifi/dumbap

Thanks for all. All works.

No problems, glad you got it sorted.

Yes .... with many couple of hours of works. :grimacing:

Like you, I ordered a Xiaomi 3G (with USB port) and i received a 3GV2. :frowning_face:

I opened a disput, and I got a refund of the half price of the router. :slight_smile:

Hi gingernut, i've downloaded ur snapshot just wondering how can i removed DNSCrypt-Proxy??? there would be times that my dns resolver would go down and would have to go back to the luci and pick a different one LOL. Everytime i try to remove it via luci my router would not delegate a proper dns to my devices.