I performed a sysupgrade with a sysupgradable openwrt bin. I lost my ability to connect via lucy and have been unable to restore factory firmware via nmrpflash and tftp. I can connect via ssh and my /etc/config/network does not look right, /etc/config/lucy is missing. I ordered a uart usb 3.3v adapter only to find the R7450 does not have the jtag pins. Please help me recover factory or other firmware, possibly via ssh?
Use stable release or make your chosen testing rel#ase more pslatable:
https://openwrt.org/releases/snapshot
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </>
" button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
there is no such file. In fact, it's spelled LuCI
. But the file that relates to the web server is /etc/config/uhttpd
.
But, it sounds like you may have used a snapshot...if so... Read the link for instructions how to install Luci, which is not installed by default in snapshots.
I should add, I can only access the WAN through wifi. I had a working setup using these instructions https://openwrt.org/docs/guide-user/network/wifi/connect_client_wifi. Via the cli instuctions, I can bring up my wifi but I do not see any packets when I run iw dev. See requested info in next comment.
root@OpenWrt:~# ubus call system board
{
"kernel": "6.6.50",
"hostname": "OpenWrt",
"system": "MediaTek MT7621 ver:1 eco:3",
"model": "Netgear R7450",
"board_name": "netgear,r7450",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r27352-47370eb9ba",
"target": "ramips/mt7621",
"description": "OpenWrt SNAPSHOT r27352-47370eb9ba"
}
}
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd8b:1173:6364::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan'
option device 'wan'
option proto 'dhcp'
config interface 'wan6'
option device 'wan'
option proto 'dhcpv6'
config interface 'wwan'
option proto 'dhcp'
root@OpenWrt:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
option band '2g'
option channel '1'
option htmode 'HT20'
option disabled '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
config wifi-device 'radio1'
option type 'mac80211'
option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
option band '5g'
option channel '36'
option htmode 'VHT80'
option disabled '0'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'wwan'
option mode 'sta'
option ssid 'REDACTED'
option encryption 'psk2'
option bssid 'REDACTED'
option key 'REDACTED'
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood '1'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
config zone
option name 'lan'
list network 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config zone
option name 'wwan'
option network 'wwan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
config forwarding
option src 'lan'
option dest 'wwan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wwan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wwan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wwan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wwan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wwan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wwan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wwan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-IPSec-ESP'
option src 'wwan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wwan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
I manually edited my /etc/config/firewall replacing all of 'wan' with 'wwan'
As predicted, you are running a snapshot. That is why you don't have LuCI.
Unless there is a specific reason you need to run snapshot, you should probably be running a standard stable release (which includes LuCI by default):
https://firmware-selector.openwrt.org/?version=23.05.4&target=ramips%2Fmt7621&id=netgear_r7450
How do I flash to a new firmware?
- I have tried nmrpflash many times to no avail, including manually entering the MAC and in blind mode, advertising nmrp times out. I have used this successfully on a different router many times.
- I have tried tftp, held reset while turning on, until it just flashed white. Would time out after many tries. I have done this successfully before on another router.
- I have no web because I connect via wifi, I have tried connecting via https://openwrt.org/docs/guide-user/network/wifi/connect_client_wifi to no avail. It seems connected but I see all 0s when I enter
iw dev
- My router has no JTAG pins (can I get something to solder in?). I have a uart cable and used it on my R7000.
- I am a dirt poor student and cannot afford anther router although I do have a R7000P.
- I used scp to send firmware to my router, put it in temp, and used sysupgrade -n /tmp/blahblah and it flashed orange for a sec but didn't upgrade the firmware.
I think I flashed bad firmware on it and sysupgrade is trying to use the wrong mtc maybe? I also think the ports and cpu numbers (1 2 3 4 5e) or whatever they are are missing from the config device section of /etc/config/network.
I am sorry, that is a lot I know.
You use the sysupgrade feature via the command line (using ssh).
Download it to /tmp/ and then install it:
cd /tmp/
wget https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/openwrt-23.05.4-ramips-mt7621-netgear_r7450-squashfs-sysupgrade.bin
sysupgrade /tmp/openwrt-23.05.4-ramips-mt7621-netgear_r7450-squashfs-sysupgrade.bin
psherman: I used scp to get the firmware, it worked this time, thank you.
I must have been trying the wrong firmware or something. I swear I used that exact one because I remember the hash, but the name of the firmware on boot (now OpenWrt 23.05.4, r24012-d8dd03c46f) wasn't changing. Previously I tried
sysupgrade -F -n
because it had to be forced. Anyway thanks, at least I learned a lot about how to use cli to configure wireless, etc.
Great!
If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks!
For anyone in a similar situation, without web connectivity to router but connectivity to PC via phone tether or other wifi, the final solution was this.
- Reset router by turning on and holding reset button 15 seconds
- Connect ethernet to port 1, wait for about 30 seconds
- On Linux PC:
cd ~/Downloads
wget https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/openwrt-23.05.4-ramips-mt7621-netgear_r7450-squashfs-sysupgrade.bin
ssh root@192.168.1.1
# Enter router password as required
# At this point, you are working from the router
scp PC_USERNAME@PC_IP_ADDRESS:/home/LINUX_USERNAME/Downloads/openwrt-23.05.4-ramips-mt7621-netgear_r7450-squashfs-sysupgrade.bin /tmp
sysupgrade /tmp/openwrt-23.05.4-ramips-mt7621-netgear_r7450-squashfs-sysupgrade.bin /tmp
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.