Reset LEDE/OpenWRT using Failsafe boot mode

I had just installed OpenWRT and was making changes (of course without reading the documentation) when I had changed the networking settings losing access to the router’s interface.

Fortunately OpenWRT provides a way to recover according to OpenWRT’s website: “LEDE allows you to boot into a failsafe mode that overrides its current configuration. If your device becomes inaccessible, e.g. after a configuration error, then failsafe mode is there to help you out. When you reboot in failsafe mode, the device starts up in a basic operating state, with a few hard coded defaults, and you can begin to fix the problem manually.”

First, thing is to set your computer’s IP address to something like 192.168.1.2. The router will use 192.168.1.1 when booted in Failsafe mode.

Then connect the computer to the router’s WAN port.

Now the hard part. According to the documentation the router’s LEDs will display a moderate 0.1 second blinking rhythm during those two seconds, when router waits for user to trigger the failsafe mode. After plugging in the router I just guessed at when the 2-second window arrived and pressed the QSS/WPS button. After which the SYS LED started blinking rapidly.

Back on the computer I SSH’d to the router using root@192.168.1.1 for the username and address. There is no password for root.

joey@HAVEN-E6520 ~ $ ssh root@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is SHA256:PAkYhCNr1sBDT/ADAn/iPh3ztT1yvlgR+RTHYVM0/fA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.

BusyBox v1.25.1 () built-in shell (ash)
     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

================= FAILSAFE MODE active ================
special commands:
* firstboot	     reset settings to factory defaults
* mount_root	 mount root-partition with config files

after mount_root:
* passwd			 change root's password
* /etc/config		    directory with config files

for more help see:
http://wiki.openwrt.org/doc/howto/generic.failsafe
=======================================================

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@(none):~# 
root@(none):~#

Because I had just installed OpenWRT I decided to just reset the router and start over. To do this I just entered the command firstboot and hit enter.

TP-LINK 300M Wireless N Gigabit Router
Model No. TL-WR1043ND
https://wiki.openwrt.org/doc/howto/generic.failsafe
https://openwrt.org/docs/guide-user/troubleshooting/failsafe_and_factory_reset
https://openwrt.org/toh/tp-link/tl-wr1043nd#installation

Advertisements

Transfer files using Bluetooth in Linux Mint

On Linux computer make sure Bluetooth is enabled and is discoverable. I’m running Linux Mint 18.2 using Blueman package.

From the Bluetooth applet open devices. This is not necessary to pair the device but, is helpful to have open. This will display all the devices already paired with the computer.


On the phone the computer should be listed under Available Devices if the computer is discoverable. If it is not listed press Scan on the phone.

Tap the device that represents the computer. The phone will display a message about confirming the passkey for pairing.

A message will appear on the computer prompting you to confirm. This is not readily apparent and the message is not displayed for long. Click on the word Confirm to allow the pairing. The phone will display the key icon indicating it is paired.

On the phone the computer will be listed under Paired Devices.

On the computer trust the phone to allow receipt of files from the paired device.

Now that the phone and computer are paired we can trasnfer files between them. In this example I am going to transfer pictures from the phone to the computer. Starting the Gallery app select the pictures to transfer and tap Share. The following screen appears where Bluetooth is an option.

After tapping Bluetooth this screen appears where you select the Bluetooth device to receive the files. Tap the paired device that represents the computer.

The phone will start transferring the files to the computer.

In Linux Mint a notification will display stating that a file is being received from the phone.

Bluetooth is configured on my computer to put received files in the Downloads folder. Opening the Downloads folder shows the new files received from the phone.

To change the location where received files are saved click on View in Bluetooth Manager and select Local Services. Then change the location under Incoming Folder.


How to format SD card on Linux Mint

When an SD card is inserted into a computer running Linux Mint the card is automatically mounted and an icon is displayed on the desktop. Using this icon you can view and modify files. It also would appear that you could format the card as well by right-clicking on the icon.

When the option to Format is selected a dialog box to format the card is displayed but, the button to Format is not clickable:

The trick is to use the Disks utility to format the partition on the card. First, open the Disks utility:

Next, select the SD card on the left then click the gear icon under the partition on the SD card:

Then select Format… from the context menu:

Now a dialog box is displayed with the Format button enabled. Provide a name then click the button Format:

The next window is confirming your actions. Click Format to begin formatting the partition on the card:

That’s it!

Note: if you click the single gear icon at the top-right corner (near the SD card’s name) the same dialog box will be displayed. It will appear to format the card but, it doesn’t. You have to format the partition on the card.