command line to connect to wi-fi wpa2 instead of using network wizard

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
sieger007
Posts: 5
Joined: Sat Jan 02, 2021 12:28 pm
Location: Dublin,CA
Has thanked: 5 times

command line to connect to wi-fi wpa2 instead of using network wizard

Post by sieger007 »

I followed the instructions in the old puppy forum but I cant get it to run. I get these errors
This is my WPA_supplicant conf file

Code: Select all

-rw-r--r-- 1 root root 539 Aug 10  2022 /etc/network-wizard/wireless/wpa_profiles/82:CE:B9:A0:CC:73.WPA2.conf

The command I used was

Code: Select all

root# modprobe ipw2200  #ran fine

Code: Select all

wpa_supplicant  -i wlan0 -D wext -C "$p9" -dd     #  p9 is the above file path

This is what came off running it

Code: Select all

 wpa_supplicant  -i wlan0 -D wext -C "$p9" -dd
wpa_supplicant v2.9
random: getrandom() support available
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf 'N/A' driver 'wext' ctrl_interface '/etc/network-wizard/wireless/wpa_profiles/82:CE:B9:A0:CC:73.WPA2.conf' bridge 'N/A'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=4 type=1 op=0 soft=0 hard=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0x1f flags 0x0
WEXT: Driver: brcmsmac
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control), operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
wlan0: Own MAC address: cc:52:af:61:5d:d5
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=4 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0
ioctl[SIOCSIWENCODEEXT]: Invalid argument
Driver did not support SIOCSIWENCODEEXT
wpa_driver_wext_set_countermeasures
wlan0: RSN: flushing PMKID list in the driver
wlan0: State: DISCONNECTED -> INACTIVE
TDLS: TDLS operation not supported by driver
TDLS: Driver uses internal link setup
TDLS: Driver does not support TDLS channel switching
wlan0: WPS: UUID based on MAC address: fed846f8-157c-5093-b560-4756ea15d532
ENGINE: Loading builtin engines
ENGINE: Loading builtin engines
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Not a directory
ctrl_iface exists, but does not allow connections - assuming it was leftover from forced program termination
Could not unlink existing ctrl_iface socket '/etc/network-wizard/wireless/wpa_profiles/82:CE:B9:A0:CC:73.WPA2.conf/wlan0': Not a directory
Failed to initialize control interface '/etc/network-wizard/wireless/wpa_profiles/82:CE:B9:A0:CC:73.WPA2.conf'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.

Failed to add interface wlan0
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00 pending_bssid=00:00:00:00:00:00 reason=3 (DEAUTH_LEAVING) state=INACTIVE
TDLS: Tear down peers
wlan0: State: INACTIVE -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5 (IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_countermeasures
wlan0: WPA: Clear old PMK and PTK
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Off-channel: Clear pending Action frame TX (pending_action_tx=(nil)
Off-channel: Action frame sequence done notification: pending_action_tx=(nil) drv_offchan_tx=0 action_tx_wait_time=0 off_channel_freq=0 roc_waiting_drv_freq=0
Remove interface wlan0 from radio phy0
Remove radio phy0
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)

dunno what to make of it. In network wizard there driver shows up as brcmsmac while modproble ipw2200 confirms the latter. Can someone explain whats goin on. Attaching a TAS off N Wiz.

Attachments
a2sd.cleanup.jpg(1).jpg
a2sd.cleanup.jpg(1).jpg (22.58 KiB) Viewed 675 times
User avatar
amethyst
Posts: 2419
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: command line to connect to wi-fi wpa2 instead of using network wizard

Post by amethyst »

User avatar
rerwin
Posts: 156
Joined: Fri Jul 17, 2020 4:35 pm
Location: Maine, USA
Has thanked: 1 time
Been thanked: 82 times

Re: command line to connect to wi-fi wpa2 instead of using network wizard

Post by rerwin »

Will your wifi card not work with the brcmsmac driver? That would be simplist.

If you must use ipw2200, you can add a preference for it in order to override brcmsmac. For details, just ask.

Which puppy are you running?

Richard

User avatar
Jafadmin
Posts: 385
Joined: Tue Aug 04, 2020 4:51 pm
Has thanked: 68 times
Been thanked: 85 times

Re: command line to connect to wi-fi wpa2 instead of using network wizard

Post by Jafadmin »

Here is a CL script I use for WPA. Notice it uses different wpa_supplicant drivers depending on adapter. I arrived at this via trial and error. YMMV.
You can choose whether to use dhcp, or manually config the address.

Code: Select all

#!/bin/sh
# A script to start WPA/WPA2 wireless  
#
XRUNNING=$(ps | grep [X]org)

FAST_CONFIGFILE="/root/wifi/profiles/wifi-5G.WPA2.conf"
SLOW_CONFIGFILE="/root/wifi/profiles/wifi-2.4.WPA2.conf"

use_dhcp=false
NAMESERVER="1.1.1.1"

FastWifi="wlan1"    # 5G adapter
SlowWifi="wlan0"    # 2.4 adapter

WIFI=""
cp /etc/resolv.conf /root/keep/resolv.conf

DownWlan() {
	ip address flush dev $1
	ifconfig $1 down
	pkill wpa_supplicant
	rm /var/run/wpa_supplicant/* 2>/dev/null
	pkill dhcpcd
}	
# if any wifi's are up, shut them down
if [ ! -z "$(ifconfig -a | grep "Bcast:192.168.1")"  ]; then 

	if [ ! -z "$XRUNNING" ]; then 
		Xdialog --title "Message" --timeout 5 --msgbox "Downing WiFi .." 10 30 &
	else echo "Downing WiFi ..";fi	
	DownWlan wlan0
	DownWlan wlan1
	exit
fi
# try fast adapter first
if [ ! -z "$(ifconfig -a | grep $FastWifi)"  ]; then 
	WIFI=$FastWifi
	DRIVER="nl80211"
	CONFIGFILE=$FAST_CONFIGFILE
elif [ ! -z "$(ifconfig -a | grep $SlowWifi)" ]; then
	WIFI=$SlowWifi
	DRIVER="wext"
	CONFIGFILE=$SLOW_CONFIGFILE
fi

DownWlan $WIFI
sleep 1
ifconfig $WIFI up 2>&1
IFUPERROR="" 
while [ -z "$IFUPERROR" ];  # Loop until wlan interface wakes up.
do    
	IFUPERROR=$(ifconfig $WIFI  | grep "UP BROADCAST" )
	sleep 2
done
sleep 5

wpa_supplicant -i $WIFI -D $DRIVER -c $CONFIGFILE -B

if [ "$use_dhcp" = true ] ; then
	Xdialog --title "Message" --timeout 5 --msgbox "Setting Wifi .." 10 30 &
	dhcpcd  $WIFI	
 else # Set an appropriate static IP address/gateway for this network.
	cp -f /root/keep/resolv.conf /etc/resolv.conf
	# Use our own default DNS resolver ..
	echo "nameserver 	$NAMESERVER" >/etc/resolv.conf
	ifconfig $WIFI 192.168.1.220 netmask 255.255.255.0
	route add default gw 192.168.1.1
fi

if [ "$WIFI" = "$FastWifi" ]; then echo "5G" >/root/netwk;
else echo "2.4"  >/root/netwk; fi

sieger007
Posts: 5
Joined: Sat Jan 02, 2021 12:28 pm
Location: Dublin,CA
Has thanked: 5 times

Re: command line to connect to wi-fi wpa2 instead of using network wizard

Post by sieger007 »

rerwin wrote: Wed Oct 04, 2023 3:51 pm

Will your wifi card not work with the brcmsmac driver? That would be simplist.

If you must use ipw2200, you can add a preference for it in order to override brcmsmac. For details, just ask.

Which puppy are you running?

Richard

I am running
fossapup64-9.5

yes isn't that what's being used by network wizard ? ( see the pic prev post ) ...but its got me confused a bit we don't invoke brmsmac as a command line op..do we ? Here's the wpa command being run right now ( behind the covers by the GUI ) as I am connected via Network wizard (

Code: Select all

root     12128     1  0 22:17 ?        00:00:00 wpa_supplicant -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/82:CE:B9:A0:CC:73.WPA2.conf -B

If I kill above and run the same it does connect ( on 2nd or 3rd attempt after kill -9 the existing wpa and rm -rf /var/run/wpa_supplicant/* ) , but not without the below error

Code: Select all

wpa_supplicant -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/82:CE:B9:A0:CC:73.WPA2.conf -B
Successfully initialized wpa_supplicant
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argumen

once I run that I get a "toast" like box that say connecting to "ssidname" and I guess since dhcpd was already running it went head and grabbed an IP . Is this expected and the right command line to run or it should have looked better ?

User avatar
spiritwild
Posts: 85
Joined: Wed Jul 22, 2020 1:34 am
Been thanked: 27 times

Re: command line to connect to wi-fi wpa2 instead of using network wizard

Post by spiritwild »

I had an issue once with wifi on one of my computers running xenial with a USB wifi stick.
The only thing that allowed me to connect was peasy wifi.

This old post has a wealth of info as well for command line issues

https://oldforum.puppylinux.com/viewtopic.php?t=94501

Attachments
peasywifi-4.6.pet
Updated 2018-06-24
(15.09 KiB) Downloaded 18 times
Post Reply

Return to “Beginners Help”