How to configure wifi from the commandline

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
mdisaster2
Posts: 106
Joined: Fri 22 Dec 2006, 08:30
Location: Rome, Italy

#106 Post by mdisaster2 »

Command line instructions worked great for me as well. The Sitecom WL-113 USB adapter doesn't like the Network Wizards, but my connect script based on the instructions is working like a charm. 8)

(suggestion: these instructions are invaluable to people that get stuck while trying to configure a wireless-only machine. Maybe they should be included in the documentation or in the Network Wizard help together with a couple of sample scripts ? )

habscout
Posts: 1
Joined: Mon 16 Feb 2009, 14:39

#107 Post by habscout »

I am a Puppy Linux newbie, and have a basic question. When I enter the key in hex, do I have to include the colon separators ?

eg. aa:bb:cc:dd:ee:ff or aabbccddeeff ?

Are quotation marks optional or mandatory ?

eg. "aa:bb:cc:dd:ee:ff" or "aabbccddeeff" ?

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#108 Post by tempestuous »

With the "iwconfig" configuration utility, colons should not be used.
There is an exception: the prism2_usb driver uses the "wlanctl-ng" configuration utility, and colons should be used in this case.

Quotation marks can be used, but they're not necessary with hex values. Quotation marks are useful with alphanumeric passwords, so that spaces and special characters can be handled.

Lemop
Posts: 8
Joined: Fri 24 Apr 2009, 14:09

#109 Post by Lemop »

Complete Novice Here please bear with me

Wireless NW Prob

Downoaded isp Puppy Linux 4.2k2.6.25 16 seamonkey
Checked md5 = OK
Burnt Cd=OK


Router= Buffalo Airstation Wireless G High Power Model = WHR HP g54
Security = WPA-PSK, AES


PCMCIA = Cardbus USB 2.0 adapter 4 usb ports (Nec)
Toshiba ToOIC97 Card Bus controller * 2
Driver Provider Msoft
c:\windows\system32\DRIVERS\pcmcia.sys v5.1.2600.21800

USB = Sitecom Wireless Network USB Adapter Turbo G WL-172
Manufacturer= Sitecom Europe BV
Driver Provider= Ralink Technology Corp
c:\windows\system32\Drivers\rt73.sys



Test installed to Intel 3GHz 4GBMem with wired connection from cd
perfect install and straight to net no probs whatsoever.
Even used provided menu and installed to usb stick with no probs and after setting bios boots fine.


Eventually want to install to USB stick
CD Installed To Toshiba Tecra 8000 Model PAT 800E-F96A-EN, Pentium II 333MHz, 256 Mb RAM

Installed to desktop appearance

Try Setup Wireless Network
Many combinations
Scan always finds my SSID (power/strength XP=100% Puppy = 57/100 @ 2feet from router)
Config always fails no matter the combination of settings are tried


Question:

Found thread: how to set wireless network command line
tempestuous Posted: Sat 08 Dec 2007, 22:23

Menu install and system interface nfo report wlan0 and rt73usb

Encryption not loaded from your list crc32c (manual load)
Encryption not loaded from your list aes_generic (manual load)
checked system interface both now loaded
encryption list matches

modprobe rt73usb (no error)
ifconfig wlan0 up (no error)
ifconfig mode managed (no error)
iwpriv wlan0 set AuthMode=WPASK (error below)
wlan0 no private ioctls.

Googled error report and seems to point to driver limitation

Any pointers would be appreciated

Added later: I forgot to say I can connect ok without encryption.


Regards

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#110 Post by tempestuous »

Lemop wrote:iwpriv wlan0 set AuthMode=WPASK
No. That only applies to the old rt2500/rt2570/rt61/rt73 drivers.
Yours is the modern rt73usb, so configuration is -

Code: Select all

ifconfig wlan0 up
rm /var/run/wpa_supplicant/*
wpa_supplicant -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf -dd
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
dhcpcd -t 30 -h puppypc -d wlan0
"modprobe rt73usb" should not be necessary because Puppy will probably load that module automatically.
Lemop wrote:ifconfig mode managed
That command is wrong, it should be -

Code: Select all

iwconfig wlan0 mode managed
but it's not necessary for WPA connections anyway, only for WEP.

Lemop
Posts: 8
Joined: Fri 24 Apr 2009, 14:09

#111 Post by Lemop »

RE: tempestuous

My apologies the "ifconfig wlan0 mode managed" was entered correctly but i did not type it correctly

Better to cut and paste (now I've found out how to do that from the console)

I entered the code and the results are pasted below.
I stopped it (another learned item eventually) as it was going to run forever.

# ifconfig wlan0 up
# rm /var/run/wpa_supplicant/*
# wpa_supplicant -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf -dd


Initializing interface 'wlan0' conf '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf' -> '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf'
Reading configuration file '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ap_scan=1
update_config=1
Line: 5 - start of a new network block
ssid - hexdump_ascii(len=7):
64 65 66 61 75 6c 74 default
scan_ssid=1 (0x1)
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
proto: 0x1
key_mgmt: 0x2
pairwise: 0x8
group: 0x8
PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='default'
Initializing interface (2) 'wlan0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:0c:f6:38:f7:61
wpa_driver_wext_set_wpa
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_countermeasures
ioctl[SIOCSIWAUTH]: Operation not supported
WEXT auth param 4 value 0x0 - wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
***** and so on

Any pointers in there to help or have i messed up again, although I have learned a couple of operations just to stop and copy the ouput so all is not wasted.

Thank you for any help you can give me

Lemop

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#112 Post by tempestuous »

Lemop wrote:My apologies the "ifconfig wlan0 mode managed" was entered correctly
Well it's still wrong - the correct command is "iwconfig" not "ifconfig". And you shouldn't run that command, anyway. It might mess things up for WPA.
Lemop wrote:wpa_supplicant ... /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf
I see that your configuration file is wpa_supplicant.conf. So let's check that your wifi router is using WPA encryption, right?
If it's set for WPA2 encryption, then your configuration file should be wpa_supplicant2.conf

And you have modified the configuration file to include your SSID and Personal Security Key, too?

Lemop
Posts: 8
Joined: Fri 24 Apr 2009, 14:09

#113 Post by Lemop »

REF:tempestuous

hi, and thanks for you help


this is what I do, and answers a couple of your queries.



01. Router = AES 1 (one) from screen and Buffalo Tech Spt


02. Boot Puppy to ram, del puppy files from ntfs hd part, shutdown no saves


03. Boot Puppy (ps2, kb and xorg) to desktop


04. load via system tools aes_generic and crc32c to match encrypt list


05. Mount usb stick (txt files from windows vista forum post)

06. Open file from usb stick in leaf (for cut and paste) last cmd set given on forum


ifconfig wlan0 up
rm /var/run/wpa_supplicant/*
wpa_supplicant -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf -dd
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
dhcpcd -t 30 -h puppypc -d wlan0

07. Open in genie
/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf


08. Edit
and save (in genie)
ctrl_interface=/var/run/wpa_supplicant

ap_scan=1

update_config=1


network={

ssid="my ascii ssid in the quotes"

scan_ssid=1
psk="my ascii key in the quotes"

proto=WPA

key_mgmt=WPA-PSK

pairwise=TKIP

group=TKIP

}

09. Do not understand TKIP in pairwise and group, AES maybe?

10. Point to note:cannot locate /var/run/wpa_supplicant


11. Open rxvt

12. Copy one line command from leaf file.

13. Paste and run one line command to rxvt cursor.

output below

# ifconfig wlan0 up

# rm /var/run/wpa_supplicant/*

rm: cannot remove `/var/run/wpa_supplicant/*': No such file or directory

# wpa_supplicant -i wlan0 -D wext -c /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf -dd

Initializing interface 'wlan0' conf '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf'
driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf' ->
Reading configuration file '/etc/network-wizard/wireless/wpa_profiles/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ap_scan=1

update_config=1

Line: 5 - start of a new network block

ssid - hexdump_ascii(len=12):
62 75 66 66 61 6c 6f 77 69 6e 67 73 my ssid in open ascii
scan_ssid=1 (0x1)
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
proto: 0x1

key_mgmt: 0x2

pairwise: 0x8

group: 0x8

PSK (from passphrase) - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='my ssid in open ascii'
Initializing interface (2) 'wlan0'

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: External notification - portEnabled=0

EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf

capabilities: key_mgmt 0xf enc 0xf

WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:0c:f6:38:f7:61

wpa_driver_wext_set_wpa

wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0key_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_countermeasures

ioctl[SIOCSIWAUTH]: Operation not supported

WEXT auth param 4 value 0x0 - wpa_driver_wext_set_drop_unencrypted

Setting scan request: 0 sec 100000 usec

Added interface wlan0

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

Wireless event: cmd=0x8b06 len=8
Attachments
AES.JPG
AES Setting in router
(39.91 KiB) Downloaded 1335 times

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#114 Post by tempestuous »

Lemop wrote:Router = AES 1 (one) from screen and Buffalo Tech Spt
AES is WPA2 encryption, not WPA. Buffalo have done you a disservice if they don't explain that in their documentation.
So you should be using wpa_supplicant2.conf, not wpa_supplicant.conf.

Open /etc/network-wizard/wireless/wpa_profiles/wpa_supplicant2.conf in Geany and enter your SSID and Personal Security Key.
Then run the setup commands.

Lemop
Posts: 8
Joined: Fri 24 Apr 2009, 14:09

#115 Post by Lemop »

Edited supplicant2 (with ssid and key/passphrase)
Issued commands 1 at a time and again
after the wpa_supplicant line it started unexpected output as it has from the beginning.

One thing of note, I do not like the distro, but CrashBang installs from start to finish without a hitch, finds wireless nets, lets me choose my own then all it asks for is the PSK which I give it and voila it is all connected.

I tried to follow the files as on puppy but I'm too much of a beginner at this and cannot see the simialarities to puppy.

Something simple I'm sure but to me ..................

Thanks again for your help

Boomerian
Posts: 4
Joined: Tue 26 May 2009, 17:25

Puppy 4.2.1 and Broadcom 4320 wireless adapter

#116 Post by Boomerian »

Installed the latest to Celeron 400 processor/256M RAM/6.4G HDD-old eMachine 400ix eTower but should be plenty, right?
Linksys WMP54g adapter with 14e4:4320 (rev 03) -can't get it to work with B43 or B43Legacy; tried Ndiswrapper with Bcmwl5.inf Windows driver. No luck. I know this Broadcom chipset is a bugger for any Linux-I've been trying for years-it worked with Dreamlinux, and had the Linuxant driverloader with MepisLite up and running.
I'm trying and willing to learn, but this is getting old. I thought the latest Puppy had taken care of this...? Eager to "house-train" the Puppy, but need some guidance.
Any help greatly appreciated. Cheers,

OlddogNewtricks
Posts: 124
Joined: Sun 07 Jun 2009, 10:10
Location: U.K.

Pup 2-kernel 2.6.18.1 & WPA2

#117 Post by OlddogNewtricks »

Is a WPA2 encrypted connection possible for Pups 2.13 to 2.16 which use kernel 2.6.18.1.
Modules 'ecb' & 'blkcipher' seem to be missing. Can these modules be compiled or is the kernel too old.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#118 Post by tempestuous »

You're right, the encryption modules blkcipher (block cipher) and ecb (electronic codebook) are not available in the 2.6.18 kernel.

But the 2.6.18 kernel still has core support for WPA2 encryption in the form of the ieee80211_crypt_ccmp module. And I seem to recall several testers reporting success with WPA2 with this kernel.

I suspect that in later kernels some functionality of the ieee80211_crypt_ccmp module was split out into separate modules such as ecb and blkcipher.

OlddogNewtricks
Posts: 124
Joined: Sun 07 Jun 2009, 10:10
Location: U.K.

Pup 2-kernel 2.6.18.1 & WPA2

#119 Post by OlddogNewtricks »

Thanks for clearing that up tempestuous. Tried ieee80211_crypt_ccmp but no joy there.
I presume this will also be the case with BK's new pup 2.18 if/when he upgrades to kernel 2.6.18.8.
Still, pup 2.17 works fine with an upgraded net-wizard.

boseji
Posts: 4
Joined: Sat 13 Jun 2009, 11:45

Trouble with Buffalo WLI-U2-KG54 USB Wireless Lan Dongle

#120 Post by boseji »

Hello,

I have stated using the PuppyLinux 4.2.1
I am unable to connect to the Wifi network.
My PC is P3 1GHz Coppermine 256MB SDRAM 100MHz with Wireless USB Dongle: Buffalo WLI-U2-KG54
I am using CD Rom to boot the Puppy Linux.

At present the Puppy Network Wizard recognizes this device as
"usb:Buffalo WLI-U2-KG54" with "rt2500usb" as Module.

I have tried to use the Pwireless-0.8.4 from the Top menu.
It is able to show my wireless Lan and also the Encryption.
I use a WPA2 AES128bit encryption which requires me to enter a text password. When I click on Connect selecting the Wifi network, I get a prompt asking for WEP password. I give that correctly but still the IP address returned in a wrong or the default ones. My Wifi Router at present is behaving as a Bridge for my ADSL router connected to its WAN port.
Please help me out with this connection issue.
I am bad need to move on to linux and dump off my old Windows box to have some good use of it.

Warm Regards,
Boseji

OlddogNewtricks
Posts: 124
Joined: Sun 07 Jun 2009, 10:10
Location: U.K.

Re: Pup 2-kernel 2.6.18.1 & WPA2

#121 Post by OlddogNewtricks »

Hi tempestuous, do you remember this not so long ago
OlddogNewtricks wrote:Is a WPA2 encrypted connection possible for Pups 2.13 to 2.16 which use kernel 2.6.18.1.
Modules 'ecb' & 'blkcipher' seem to be missing. Can these modules be compiled or is the kernel too old.
Well heres a copy of a post I've made on ttuuxx's post 'upgrading the 2 series'

Great news (for me anyway)
I've always assumed my WPA2 encrypted router (Thompson Speedtouch 585v6) would not connect because the kernel was too old and lacked modules. However in an idle moment when it was switched on I booted up 214X4, tapped in my settings & wow it worked. So tried pup 2.14, which needed a new network wizard & gtkdialog3 to run it. Then 2.16 which needed just the net wizard & finally 2.13 which would not work whatever I installed. It was on this pup that I did all my wireless testing for this kernel therefore leading me up the garden path regarding kernel, modules, wirless tools, wpa_supplicant & all the rest.

So well done ttuuxxx for helping to solve this mystery & of course dougal for his endless work on net wizards.

So good news. Any ideas what might be lacking in 2.13.

tempestuous
Posts: 5464
Joined: Fri 10 Jun 2005, 05:12
Location: Australia

#122 Post by tempestuous »

The fact that WPA2 encryption works in Puppy 214 is nothing new.
I helped Dougal add the WPA2 configuration options to the Network Wizard at that stage, in collaboration with several other testers.

There have only been a few WPA2 failures with Puppy 2.12-2.14 reported on the forum, and all these reports failed to indicate the exact process followed, and configuration details. So there was a better-than-average chance that the user was at fault, not Puppy.

It may also have been due to an outdated version of the Network Wizard being used.

Or it may have been due to an incompatibility between the wifi router in use, and the particular wifi adaptor/driver.

Or the particular wifi device in question may have required a special configuration change to the "ap_scan" value in wpa_supplicant.conf.

OlddogNewtricks
Posts: 124
Joined: Sun 07 Jun 2009, 10:10
Location: U.K.

#123 Post by OlddogNewtricks »

tempestuous, success, apart from the updated net-wizard it needed wpa_supplicant-0.5.7.1 where I've been using wpa_supplicant-0.6.0. In the end a simple fix made 10 times difficult by me. Thanks for your help.

five
Posts: 5
Joined: Thu 16 Jul 2009, 02:49

#124 Post by five »

Got this working, thanks for the guidance.

Using a Linksys WPC600 on both WPA2 (AES) and unencrypted networks.

firepants-jr
Posts: 13
Joined: Thu 06 Aug 2009, 02:10
Location: Tulsa, OK, USA
Contact:

no pup wifi

#125 Post by firepants-jr »

jonyo wrote:
pup wifi http://puppylinux.org/wikka/WiFi
followed link. go this
This page doesn't exist yet. Maybe you want to create it?

Post Reply