How to configure wifi from the commandline

How to do things, solutions, recipes, tutorials
Message
Author
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?

nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#126 Post by nic2109 »

Can someone help with a puzzle please?

What is the command to kill a network interface? I sometimes find that I have either a wired or a wireless interface active but wish to switch to the other. What's the easiest way to do that?

Thanks.
[color=darkblue][b][size=150]Nick[/size][/b][/color]

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#127 Post by trapster »

Code: Select all

ifconfig wlan0 down


Your interface may be different than wlan0
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#128 Post by nic2109 »

trapster wrote:

Code: Select all

ifconfig wlan0 down


Your interface may be different than wlan0
Many thanks. I'll try and remember that. 8)

Might this be a little feature that could be added to the Network wizard? Or am I the only one with this need?
[color=darkblue][b][size=150]Nick[/size][/b][/color]

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

#129 Post by tempestuous »

October 2009
I just edited an earlier post in this thread
with a HOWTO for ad-hoc wifi connections -
http://www.murga-linux.com/puppy/viewto ... 929#159929

nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#130 Post by nic2109 »

@tempestuous: thanks for all you do.

In addition to the incomparable ground-work done by Barry it's thanks to the quiet and patient work put in by you and other gurus that has made Puppy what it is now. :D

Thank you.
[color=darkblue][b][size=150]Nick[/size][/b][/color]

hladik
Posts: 49
Joined: Thu 19 Jun 2008, 14:17

Prism 2 USB wifi puzzle

#131 Post by hladik »

I've been having haphazard results with Macpup and Fatpup...the main problem seems to be that the IP address I specify in the network wizard keeps getting changed or hijacked by some other box or router in the neighborhood. My router interface tells me what it ought to be, 192.x.x.x,
but my pup box IP keeps reading 169.x.x.x. Additionally, sometimes at bootup the USB dongle is not found and also not found upon removing and replugging. How can I get control of this hardware. It's works fine under Win2K. I'm using a Compaq Armada 7400 laptop, 366mghz, 192mb ram. Thanks for any ideas.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#132 Post by mikeb »

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.
Interesting point....puppy 4.12 retro will only connect to wpa2 with wpa_supplicant 0.5.8 and will not with 0.5.10 (standard kernel version has this) so definately something to watch out for

mike

User avatar
QBall2U
Posts: 65
Joined: Thu 02 Apr 2009, 06:11
Location: Somewhere, USA
Contact:

How to configure wifi from the commandline

#133 Post by QBall2U »

Posted: Tue 09 Oct 2007, 05:55 Post subject: How to configure wifi from the commandline

To Tempestuous:

Could these commands be made into a script to be run at boot?

As in:

Code: Select all

# "bring up" the interface unconfigured with this command
ifconfig wlan0 up

# to configure for no WEP encryption on
# open/nonencrypted network
iwconfig wlan0 essid My_ESSID
iwconfig wlan0 key off 
iwconfig wlan0 mode managed

# now to obtain an automatic IP address (DHCP)
# for Puppy 4.0 onwards
rm -f /var/lib/dhcpcd/*.info 
rm -f /var/run/*.pid 
dhcpcd -t 30 -h puppypc -d wlan0
If so, where would I place it (or is there a better way to get my wireless network up at boot)?

I am using an IBM Thinkpad R32 with a Prism2.5 wireless chip; booted with Puppy 4.20 CD (I've tried 4.31 but have had problems getting the network to work...it keeps coming up with an error that it cannot find any network devices when I use the Network Wizard!? I get it once in a great while using Puppy 4.20, also, but only when the signal gets too low then I 're-configure' it. If I do this too often and it comes up with the same error and I have to reboot!?) with everything I've added/changed saved to a USB hard drive.

Thanks,
QBall[/code]

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

#134 Post by tempestuous »

QBall2U wrote:I am using an IBM Thinkpad R32 with a Prism2.5 wireless chip
PCMCIA or USB? If USB, then no, you cannot use those commands, because the driver in use will be prism2_usb which requires a unique configuration process. The Puppy Network Wizard fully accommodates this process, so just use the Wizard.

If PCMCIA, then yes, you can use those commands. Just add them to /etc/rc.d/rc.local
But if you do this, delete any configurations you may have set up in the Network Wizard so that the Wizard does not attempt to do its own wifi connection at bootup.

User avatar
QBall2U
Posts: 65
Joined: Thu 02 Apr 2009, 06:11
Location: Somewhere, USA
Contact:

#135 Post by QBall2U »

tempestuous wrote:
QBall2U wrote:I am using an IBM Thinkpad R32 with a Prism2.5 wireless chip
PCMCIA or USB? If USB, then no, you cannot use those commands, because the driver in use will be prism2_usb which requires a unique configuration process. The Puppy Network Wizard fully accommodates this process, so just use the Wizard.

If PCMCIA, then yes, you can use those commands. Just add them to /etc/rc.d/rc.local
But if you do this, delete any configurations you may have set up in the Network Wizard so that the Wizard does not attempt to do its own wifi connection at bootup.
It is not USB...doesn't a PCMCIA go into the side slot? Forgive me for a dumb question, I'm a bit confused where networking is concerned! The Prism2.5 has a slot inside the laptop, underneath ... I guess that spot is for a network 'card'?

I bought the laptop used and it came with no manuals, and I'm not real familiar with PCMCIA.

I do have a usb Linksys network that I just bought, trying to get a better signal but either the laptop doesn't recognize it or Puppy doesn't?

Thanks! ;)
QBall

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

#136 Post by tempestuous »

OK, it appears you have a miniPCI wifi device -
http://www.thinkwiki.org/wiki/IBM_High_ ... h_Modem_II

That script should work fine.

To clarify; at bootup Puppy should automatically load the hostap_pci driver for this device.

User avatar
QBall2U
Posts: 65
Joined: Thu 02 Apr 2009, 06:11
Location: Somewhere, USA
Contact:

#137 Post by QBall2U »

tempestuous wrote:OK, it appears you have a miniPCI wifi device -
http://www.thinkwiki.org/wiki/IBM_High_ ... h_Modem_II

That script should work fine.

To clarify; at bootup Puppy should automatically load the hostap_pci driver for this device.
That was a quick reply! :o

Yep, that looks like the critter, alright!

How do I know if it is loading the hostap_pci driver at bootup ... I mean, is there some config file or script that I can take a look thru and check to be sure that it is (and that I haven't messed something up somewhere along the lines)?

Thanks tempestuous for your help!

QBall

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

#138 Post by tempestuous »

Run "lspci" at the commandline to list all loaded modules (drivers).

User avatar
QBall2U
Posts: 65
Joined: Thu 02 Apr 2009, 06:11
Location: Somewhere, USA
Contact:

#139 Post by QBall2U »

All I get when I do that is:

Code: Select all

00:00.0 Class 0600: 8086:1a30 (rev 04)
and a bunch more stuff pretty much like that ... what is it sposed to signify?

Thanks,
QBall[/code]

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

#140 Post by tempestuous »

Oops, sorry. The command is "lsmod".

Post Reply