How to configure wifi from the commandline

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#91 Post by gyro »

01micko wrote:@ normanp
Be sure if using the wizard to set your preferred DNS IP the same as the gateway IP if using static IP. Works for me. :wink:
But that does not mean it will work for others.
If your modem/router (gateway), implements a caching name server, then sending DNS requests directly to it, will work. But many modem/routers do not, so their dhcp server passes on the DNS server addresses it gets from your ISP. In this case you would need to configure DNS to be the addresses provided by your ISP, if you do static IP configuration.
Of course if you can get dhcp to work, then these things are taken care of, automatically.

gyro

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#92 Post by gyro »

01micko wrote:Is there a problem with dhcpcd? I can connect with dhcpcd with the first machine I boot, but if I boot the next machine I must use a static IP.
I'll explain (btw, same with 4.1 or 4.11 on either machine)
I configure machine "a" with dhcpcd and connect just fine. I'll configure machine "b" the same and it won't connect using the wizard or from the command line. The result is dhcpcd continues and I get message "wlan0 sleeping for 10 seconds". So I abort and set up with a static IP.
Now if I boot machine "b" first, it will connect with the saved static IP fine. Then I'll boot machine "a" and it wont connect. Workaround is to assign it a static IP. All well and good but it is not the solution. :?
Any ideas?
What IP address do you get when you successfully connect only machine "a" with dhcp?
What is the "range" configured in the dhcp server on your modem/router?

gyro

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#93 Post by 01micko »

gyro said
What IP address do you get when you successfully connect only machine "a" with dhcp?
What is the "range" configured in the dhcp server on your modem/router?
192.168.33.2
192.168.33.2 to 192.168.33.254

Mind you I am using an obscure router, a Synet Windy31. Runs thru a window$ box so I can share my wireless broadband. Works fine.

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#94 Post by gyro »

01micko wrote: 192.168.33.2
192.168.33.2 to 192.168.33.254

Mind you I am using an obscure router, a Synet Windy31. Runs thru a window$ box so I can share my wireless broadband. Works fine.
Sorry 01micko, I was just wondering if there was a reason why it might appear that the dhcp server on your router had only 1 IP address to lease.
But it looks as though the router config is fine. So I'm back to being mystified.

Gyro

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#95 Post by 01micko »

Gyro said
Sorry 01micko, I was just wondering if there was a reason why it might appear that the dhcp server on your router had only 1 IP address to lease.
But it looks as though the router config is fine. So I'm back to being mystified.
Yesterday I introduced a vi$ta(call it "c") machine to the equation. My main puppypc (a) was running as usual (dhcpcd assigned 192.168.33.2 as normal) and the vi$ta box, machine "c", connected with dhcp assigning it 192.168.33.3 with no problems. This only makes me more suspiscious of a dhcpcd problem in puppy with more than one puppypc on the network. I'll stuff around some more with these three machines to see what I can come up with. Mind you it may take some time because the new machine is a Chrissy present for my son, so have to play with it when he is at school. I'm sure the new machine will become a puppypc too because my son has grown to like puppy. :wink:
Puppy Linux Blog - contact me for access

brazilnut
Posts: 2
Joined: Sun 23 Nov 2008, 11:17

Puppy running on the Eeepc 4g

#96 Post by brazilnut »

As a NEWBIE, I openly admit that I don't yet know what I'm doing. However, by repeated tries, I now have 4.1.1 running nicely in a usb pen drive, with ooo_cutdown 3.2.2.0 running within it. It is my intention to maintain the XANDROS in "mint condition" so that if everything else fails, I still have that working. I do get connectivity through the wired port in Puppy. I haven't tried the webcam or mic yet, but that will come later. UP TO NOW, I AM FINDING THE INTERFACE AND DESKTOP OF PUPPY FAR SUPERIOR TO SEVERAL OTHERS I'VE EXPERIMENTED WITH.
Now, to my headache... I've tried to follow carefully the different instructions that are posted, but I'm still not doing something right to get the wifi recognized at boot so I can configure it.
The only hardware alteration I've made to my "pearlywhite" (I love that description!) is that I've increased the ram to 1 gig.
Any suggestions appreciated!
Brazilnut

brazilnut
Posts: 2
Joined: Sun 23 Nov 2008, 11:17

Puppy running on the Eeepc 4g

#97 Post by brazilnut »

As a NEWBIE, I openly admit that I don't yet know what I'm doing. However, by repeated tries, I now have 4.1.1 running nicely in a usb pen drive, with ooo_cutdown 3.2.2.0 running within it. It is my intention to maintain the XANDROS in "mint condition" so that if everything else fails, I still have that working. I do get connectivity through the wired port in Puppy. I haven't tried the webcam or mic yet, but that will come later. UP TO NOW, I AM FINDING THE INTERFACE AND DESKTOP OF PUPPY FAR SUPERIOR TO SEVERAL OTHERS I'VE EXPERIMENTED WITH.
Now, to my headache... I've tried to follow carefully the different instructions that are posted, but I'm still not doing something right to get the wifi recognized at boot so I can configure it.
The only hardware alteration I've made to my "pearlywhite" (I love that description!) is that I've increased the ram to 1 gig.
Any suggestions appreciated!
Brazilnut

dirks
Posts: 2
Joined: Sun 23 Nov 2008, 18:56

#98 Post by dirks »

Hello guys,

I try now 1 and a half day to run my wifi. I have a conceptronic C45RU USB stick and normal it working with the kernel module rt73.

I try to use the wizard and do it manual. I try to start with

Code: Select all

wpa_supplicant -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -d 
. I try it with different encrypt moules. Nothing work. But a few hours ago I was able to connect my router with wpa2. It works fine and I was happy.
So I try do install wpa from startup and after the first startup nothing works

iwconfig says Encryption Key:off.

Why it is not possible to set up with encryption? Without no problem but with.... :evil:

Thanks

d.

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

#99 Post by tempestuous »

brazilnut wrote:I'm still not doing something right to get the wifi recognized at boot so I can configure it.
http://www.murga-linux.com/puppy/viewto ... 740#237740

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

#100 Post by gyro »

01micko wrote: This only makes me more suspiscious of a dhcpcd problem in puppy with more than one puppypc on the network.
Just one more guess. Maybe your dhcp server dosen't like more than 1 request from the same hostname. By default all Puppy machines have a hostname of "puppypc". This can be modified by replacing "puppypc" in both "/etc/hostname" and "/etc/hosts" with a name of your choice, but different on each pc.
Actually to test the theory you only have to change the hostname on 1 of the pc's.

PS: sorry, it's been a while since I looked at this topic.

gyro

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#101 Post by 01micko »

gyro wrote:
01micko wrote: This only makes me more suspiscious of a dhcpcd problem in puppy with more than one puppypc on the network.
Just one more guess. Maybe your dhcp server dosen't like more than 1 request from the same hostname. By default all Puppy machines have a hostname of "puppypc". This can be modified by replacing "puppypc" in both "/etc/hostname" and "/etc/hosts" with a name of your choice, but different on each pc.
Actually to test the theory you only have to change the hostname on 1 of the pc's.

PS: sorry, it's been a while since I looked at this topic.

gyro
I think you are onto it. I booted 2 windows machines then my puppy laptop(dhcpcd) and no problems. The other puppy machine runs a frugal install so it shouldn't be too hard to change the hostname. Thanks gyro

UPDATE: Yes it works! However to ensure everything saves and survives a reboot I had to unload my wireless module, reload it and I even changed the name of the saved profile in Network Wizard. Survived :)
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#102 Post by 01micko »

Got a new lappy for my young fellow for Chrissy and did the 'ol configure wifi by command line thing.
A point to note:. As I solved the problem of multiple puppies on one wifi network with the altering of '/etc/hosts' and '/etc/hostname' this changes something in the 'howto'.
I have one machine named 'puppypc'. Subsequent machines are named 'puppypc0', 'puppypc1, .... etc. Now you can name them whatever you want but the point is this.

When you get to the line in the 'howto' calling 'dhcpcd'

Code: Select all

dhcpcd -t 30 -h puppypc -d eth1
you must substitute 'puppypc' with whatever name you change yours to. For me it is 'puppypc1' or whatever machine I am refering to.

Hope this helps someone.

PS: This works in Mandriva too, and I suspect any other linux.
Puppy Linux Blog - contact me for access

stu
Posts: 7
Joined: Mon 01 Oct 2007, 11:25

#103 Post by stu »

Hi i am try to get wireless working on a old dell laptop with a rtl8180 card. i have put my key and ssid in the conf file, but when i run the wpa_supplicant command i get a wpa:4-way handshake failed - pre shared key maybe incorrect error?

i have double checked the key and i have also had ubuntu workin on the laptop with the card.

if anyone has any idea what i am doing wrong that would be great! :)

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#104 Post by rjbrewer »

Stu;

Don't know if this will help.
When I had pup4.0 installed it would time time out trying to make
wpa connection; then still connect after running dhcpd.

I'm using pup4.1.2 now and everything works smooth as silk.

I have atheros card, may not give same results.

rjb

stu
Posts: 7
Joined: Mon 01 Oct 2007, 11:25

#105 Post by stu »

thanks for the reply rjb

got it working in the end, it connected even though i got the error. After i put dhcpcd -d wlan0 it started working :)

i tried for ages with the network manager gui, but thanks to the command line instructions i got it working great now :)

only prob was i had to make a script to start it again after a reboot.

Stu

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.

Post Reply