AVP Posted August 1, 2019 Posted August 1, 2019 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.
lanefu Posted August 1, 2019 Posted August 1, 2019 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
AVP Posted August 2, 2019 Author Posted August 2, 2019 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.
Igor Posted August 2, 2019 Posted August 2, 2019 We use Network manager for handling network and there is a command tool utility as well. Google -> https://www.google.com/search?q=nmtui-cli One of the hits: https://www.tecmint.com/configure-network-connections-using-nmcli-tool-in-linux/
sfx2000 Posted August 2, 2019 Posted August 2, 2019 nmcli and nmtui are available as console based versions of the desktop GUI applet.
freak Posted September 5, 2019 Posted September 5, 2019 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.
Ravaz Posted November 6, 2019 Posted November 6, 2019 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.
guidol Posted November 7, 2019 Posted November 7, 2019 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
arox Posted November 7, 2019 Posted November 7, 2019 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 ...
Recommended Posts