Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 Oct 2014, 02:10
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to configure wifi from the commandline
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 13 [182 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 11, 12, 13 Next
Author Message
stevesr0

Joined: 24 Jun 2007
Posts: 169

PostPosted: Sat 23 Aug 2008, 22:54    Post subject:  

I Googled around and found a statement that the configuration files are saved as /etc/name of adaptermode and /etc/name of adapter wireless.

In /etc, I found /etc/eth0mode, /etc/eth0oldmode, /etc/eth0wireless, /etc/wlan0mode and /etc/wlan0wireless.

The three mode files all have the following content:
echo "Trying to get IP address from DHCP server (60sec timeout)..."
echo "Trying to get IP address from DHCP server (60sec timeout)..." > /dev/console
rm /etc/dhcpc/dhcpcd-adapter name.pid 2>/dev/null #if left over from last session, causes trouble.
rm /etc/dhcpc/dhcpcd-adapter name.cache 2>/dev/null #ditto
rm /etc/dhcpc/dhcpcd-adapter name.info 2>/dev/null #ditto
if [ ! -f /root/.dhcpcd.duid ];then
[ -d /etc/dhcpc ] && dhcpcd adapter name || dhcpcd -I '' eth0
else
#[ ! -d /var/lib/dhcpcd ] && mkdir /var/lib/dhcpcd
#[ -s /root/.dhcpcd.duid ] && cp /root/.dhcpcd.duid /var/lib/dhcpcd/dhcpcd.duid
dhcpcd adapter name
fi
and the two wireless files are very similar:

wlan0wireless:
#Configure the wireless interface
echo "Configuring wireless interface wlan0"
ifconfig wlan0 up

iwconfig wlan0 essid "name"
iwconfig wlan0 mode managed
iwconfig wlan0 key open wep key

eth0wireless:
#Configure the wireless interface
echo "Configuring wireless interface eth0"
ifconfig eth0 up

iwconfig eth0 essid "name"
iwconfig eth0 channel x
iwconfig eth0 mode managed
iwconfig eth0 ap xxxxxxxxxx
iwconfig eth0 key open wep key

The eth0 wireless file is the one I select after rebooting to successfully configure my wifi and I then connect via auto DHCP.

Are you suggesting that my problems may be because there are multiple wireless and/or mode files in addition to the code I wrote into my rc.local file?

...And, as a corollary, eliminating the running of these files at boot (by deleting or renaming them) would then likely lead to the running of the rc.local file?

Steve
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5271
Location: Australia

PostPosted: Sun 24 Aug 2008, 05:17    Post subject:  

stevesr0 wrote:
Are you suggesting that my problems may be because there are multiple wireless and/or mode files in addition to the code I wrote into my rc.local file?

Yes

stevesr0 wrote:
...And, as a corollary, eliminating the running of these files at boot (by deleting or renaming them) would then likely lead to the running of the rc.local file?

Yes
Back to top
View user's profile Send private message 
stevesr0

Joined: 24 Jun 2007
Posts: 169

PostPosted: Sun 24 Aug 2008, 18:03    Post subject: Solved, if I broadcast  

Deleting the files didn't work.

I then tried adjusting the rc.local file by adding the address of the router and removing the route add gw command. No change.

Finally, recalling past experience having a problem configuring when my router wasn't broadcasting (and rarsa's comment about broadcasting NOT improving security), I changed the router setting to broadcast the ssid.

In my next (and only, so far) reboot, the connection was automatically made.

It is peculiar that neither my linux based Nokia internet tablet nor this laptop (with Puppy) when running Windows XP have a problem connecting without my router broadcasting.
Somehow, I still feel more secure if my router is not broadcasting.

In rarsa's thread on getting his bcm43xx using computer to autoconnect, he mentions a revised network file (for 4.01, but said to probably work on earlier puppies) on the developer blog. I read the note and tried to look at the file (following a link to ibiblio) but got a 404 error.

Thanks for your help. I am glad to remove extra files when I can. It makes me feel a little more in charge of my system.

Steve
Back to top
View user's profile Send private message 
fleamour

Joined: 19 May 2008
Posts: 151
Location: UK

PostPosted: Mon 08 Sep 2008, 08:51    Post subject:  

Both my network printers print the boxed out code as gobbledygook?!? Not the greatest of help really.
Back to top
View user's profile Send private message 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Mon 08 Sep 2008, 16:31    Post subject:
Subject description: Has anyone got an Intel PRO/Wireless 3945ABG mini-PCI card to work with WPA encryption?
 

Hi; under Puppy 3 and 4.0 this all works just fine with the now obsolete iwp3945 driver module. But with the newer kernels where the module is iwl3945 it's a different story.

I've tried this all the way including the last section on Trouble-shooting encryption but still it's no good - no WPA encrypted wireless. Sad .

Open works, WEP works, but WPA is a no-no. Old Network Wizard; new Network wizard; command-line (as per this How-to) are all the same.

Specifically, with the command-line the wpa_supplicant command just loops round endlessly.

Would it be helpful to capture the output and post it? If so, how? I tried to > it into a logfile but that didn't work as some of the output was treated as a command and did some very strange things.

_________________
Nick
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5271
Location: Australia

PostPosted: Mon 08 Sep 2008, 20:22    Post subject:  

Try the updated wpa_supplicant-0.5.10 from here -
http://www.murga-linux.com/puppy/viewtopic.php?p=229841#229841

This new version should play better with the new "mac80211" family of wifi drivers in Puppy4.1.
Back to top
View user's profile Send private message 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Tue 09 Sep 2008, 16:28    Post subject:  

tempestuous wrote:
Try the updated wpa_supplicant-0.5.10 from here -
http://www.murga-linux.com/puppy/viewtopic.php?p=229841#229841

This new version should play better with the new "mac80211" family of wifi drivers in Puppy4.1.


Thanks, I've tried that but sadly it's no better. Here's a screenshot of the rvxt window following the the loading of the encryption modules and the wpa_supplicant command (sorry, but I couldn't get it to log into a file). Left to its own devices it loops round and round giving that output.

Sadly it means nothing to me, but does it tell you anything?
wpa_supplicant.png
 Description   
 Filesize   25.9 KB
 Viewed   762 Time(s)

wpa_supplicant.png


_________________
Nick
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5271
Location: Australia

PostPosted: Wed 10 Sep 2008, 06:59    Post subject:  

I did a Google search for "iwl3945 wpa_supplicant" and I see a lot of stories about problems with hidden SSID's. This seems to match with forum member JustGreg's findings.
So the first thing you should do is configure your router to broadcast the SSID - which, according to rarsa, is actually more secure than a hidden SSID.
Then you should continue running the wpa_supplicant command manually, trying different "ap_scan=" values in /etc/wpa_supplicant.conf (or /etc/wpa_supplicant2.conf for WPA2). Try the values "0", "1", and "2".
Back to top
View user's profile Send private message 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Sat 20 Sep 2008, 15:57    Post subject:  

tempestuous wrote:
I did a Google search for "iwl3945 wpa_supplicant" and I see a lot of stories about problems with hidden SSID's. This seems to match with forum member JustGreg's findings.
So the first thing you should do is configure your router to broadcast the SSID - which, according to rarsa, is actually more secure than a hidden SSID.
Then you should continue running the wpa_supplicant command manually, trying different "ap_scan=" values in /etc/wpa_supplicant.conf (or /etc/wpa_supplicant2.conf for WPA2). Try the values "0", "1", and "2".

Sorry about the pause - been away again.

I'm afraid that none of your suggested values worked. They timed out at different speeds, and some of the messages looked a bit different; but still no WPA connection. Sad

_________________
Nick
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5271
Location: Australia

PostPosted: Sat 20 Sep 2008, 19:05    Post subject:  

I think it's worth revisiting the issue of encryption-related modules. I seem to recall that the Intel wifi drivers require a particular encryption module; "michael_mic".

So I suggest that before you run the wpa_supplicant command you first run "lsmod" to see what modules are loaded, looking for the following:

aes_generic
arc4
crc32c
crypto_blkcipher
ecb
michael_mic

If any of these is not loaded, load it manually with "modprobe xxx"
then try the wpa_supplicant command again.
Back to top
View user's profile Send private message 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Mon 22 Sep 2008, 12:27    Post subject:  

tempestuous wrote:
I think it's worth revisiting the issue of encryption-related modules. I seem to recall that the Intel wifi drivers require a particular encryption module; "michael_mic".

So I suggest that before you run the wpa_supplicant command you first run "lsmod" to see what modules are loaded, looking for the following:

aes_generic
arc4
crc32c
crypto_blkcipher
ecb
michael_mic

If any of these is not loaded, load it manually with "modprobe xxx"
then try the wpa_supplicant command again.

Thanks. I'll give that another try soon and report back.

Sorry that my attempts nave been rather intermittent, but as I use wireless most of the time, and as others in the household do so all the time, I find that it's only when I don't want to do anything else that I boot up with the newest kernel version and have another go with WPA! My opportunities for fiddling with the wireless settings are fairly limited.

I do have another question that may or may not be germain. In the wpa_supplicant.conf file where we put in our secret pass-phrase, should that be the straight string as we set it up in the router? Or should it be the encrypted value? I have observed that the same file in working (i.e. older kernel) versions have it stored as encrypted, so I have copied that value. Could this be what's screwing it up? It occurs to me that I may have caused my own problems here and wasted our time. But then, if that's true at what point in the process does the encrypted value get written back to over-write the original value? Where I have got WPA to work the .conf file always has a scrambled and unreadable passphrase.

Later Update

Well; what I actually did was to d/l and try 4.1 beta - the latest kernel version. And lo; it worked, right out of the box! Very Happy

Whether it's the network wizard or something else I don't actually know. But for me the struggle is now over.

@Tempestuous If you would like me to try out some other settings on my previous 4.1 (alpha 6 actually) in the interests of understanding then please let me know.

Or we could just give thanks for what we have received and move on.

_________________
Nick
Back to top
View user's profile Send private message 
tempestuous

Joined: 10 Jun 2005
Posts: 5271
Location: Australia

PostPosted: Tue 23 Sep 2008, 18:39    Post subject:  

Nick,
what would be useful is if you could establish a WPA2 connection, then run "lsmod" and list here exactly which of the encryption modules that I mentioned above are loaded.
This may help us troubleshoot encryption problems for others.
Back to top
View user's profile Send private message 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Thu 25 Sep 2008, 17:50    Post subject:
Subject description: Encryption Modules
 

@Tempestuous As you requested I have run lsmod looking for the various encryption modules you mentioned. The results surprised me as only arc4, crypto_blkcipher and ecb were present. See the attached screenshot.

What the screenshot also shows is the results of searching for 'wpa_supplicant' with pfind. It demonstrates something that surprised me even more which is that the Network Wizard does not appear to have created a wpa_supplicant.conf file with my settings. Either it has a different name or it uses a different setup altogether. I looked at /etc/wpa_supplicant.conf to see whether it held the passphrase straight or encrypted and observed that it was still at all default values. I then noticed that it was dated 2007/02/04 so it's clear that it hasn't been over-written with my values.

'Tis a great mystery - to me at any rate. What do you think is going on here?
WPA Modules.png
 Description   
 Filesize   284.07 KB
 Viewed   741 Time(s)

WPA Modules.png


_________________
Nick
Back to top
View user's profile Send private message 
numerix

Joined: 30 Sep 2008
Posts: 1
Location: Germany

PostPosted: Tue 30 Sep 2008, 13:06    Post subject:  

@tempestuous:
Thanks a lot for your detailed description on how to get wlan working by hand. I spend several hours on getting access to the internet with my MSI US54SE WLAN USB stick, but wasn't successfull - neither with WPA nor WEP nor without any encryption.

I got some strange errors, couldn't explain it. Then I followed your instructions and a last found out that the problem was the file /etc/resolv.conf which was a symbolic link to /etc/ppp/resolv.conf which was a symbolic link to /etc/resolv.conf ...

After I repaired that, everything run well - connection is okay now.

I'm new to puppy since a few days, tried (successfully!) to install it on an older notebook and I was really surprised how fast it boots and works on that old hardware.
Back to top
View user's profile Send private message 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Thu 02 Oct 2008, 12:20    Post subject:  

I have access to an advent 7111 for a few days that has a wireless card 8086:4222 which uses iwl3945 in puppy 4.1rc1, I am using it with a wep connection.

This has given me some grief getting it working but I think I have it sussed now.

The first hurdle was that I got errors trying to bring the interface up, I suspect this was because the hardware kill switch had been activated in windows which is now dead (hooray). I discovered this by looking at the error messages reported by dmesg. I found on the ubuntu forums a suggestion to
Code:
rmmod iwl3945
modprobe iwl945

Presumably the device needs taking down cleanly in software before it can be brought back again properly. This was not needed on subsequent boots.

Then
Code:
ifconfig wlan0 up
iwconfig essid xxxxxxx
iwconfig key zzzzzzzz

configures the card
I then have to take the interface down and bring it back up again. This seems to be crucial. If I don't do this I end up with a 169..... ip address
Code:
ifconfig wlan0 up
ifconfig wlan0 up

and then request an IP addess
Code:
dhcpcd -d wlan0

_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 13 [182 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, ..., 11, 12, 13 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1026s ][ Queries: 13 (0.0048s) ][ GZIP on ]