What to do after bricking the router but using UART to enter in openwrt shell?

also i tried reaching the webserver, but no success


============================================
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:May 13 2020  Time:19:39:06
============================================
THIS IS uboot
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

Press '4' or 't' to break the booting process

Press 'x' to enter recovery web server                                                                                              0
#Reset_MT7530
set LAN/WAN WLLLL


 NetTxPacket = 0x87FE7300

 KSEG1ADDR(NetTxPacket) = 0xA7FE7300
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 ETH_STATE_ACTIVE!!
HTTP server is starting at IP: 192.168.0.1
HTTP server is ready!

i changed the ip to mach the range, but couldnt reach the server
but a strange behaviour that happened is setting up the webserver made the router pop up all the lights, they are all now in a fixed state on

there is no web server... in fact, no server at all. It is a tftp client.

With your computer using address 192.168.0.5 (subnet mask 255.255.255.0), can you ping 192.168.0.1?

looks like no link are negotiating through ethernet , cant ping

try with a continuous ping, restart the router and then go back to the tftp loader option that you did recently... see if you ever get any ping hits.

Boot loaders often have ping disabled, it's not a reliable proof of life while in U-Boot.

1 Like

That is a good point

@crazy_monkey - have you setup a tftp server?

yeah, unfortunatly i think i loose the router, windows dont detect any link

Turn off the windows firewall and try again.

tried with a linux computer also, it also says cable unplugged
BUt what is strange is if i enter into openwrt shell and run ifconfig it see the eth0 interface

take a look on this

ifconfig

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:472 errors:0 dropped:0 overruns:0 frame:0
          TX packets:472 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:36816 (35.9 KiB)  TX bytes:36816 (35.9 KiB)

it upfront do not up the eth0

ifconfig -a

root@OpenWrt:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr E8:48:B8:5A:4A:7D
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:19

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:512 errors:0 dropped:0 overruns:0 frame:0
          TX packets:512 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:39936 (39.0 KiB)  TX bytes:39936 (39.0 KiB)

ifconfig eth0 up

root@OpenWrt:~# ifconfig up eth0
ifconfig: bad address 'eth0'
root@OpenWrt:~# ifconfig eth0 up
[ 1018.914385] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[ 1018.927241] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

but pc still cant negotiate link to it

i tried to send the firmware image via uboot serial kermit using teraterm , it copied to memory (0x81000000) but when i tried to run

bootm 0x81000000

i got Bad magic number 0069f4ac

i screwed more the situation, i was able to login in openwrt web gui , making the wireless up, and connecting trough it, i then load the previous openwrt firmware but now system dont even boot to openwrt:

U-Boot 1.1.3 (May 13 2020 - 19:39:06)

Board: Ralink APSoC DRAM:  128 MB
relocate_code Pointer at: 87f58000

Config XHCI 40M PLL
flash manufacture id: ef, device id 40 18
find flash: W25Q128BV
*** Warning - bad CRC, using default environment

============================================
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:May 13 2020  Time:19:39:06
============================================
THIS IS uboot
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

Press '4' or 't' to break the booting process

Press 'x' to enter recovery web server
 0
nm_init:791
nm_initFwupPtnStruct:276
nm_lib_readPtnTable:738
[NM_Debug](nm_lib_readPtnTable) 00743: NM_PTN_TABLE_BASE = 0xfe0000
[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 1054, requried len = 8192
[NM_Debug](nm_lib_readPtnTable) 00751: Reading Partition Table from NVRAM ... OK

[NM_Debug](nm_lib_readPtnTable) 00759: Parsing Partition Table ... OK

[NM_Debug](nm_lib_readPtnFromNvram) 00569: partition_used_len = 2, requried len = 2
factory boot check integer ok.


3: System Boot system code via Flash.
## Booting image at bc040000 ...
Bad Magic Number,0069F4AC
ret is -1
#Reset_MT7530
set LAN/WAN WLLLL


 NetTxPacket = 0x87FE7300

 KSEG1ADDR(NetTxPacket) = 0xA7FE7300
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 ETH_STATE_ACTIVE!!
HTTP server is starting at IP: 192.168.0.1
HTTP server is ready!

Bad magic would indicate wrong image flashed, but TFTP flash in U-Boot should still work.

couldnt make ethernet to work to tftp flash , if uboot give me wireless would have a shot

Post the output of that too.

Wifi isn't supported by U-Boot.

What I gather from this discussion is that LAN ports are not working at the hardware level after sysupgrade to 24.10. If you are absolutely sure that the problem is in the router and not, for example, in the cable or the LAN port of the PC you are trying to connect from (did you try with another cable and another PC and got no link?) then you have a hardware issue. I can't see another explanation.

1 Like

exactly, i tried another cable and computer also , i didnt know openwrt could mess with hardware, the ports was working before the upgrade

bro , do i need to strip somehow the openwrt firmware to install using uboot ?

im able to copy the firmware with kermit , but always getting bad magic number

im using loadb to copy using kermit to memory 0x84000000

and then :
erase 0xbf020000 +0x7c0000
cp.b 0x84000000 0xbf020000 0x7c0000
bootm 0xbf020000

but getting bad magic number

if router dosnt work trough ethernet i want to at least use as mesh point

@antonk @psherman

Copy the initramfs openwrt to the router then boot it in RAM. Use sysupgrade to install the sysupgrade image. This is much safer than erasing / writing flash directly from uboot.

If no Ethernet ports work under the bootloader there is hardware failure. This is the very common MT7621 SoC which is well proven to work with 24.10.

ethernet not working (i think at hardware level)