My router did not have access to the Internet and I wanted to update opkg so I thought following the instruction at "connect to client wifi" (https://openwrt.org/docs/guide-user/network/wifi/connect_client_wifi) would help me resolve the issue. However I ended losing ssh access to my router and bricking it.
After changing the setting accordingly to this page using uci set and uci commit, I am no longer able to ssh into my router in failsafe mode nor normal boot. When I try to ssh firstname.lastname@example.org I get 'network is unreachable' both in normal boot and failsafe boot.
I'm not sure what more info I could add to explain the issue better but I would really appreciate your support.
Which router are you using? Can you please specify your device model, OpenWRT version number etc. You may need to debrick it via TFTP and flashing factory firmware provided by the manifacturer.
It's not a complex operation as long as you have linux or macos. You need to touch a few config files to setup tftp server, put firmware into tftp directory, directly connect to your router via eth and manually assign IP address (this is device specific).
So, don't worry for now. As long as you do not touch uboot, you will mostly be fine
Is DHCP working? Are you obtaining IP-address from your router?
Thank you so much for your reply.
I'm in Japan so I'm using an unusual router called WRH-300CR and the openwrt version was 1.29.2
Also I didn't mention this but this was actually the second time bricking the same device and I think I did the same mistake last time.
However, on the last device I enabled the wifi as 'Openwrt', and I can connect to it but not SSH into it. (btw in the last one, I didn't do sysupgrade process, so it was Openwrt ver. 1.27.2, I believe)
Here are some of the pages about the router:
Anyways, I really appreciate your support!
Thank you so much for your support!
I'm sorry I'm a newbie and I might be providing you completely irrelevant info but,
the router is connected with Ethernet cable, and the ipv4 setting is set to automatic(DHCP) on my ubuntu. I'm not sure if I'm obtatining IP address from my router (sorry I don't know how to check that).
Anyways, thank you so much for your support!!!
Generally, current versions of OpenWrt come up on 192.168.1.1 -- hopefully setting your Ubuntu box's Ethernet interface manually ("static") to, for example, 192.168.168.1.100 with a netmask of 24 or 255.255.255.0 (I don't recall the format that NetworkManager wants) will get you going again!
Thank you Jeff, I made this change "network.lan.ipaddr='192.168.2.1'" while following the instructions on Connect to client wifi network so I thought it was email@example.com that I had to ssh into but I'll give it a try tonight!