WLAN config - I think I`ve made it to 95%.. (Solved)

Booting, installing, newbie
Post Reply
Message
Author
User avatar
Deumex
Posts: 15
Joined: Sat 15 Jul 2006, 23:46
Location: In the outback of Germany

WLAN config - I think I`ve made it to 95%.. (Solved)

#1 Post by Deumex »

Hi all,

my first post here.
After about 1 week of try and error I am a little bit tired regarding this WLAN problem...but maybe you can help me out a bit.

The PC I want to use with Puppy is an old Compaq laptop, model "Armada 4210T". This is a very small machine with a 233Mhz MMX CPU, a C&T 65555 video chip, 12.1 inch SVGA TFT, an ESS 1878 audio chip, 96MB RAM and a 3.2 G HDD and two cardbus slots.

I have this machine running with a "stripped-down" W98 as a kind of "surf-book" via my WLAN access point. I bought a cheap WLAN cardbus card last year from Ebay, which works without any problems. The card is a "Fiberline FL-WL420X" with a Marvell chip. In addition, I installed a no-name USB 2.0 2-port card, which also works fine.

I had played around with Vector Linux for a while (but WLAN was a no-go) before I found DSL and Puppy. So I decided to leave VL and go for DSL and/or Puppy. I installed both on my lappy, learned how to set up GRUB to boot W98/DSL/Puppy and after a while of trying I decided to prefer Puppy 2.01.

And this is where my misery begins. :roll:

While after the hardisk install (full install) nearly everything worked (except the sound, but that's a minor problem) from the beginning, setting up my WLAN card was/is pretty unsuccessful.

I've learned that my WLAN card will only work with ndiswrapper, so I went for How-Tos and the ndiswrapper homepage and found out how to set it up. I will skip this now, let me just say that after "modprobe ndiswrapper" the card starts to flash a LED to show it it active, but not connected now.

I want to configure the laptop to the IP adress 192.168.178.21, because this is the same adress this machine uses under W98 and I have restricted my access point not to accept new WLAN clients.

The access point is an AVM FritzBox 7050, a combined LAN/WLAN/VoIP thingy. I do not know if this is available outside of Germany or Europe, but I think so (I have heard about a US-Edition of this). However, this should not be the problem. I can see which clients are connected wireless to the FritzBox (with my desktop PC and the config utility)

I made several approaches via command line and with WAG, the ethernet/network Wizard, followed the How-Tos from the web, but none of them was succesfull. I am totally stuck at the moment. :(

As an example, one strange thing:
I activate the card with

modprobe ndiswrapper

and the card gets alive (not more). Then I type

iwconfig

and it says

lo no wireless extensions

wlan0 IEEE 802.11FH ESSID: off/any
Mode: Managed Channel:0 Access Point:Not-Associated
Bit Rate:1Mb/s Sensitivity=-200 dBm
RTS thr:2346B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Okay, it is active, but not completely configured. My accesspoint does not see it.

So I give it the next config info to connect with

iwconfig wlan0 essid fritzbox

and the LED stops flashing, but is glowing the whole time. Just as if it is connected right now. And it IS, because my access point says:

Name: LAPTOP
IP: 192.168.178.21
MAC Adress: blahblah
Active: yes
Connection: 54 MBit/s
Quality: 79%
Condition: Connected

iwconfig now says:


lo no wireless extensions

wlan0 IEEE 802.11g ESSID: "fritzbox"
Mode: Managed Frequency: 2,457GHz Access Point: 00:blahblah
Bit Rate:1Mb/s Sensitivity=-200 dBm
RTS thr:2346B Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100 Signal level:-56dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

However, because WEP is active, I can not get in the www with my laptop. If I try to get online with Dillo, it does not get a connection, and says

Error: Dns can't solve www.yxz.com

This is - so far- no real surprise, as the information for the connection is not complete. Okay, so I load the profile that I have created with WAG before. It contains all the information needed, so this should work...

But it does not. WAG starts and says:

not using PCMCIA (? mmhh, okay, it's cardbus...)

no module loaded
dhcpcd not running (right, I want to set to 192.168.178.21)
wifi-beta not installed (okay)

wlan0 enabled
no IP assigned to wlan0 (? But I already did this)
access point acquired

3 wireless network(s) detected (yep, there are two others in the neighboorhood)
0 open network(s) detected (okay, all are encrypted, like it should be)

Connected to:
wlan0 IEEE 802.11g ESSID: "fritzbox"
Mode:Managed Frequenzy:2,457 GHz Access Point: 00:blahblah
Encryption key :off
Link Quality:100/100 Signal level:-21 dBm Noise level:-256 dBm

So I go to the "Profiles" button and take my profile "LAPTOP". WAG loads the profile - and I am as far as I was before. WAG shows:

autoconnect ---no
template --- no
LAPTOP --- yes

Connected to:
wlan0 IEEE 802.11g ESSID:off/any
Mode:Managed Frequency:2,457 GHz Access Point: Not-Associated
Encryption key: 1A23-blahblah Security mode:restricted
Link Quality:0 Signal level:0 Noise level:0

So as soon as I load my profile, I get disconnected. Very nice. :evil:

If anybody is willing to help me in this matter it would really be appreciated...I really do not know what to do any more. :(
I really tried to solve this thing by myself and not to bother the forum with another WLAN thread, but I have no idea what I probably missed in this matter...

It seems as if I nearly made it with the WLAN, but somehow I am stuck just in front of the goal...and I have no idea, why. :(

So, again, I ask for your help.

Regards, Deumex

P.S: Additional infos: I mentioned above the USB 2.0 card, it works perfect with Puppy, without any manual configuration needed. And I disabled everything in the laptop setup that is not needed, like parallel and serial ports, infrared port and USB (yeah, strange thing: This machine has a built-in USB chip, but no USB ports...)
Last edited by Deumex on Mon 17 Jul 2006, 20:25, edited 1 time in total.

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#2 Post by PaulBx1 »

Aah, the Torture that All Linux Users Must Endure. :lol:

Here is my Torture:
http://www.murga.org/~puppy/viewtopic.php?t=9023

I too was using ndiswrapper, except I am using WPA rather than WEP so it was even worse. You are using WEP right? Seems to me you mentioned that. Most folks say to turn your encryption off at the AP and get the connection working without it first, just to remove an extraneous factor. When it is working, then add to your torture by turning encryption back on.

I think you need wifi beta, which has the drivers used with ndiswrapper. Try a "ndiswrapper -l", you should see something similar to what I had, a long list which included the line "neta3ab driver installed, hardware present". Get it here:
http://dotpups.de/dotpups/Wifi/

Also, what do you get with "lspci"? Apparently you already have gone through this, finding the right driver for your card? It wasn't entirely clear.

Also, look at the readme that comes with ndiswrapper and wifi beta. (I guess it does, but maybe I'm thinking the native drivers.) Actually quite useful.

I think you need to forget about WAG and just work at the command line. Have you looked over /etc/rc.d/rc.wireless? What does /etc/rc.d/wireless.conf contain? /etc/rc.d/rc.local0 calls rc.wireless, right? These are the scripts you need to dig into. At the top of rc.wireless it does an insmod; you may have to edit it to change to modprobe, like I did.

Keep plugging away; you'll get it!

<later> I made a mistake, it's the rc.local script you will want to check, not rc.local0.

pg99
Posts: 64
Joined: Tue 13 Jun 2006, 13:24

#3 Post by pg99 »

I don't know about WAG and profiles, I only used it to get connected initially. I thought WAG was for roaming wireless??

So you say after:
modprobe ndiswrapper
iwconfig wlan0 essid fritzbox

then you are connected, but WEP stops you going any further. Is that right? If yes, just add the WEP key into the iwconfig call and you should be there, no? Or temporarily disable WEP.

When you get it running you can just add those lines to /etc/rc.local and your connection will come up on boot. That's what I do and it works just fine. The only thing I have to watch is to make sure the interface is up before issuing the iwconfig command. I just use a few sleep commands. I think I have this now (not at puppy pc at the moment):
modprobe ndiswrapper
sleep 2
iwconfig blah blah
sleep 2
dhcpcd -t 20 -d wlan0

I also have these 3 lines
iwconfig blah blah
sleep 2
dhcpcd -t 20 -d wlan0

in a separate script with a link from my desktop. Then if it doesn't come up at boot I just click the link and up it comes. sweet! Thsi is with WEP too. I wish I could use WPA because I am paranoid ;-) but my card doesnt support it.

hth
Phil

pg99
Posts: 64
Joined: Tue 13 Jun 2006, 13:24

#4 Post by pg99 »

I probably should have added that I have Linksys kit running under ndiswrapper with :
WRT54G router (v5)
WMP54G PCI card in desktop
(broadcom chipset)
on Puppy 1.09 CE
Celeron 336MHz
64Mb RAM
frugal HD install

rgds
Phil

User avatar
Deumex
Posts: 15
Joined: Sat 15 Jul 2006, 23:46
Location: In the outback of Germany

Thanks for your replies

#5 Post by Deumex »

Hi,
thank you for the replies. Right now I'm at the office, but this evening I will try to get my WLAN card running again.

@Paul
The XP driver I use with ndiswrapper is called "Mrv8000c.inf", and as I said, it seems that it gets my card alive, but maybe I will try with the wifi beta too.
I have read about your "torture" because I thought I maybe could find a hint to solve my problem in that thread.
However, it seems I am on the right way, so later I will make another approach.

@Phil
Thanks for the examples, I have no experience with this command scripts and can use this as a template. E. g. the "sleep" command is new for me.

Disabling WEP may not be a good idea, because by now I know of at least 3 other WLAN APs running in the neighborhood - well, maybe for a short tryout I could do this.

Okay, in the evening the "WLAN Saga" will be continued... :wink:

Regards, Deumex

Edit: One (stupid) question:
When I give in the WEP key with iwconfig, is the key the password I typed in my AP config program (e.g. MYPASSWORD123 I think it must have 13 characters) or should I pass the "Output" of my AP, something like 3F323323B765... and so on (I think this has 26 digits). I always used the latter. Right or wrong?

User avatar
Deumex
Posts: 15
Joined: Sat 15 Jul 2006, 23:46
Location: In the outback of Germany

I think I've got it - nearly perfect :-)

#6 Post by Deumex »

Hi again,

after some more testing an trying I found out how to get it working.

The things I did:

1. Edit the resolv.conf and put in the nameservers of my ISP and my accesspoint.
It now looks like this

nameserver 192.168.178.1
nameserver 193.189.244.197
nameserver 193.189.244.213
nameserver 193.189.244.205

2. In another thread here I found that I could wake up the card in a terminal (after modprobe ndiswrapper) with

sh /etc/wlan0wireless

and

sh /etc/wlan0mode

Strange enough, the first script caused an error saying it could not unterstand the "key" command with my WEP key.
So I tried to put in the key manually with

iwconfig wlan0 key 1B123and_so_on

and this worked. Don't ask my why...
So I just added a second line in the wlan0wireless file with the key command. Now the file works when it is executed.

Tried "ping www.google.com" an it worked! :D
So I opened seamonkey an I could surf the web! :D

@Phil

As you said I have put the commands in rc.local so the WLAN connection does come up at startup, and this works fine.
But I would prefer to have two symbols on my desktop (or in the menu) to switch the network connection on / off (so that it is not trying to connect when I use the laptop at another place, e.g. in the holidays or so).
How can I do this?

Thanks for your help, Deumex

pg99
Posts: 64
Joined: Tue 13 Jun 2006, 13:24

#7 Post by pg99 »

great news that it is working now. I think putting icon on your desktop is too late if you don't want it to try to connect - rc.local will already have run.

I think this simple one-liner can take down the interface:
ifconfig wlan0 down

you can put that in a script and drag a link to your desktop. Also you can make another script with just your iwconfig line in it and that will bring up the interface. You can drag that to your desktop too. But this doesn't sound too useful for the scanrio you describe?

anyways, congratulations on your success :-)

regards
Phil

User avatar
Deumex
Posts: 15
Joined: Sat 15 Jul 2006, 23:46
Location: In the outback of Germany

Just another question...

#8 Post by Deumex »

Phil,

thanks for the reply.

Yes, now it works at startup, but as I said, I want something else.
Maybe I did not exactly describe what I want to do.

While running the commands in rc.local works, I would prefer to have two "buttons", symbols or whatever on my desktop (or in the menu).
One for switching my WLAN connection ON, one to switch it OFF.
I would then delete the commands from rc.local.

But I do not know how to do this?!
Okay, I could create two files with an editor like Geany, let's call them "Connect" and "Disconnect".
In "Connect" I write

modprobe ndiswrapper
sleep 5
ifconfig wlan0 up
[...]

and in "Disconnect"

ifconfig wlan0 down

and I save both files e.g. to /etc.

But how do I create the links to my desktop now, so that it works with a mouseclick and Puppy knows this are script files it should execute in a shell? Sorry for my stupid questions, but I have never done this before in Linux and just do not know how to get this done (and I do not want to mess up something). :roll:

BTW: I have successfully installed Opera 9 on my laptop and it works like a charm...nice! :D

Regards, Deumex

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#9 Post by PaulBx1 »

Well, I thought I could turn my wifi off with "ifconfig wlan0 down" and back up with "ifconfig wlan0 up", but it sure didn't work when I tried it! Never did come back up. :roll:

Why not just leave it on? It doesn't hurt. Anyway if you are worried about security, that is a problem when you are using it also. Maybe you should take a look at WPA rather than WEP. Then you don't have to worry.

If you are being bothered by messages when you are not at your AP, you could just comment out the call to rc.wireless in rc.local, and reboot. Or just as I did, ifconfig wlan0 down (but never mind about getting it up again, except with reboot). Not exactly elegant, but it is simple.

User avatar
Deumex
Posts: 15
Joined: Sat 15 Jul 2006, 23:46
Location: In the outback of Germany

#10 Post by Deumex »

Paul,

well, I will try today if I can switch it on and off, but you are right - when I take the laptop with me away from home, I could just comment the commands out - this is done in 2 minutes and can be undone in the same time.

However, my whole WLAN configuration may not be elegant, but working, and that's the important thing. Fine tuning can be done when I have more experience with Puppy... :wink:

Thanks for the replies, I was really close to forget about Puppy and WLAN. :D

Your motto is exactly right for the whole WLAN thing: Keep plugging away; you'll get it! :mrgreen:

Regards, Deumex

pg99
Posts: 64
Joined: Tue 13 Jun 2006, 13:24

#11 Post by pg99 »

to put links to scripts on your desktop is easy. first you need to make sure the file you create is a script - easiest way to do this is through rox file manager - just right-click in the folder where you want to create it and choose New > Script and choose a name. The file should have cog icon in rox when it has been created. open your file in text editor and you have script header #!/bin/sh in there already, so you just need to add your wireless commands and save it.

To get it on the desktop just drag it from rox onto the desktop, simple as that.

There is a flash tutorial for this at www.rhinoweb.us.

hth
Phil

User avatar
Deumex
Posts: 15
Joined: Sat 15 Jul 2006, 23:46
Location: In the outback of Germany

#12 Post by Deumex »

Phil,

thank you for the explanation and the hint to the video - I will have a look and try this evening. :D

Regards, Deumex

Post Reply