Configure wifi dongle to auto connect on boot for Orange Pi PC running Armbian minimal

This was the first free weekend with my Orange PI PC. It has network connection, but no Wifi built in. The cool of this board (in my way of thinking) is that you can run complex software, and connect to an Arduino board on it. So instead of having a limited/small/simple program running on Arduino, you can basically use Arduino just as a bridge between the SBPC and the hardware. You can develop in a much high-level, and even though have hardware access.

The problem I found resides on communication (imagine an robot running with a cable connected). I shall better have ordered a board with Wifi built int. By now, I have a D-Link USB dongle. So how to make it use it and automatically connect to some wifi?

Well, using Armbian, I first thought in using the easy assistant that comes with, the armbian-config.

It works right out of the box! Just connect you dongle, go to the appropriate menu, enter Wifi credentials and be happy. It`s a pity that I does not continue this way in the next reboot.

In the next reboot, the wifi keeps down, no IP assigned, no nothing, and even worst, if you enter in armbian-config again, the section to configure wifi disappear. There is an alternative command nmtui. You will be able there to activate and re-configure stuff.  The problem is that it just works if you cable is connected. If eth0 is down, the mntui don`t work, and there is no way to configure your wifi.

Well, I discovered that armbian-config & nmtui were messing the wifi files, and that there is another command to manage it all. Just had to burn the image again in my SD card, cause this other command were not working giving the mess in the wifi configuration files.

Get Wifi status

nmcli radio wifi

Turn wifi on or off

nmcli radio wifi <on|off>

List available access points(AP) to connect to

nmcli device wifi list

Refresh previous list

nmcli device wifi rescan

Create a new connection to an open AP

nmcli device wifi connect <SSID|BSSID>

Create a new connection to a password protected AP

nmcli device wifi connect <SSID|BSSID> password <password>

Running this, all worked fine, also in the next reboot (you don`t need to run the commands never again), also when connecting and disconnecting the dongle with the Orange Pi PC on.

Here is all references I used.

2018-05-27 21:21:00
Computers and science as a way to live

As you may know, I`m a programmer, I work most in web projects, but not only. This area is a mess! Each day you have to recycle what you know in many ways. The thing is, a knowledge that change so often can`t afford wait to be translated to Portuguese for instance, at that time, the known will be already deprecated. English to me is a functional requirement. I can`t imagine my daily life without it. I have been studding English for serious since 2009. In this section you can see what I`m working on. Have fun as I do.
RSS Feed
"A vida é curta demais para ser pequena / The live is so short to be small / Das leben zu kurz sind für kleine sein". (Benjamin Disraeli)