Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wireless connection using command line instead of graphical tool

Featured Replies

Hi,

 

I have armbian image with kernel 4.4.184-rockchip64. Now I want to connect with Wifi using commands but I dont know how to connect using commands. I am able to connect with WiFi using Graphical tool.

 

Below are my observations:

a) Instead of wlan0, p2p0 interface is used to connect with wireless network.

b) I am able to scan with wlan0 using below command:

       iw dev wlan0 scan

c) iw dev p2p0 scan gives output associated interface( the one connected using Graphical Tool).

d) I created wpa_supplicant.conf file and executing below command shows wpa_supplicant initialized but does not get IP address. 

      wpa_supplicant -Dnl0211 -iwlan0 -c/etc/wpa_supplicant.conf -B

 

Can anyone please tell me how to connect to any network without using Graphical tool. In my case p2p0 interface is used for Wireless Connection instead of wlan0 interface.

23 minutes ago, AVP said:
 

Hi,

 

I have armbian image with kernel 4.4.184-rockchip64. Now I want to connect with Wifi using commands but I dont know how to connect using commands. I am able to connect with WiFi using Graphical tool.

 

Below are my observations:

a) Instead of wlan0, p2p0 interface is used to connect with wireless network.

b) I am able to scan with wlan0 using below command:

       iw dev wlan0 scan

c) iw dev p2p0 scan gives output associated interface( the one connected using Graphical Tool).

d) I created wpa_supplicant.conf file and executing below command shows wpa_supplicant initialized but does not get IP address. 

      wpa_supplicant -Dnl0211 -iwlan0 -c/etc/wpa_supplicant.conf -B

 

Can anyone please tell me how to connect to any network without using Graphical tool. In my case p2p0 interface is used for Wireless Connection instead of wlan0 interface.

 

nmtui

 

  • Author

As I mentioned in my query I want to connect using command line not any tool or something. nmtui pops out tool for manual selection.

I want to use commands similar like wpa_supplicant and the pass a .conf file which contains ssid,password etc.

Network Manager is garbage.  We had to uninstall it and go with wpa_supplicant on our 90+ tinker boards that we have deployed.  Constant disconnects with Network Manager and wpa_supplicant works all the time.

Hello,

 

could you please share your configuration files (interfaces and wpa_suplicant.conf) as an example on how to achieve WiFi connection using the wpa_supplicant method? 

 

Thanks.

8 hours ago, Ravaz said:

Hello,

 

could you please share your configuration files (interfaces and wpa_suplicant.conf) as an example on how to achieve WiFi connection using the wpa_supplicant method? 

 

Thanks.

create /etc/wpa_supplicant/wpa_supplicant.conf with 

su -c "wpa_passphrase myssid my_very_secret_passphrase > /etc/wpa_supplicant/wpa_supplicant.conf"

myssid = your WiFi-name
my_very_secret_passphrase = you WiFi-Password

 

wlan0-part of /etc/network/interfaces:
 

# wlan0 static ip
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.6.126
netmask 255.255.255.0
gateway 192.168.6.1
dns-nameservers 8.8.8.8 8.8.4.4
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-mode Managed
wireless-power off

# or wlan0 dhcp
# auto wlan0
# iface wlan0 inet dhcp
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

also fill /etc/resolv.conf with

nameserver 8.8.8.8
nameserver 8.8.4.4

 

Basically in 99.99% use case you can configure wifi with

 

wpa_passphrase <your-ssid> <your-passphrase> | wpa_supplicant -B -i wlan0 -c /dev/stdin

ifconfig wlan0 <your-ip> netmask <your-netmask>

route add default gw <your-router-address>

echo "nameserver 8.8.8.8" > /etc/resolv.conf

 

in some old very-deprecated rc startup file.

 

And remove nm ifup zeroconf dhcpd ... and other "wonderfull dynamic modern"  automatic bug generators ...

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.