Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wireless configuration and startup - The Gentoo way
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 57, 58, 59  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Jan 11, 2004 8:03 pm    Post subject: Reply with quote

An error message is printed now :)
My lappy doesn't scan, and it prints out an error message for me

Also, I've added the timeout to association (10 secs) and changed the header.
Back to top
View user's profile Send private message
ryandlugosz
n00b
n00b


Joined: 15 Jan 2003
Posts: 26
Location: Cincinnati, OH

PostPosted: Sun Jan 11, 2004 9:57 pm    Post subject: Reply with quote

UberLord wrote:
An error message is printed now :)
My lappy doesn't scan, and it prints out an error message for me

Also, I've added the timeout to association (10 secs) and changed the header.


Thanks. I'll try it out... I tried putting "ndiswrapper" into my modules.autoload.d/kernel-2.6 file, but for whatever reason that causes wlan0 to be brought up really early in the boot sequence and causes lot of "run depscan.sh" errors. It doesn't see to work correctly anyway. I'll try using your sript vanilla instead of my changes and see if that fixes things...

BTW: In this iwlist section of the script, don't you want $IFACE instead of eth1?
Code:
# Initiate a scan
   ifconfig $IFACE up
   # Is scanning supported?
   scan_IFACE="$(iwlist eth1 scan 2>&1 | gawk '/Operation not supported/ { print "no" }')"
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jan 12, 2004 9:51 am    Post subject: Reply with quote

ryandlugosz wrote:

BTW: In this iwlist section of the script, don't you want $IFACE instead of eth1?


You're right :oops:

I've updated it accordingly :)
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jan 12, 2004 9:53 am    Post subject: Reply with quote

ryandlugosz wrote:

Thanks. I'll try it out... I tried putting "ndiswrapper" into my modules.autoload.d/kernel-2.6 file, but for whatever reason that causes wlan0 to be brought up really early in the boot sequence and causes lot of "run depscan.sh" errors. It doesn't see to work correctly anyway. I'll try using your sript vanilla instead of my changes and see if that fixes things...


If my vanilla script has depscan.sh errors, please post them here or email me them so I can fix em :)
Back to top
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Mon Jan 12, 2004 10:27 am    Post subject: Reply with quote

Could this be incorporated into the baselayout? It looks good!
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jan 12, 2004 11:36 am    Post subject: Reply with quote

fleed wrote:
Could this be incorporated into the baselayout? It looks good!


When I'm happy that enough people are using it with a minimum of fuss, I'll submit it as a patch (ie create a diff file against the origonal /etc/init.d/net.etho and /etc/conf.d/net) to bugs.gentoo.org

Say, if there aren't anymore changes by the end of the week to this little script then I'll submit it.

Remember, baselayout is critical to a happily running gentoo, and gentoo really needs a working network!
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Tue Jan 13, 2004 12:17 am    Post subject: Reply with quote

It'd be nice if there was a way to specifiy access point's preferred order. In particular, I live on a college campus out in the apartement building area. There are currently probably 5-10 APs visible to me.

It'd also be nice to specify dhcp or an ip and router on a per-essid basis. Again, at home I use a static IP and encryption/mac addy filtering while on campus I connect to the campus DHCP+cisco vpn network.

I may hack at the script, but at the moment I'm more interested in hacking together a ndiswrapper ebuild. Been having issues with getting the driver compile to work (tries to jump out to the kernel source dir and build in the ndis dir, and it just dies. Probably easy to fix but haven't ever really delved into ebuilds that deeply before.)
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Jan 13, 2004 12:25 am    Post subject: Reply with quote

Rhysem wrote:
It'd be nice if there was a way to specifiy access point's preferred order. In particular, I live on a college campus out in the apartement building area. There are currently probably 5-10 APs visible to me.

It'd also be nice to specify dhcp or an ip and router on a per-essid basis. Again, at home I use a static IP and encryption/mac addy filtering while on campus I connect to the campus DHCP+cisco vpn network.


I can add the dhcp / static ip + gateway options easily enough. Hopefully do that tomorrow! No promises though - I've gotta busy week of real work head :/

Not sure how to do a preffered order for AP's though. I'll think about it :)
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Jan 13, 2004 2:52 pm    Post subject: Reply with quote

OK - I've got assigning keys, iface, dhcpcd and gateway options to specific essid's working now :)

However, the scanning code is currently broken and I won't be able to fix it until I get some free time @ home on my main pc as it's the only hw I've got that supports scanning.

Hopefully get a new version out later tonight ...
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Tue Jan 13, 2004 7:18 pm    Post subject: Reply with quote

I'll look into possibly snagging it and playing with the code -- easy enough to test cause I've got plenty of APs around. ;-) I didn't get ndiswrapper working right, but I got a first shot at the ebuild and tossed it up as a bug.
Back to top
View user's profile Send private message
Tripwire
n00b
n00b


Joined: 13 Jan 2004
Posts: 12
Location: Holladay, UT

PostPosted: Tue Jan 13, 2004 8:54 pm    Post subject: Reply with quote

preacher wrote:
The output from ifconfig looks like this:
Code:
eth1      Link encap:Ethernet  HWaddr 00:80:C8:2D:1E:1D
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:4 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


and iwconfig:
Code:
eth1      IEEE 802.11-DS  ESSID:"peters"  Nickname:"unknown"
          Mode:Managed  Frequency:2.437GHz  Bit Rate=54Mb/s   Tx-Power=0 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:1/1  Signal level:-52 dBm  Noise level:-200 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


As you see I don't get an ipadress for some reason...


Same type of problem here. I've got a Netgear MA401 card. In XP it works fine. But under Gentoo it won't link up. I tried setting the ESSID to be the network name ("Wireless". Who came up with that I don't know. This is at school).
My card gets named wlan0 by the kernel. It shows for ifconfig:

Code:

wlan0    Link encap:Ethernet    HWaddr: 00:09:5B:30:21:3C
         BROADCAST MULTICAST    MTU:1500     Metric:1
         RX packets:0 errors:0 dropped:0 overruns:0 frame:0
         TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:100
         RX bytes:0 (0.0 b)      TX bytes:0 (0.0 b)
         Interrupt:3 Base address:0x100



iwconfig shows:
Code:

wlan0     IEEE 802.11b      ESSID:"Wireless"
          Mode:Master    Frequency:2.422GHz  Access Point: 00:09:5B:30:21:3C
          Bit Rate:11Mb/s   Sensitivity=1/3
          Retry min limit:8  RTS thr:off  Fragment thr:off
          Encryption key:off 
          Power Managment:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0   Rx invalid crypt:0     Rxinvalid frag:0
          Tx excessive retries: 0 invalid misc:35  Missed beacon:0



Looks like the driver is loaded ok but the card won't talk to the AP. It works fine under XP.

Any help is appreciated.
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Tue Jan 13, 2004 11:16 pm    Post subject: Reply with quote

Check the frequency is right.

Also, check that the wifi card is on under linux. I relize it probably is otherwise you wouldn't be seeing wlan0 at all, but if the card was wierd and only turned off transmit that might cause issues.

Have you tried essid "any" to see if it can pick it up?

Might try doing things manually, and slowly. I've noticed driverloader and ndiswrapper sometimes need a few seconds between commands in order for the card to "get it".


Edit:

Arr! Post the code with the per-essid stuff, and I'll have a look at the scanning code.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 14, 2004 1:33 am    Post subject: Reply with quote

OK, I've now implemented an essid preference list - and it seems to work :)
However, I've only got the one AP here, so I can't test it fully
Debugging this was a right PITA - as iwgetid doesn't work properly with the madwifi driver build I'm using :/

You'll need new init and config scripts.

Lemmie know how it works 8)
Back to top
View user's profile Send private message
Tripwire
n00b
n00b


Joined: 13 Jan 2004
Posts: 12
Location: Holladay, UT

PostPosted: Wed Jan 14, 2004 3:42 am    Post subject: Reply with quote

Rhysem wrote:
Check the frequency is right.


How?
Quote:

Also, check that the wifi card is on under linux. I relize it probably is otherwise you wouldn't be seeing wlan0 at all, but if the card was wierd and only turned off transmit that might cause issues.



I doubt that, but again, how would I check?
Quote:

Have you tried essid "any" to see if it can pick it up?


Unfortunately the ANY settings is not supported. If I use any it gives an error, if I use a specific string, it works. Wireless is the network reported under XP.
Quote:

Might try doing things manually, and slowly. I've noticed driverloader and ndiswrapper sometimes need a few seconds between commands in order for the card to "get it".


I'm not using driverloader or ndiswrapper. The card is being initialized by the Linux native pcmcia_cs & prism drivers. I tried driverloader and it never found the card.

Quote:

Arr! Post the code with the per-essid stuff, and I'll have a look at the scanning code.


Was that for me? I don't know what you're referring to. Sorry but I'm a complete newbie at wireless.
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Wed Jan 14, 2004 5:17 am    Post subject: Reply with quote

I'm having trouble with it, but I'm unable to determin if the troubles are due mainly to your script, or mainly to ndiswrapper sucking.

It configured things right once... but wouldn't talk to anyone. I think there need to be sleeps in the configure script, otherwise the card doesn't quite 'get it' ya know?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 14, 2004 9:54 am    Post subject: Reply with quote

How about posting the script output? And does the iwconfig output match the required AP?

There's two sleeps in the script. A 2 second pause after the interface is brought up for scanning (you don't see this if you set the essid directly on the interface) and 20 half second sleeps whilst it associates with an AP.

If you don't get any errors with the script, then it should be setup OK for the specified configuration.

However, there is a bug with the generic gentoo script that handles dhcp loading and unloading. Sometimes is doesn't load dhcp so it has to be started manually.

If it looks OK but it's not talking then the chances are that the WEP key is not configured correctly.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 14, 2004 10:05 am    Post subject: Reply with quote

Tripwire wrote:

iwconfig shows:
Code:

wlan0     IEEE 802.11b      ESSID:"Wireless"
          Mode:Master    Frequency:2.422GHz  Access Point: 00:09:5B:30:21:3C
          Bit Rate:11Mb/s   Sensitivity=1/3
          Retry min limit:8  RTS thr:off  Fragment thr:off
          Encryption key:off 
          Power Managment:off
          Link Quality:0 Signal level:0 Noise level:0
          Rx invalid nwid:0   Rx invalid crypt:0     Rxinvalid frag:0
          Tx excessive retries: 0 invalid misc:35  Missed beacon:0



Looks like the driver is loaded ok but the card won't talk to the AP. It works fine under XP.

Any help is appreciated.


This shows that you're not getting anything that the driver can understand. The link quality is 0 - which means you'll get nothing
Invalid misc:35 - means that it is getting something but the driver is not sure what.

Are you hardcoding the access points MAC address?
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Wed Jan 14, 2004 3:04 pm    Post subject: Reply with quote

typhoon root # modprobe wlan0
Calling putdriver ioctl
Parsing the inf file.
Driver version: 06/11/2003,1.2.0.56
Calling startdriver ioctl
typhoon root # iwconfig
wlan0 ... settings look okay
typhoon root # /etc/init.d/net.wlan0 start
* Configuring wireless network for wlan0...
* Scanning for Acess Points
* Found jbooth
* Found decrepid13
* Found linksys
* Found Apt
* Found #103
* Connecting to jbooth... [ ok ]
* Bringing wlan0 up... [ ok ]
* Setting default gateway... [ ok ]
typhoon root #

Looking through things:

iwconfig shows my essid, my bit rate, my key, my AP's hw addy. It has link at 0/100 signal level at -32dBm and noise at -256dBm. iwlist scanning however shows my qual at 0/100, signal level at 29/154 and noise at 0/154. (the laptop is about 1 meter from the AP)

The interface is up, it has the IP it should. Route has the routes it should in it.

Trying to ping anywhere gives: Destination Host Unreachable

Some notes:

Line 162: iwconfig $IFACE up - my wireless (intel pro/2100) doesn't need to be up to scan for APs.

General: there were almost no pauses with the script configuring things. I had a script I used to do this by-hand that worked. It takes about 10-15 seconds with the sleeps I have in it to work, but it brings up things correctly every time.

Line unsure: I edited the ath0 to wlan0 in the script... was one rogue one left.


I tried taking the interface down (ifconfig wlan0 down;rmmod ndiswrapper), then running my script. Interface came up without a hitch. I was going to try yours again but this time when it came up it decided it didn't like scanning (ndis does that on me after it's been loaded once).
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Wed Jan 14, 2004 3:10 pm    Post subject: Reply with quote

Tried yours again. It scanned successfully this time again, but connected to the wrong AP! APs found in order: decpepid13, jbooth, linksys, Apt, #103. It chose decrepid13 when it's order is jbooth then UIUCNet.
Back to top
View user's profile Send private message
paranode
l33t
l33t


Joined: 06 Mar 2003
Posts: 679
Location: Texas

PostPosted: Wed Jan 14, 2004 3:57 pm    Post subject: Reply with quote

If you are using the madwifi drivers and having problems with the card being recognized or giving unexpected errors, you need to download the CVS. They have been constantly working on these drivers since the August release and they are much improved. So give that a try first.
_________________
Meh.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 14, 2004 4:07 pm    Post subject: Reply with quote

Rhysem wrote:
Tried yours again. It scanned successfully this time again, but connected to the wrong AP! APs found in order: decpepid13, jbooth, linksys, Apt, #103. It chose decrepid13 when it's order is jbooth then UIUCNet.


I have resolved this problem :)
However, my server is currently down so I'm unable to post the fixed script.

Hopefully post a fixed version tonight
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 14, 2004 4:14 pm    Post subject: Reply with quote

Rhysem wrote:

Line 162: iwconfig $IFACE up - my wireless (intel pro/2100) doesn't need to be up to scan for APs.


That was always in from faye's origonal script. I'll try taking it out on my machine and making sure it still works before removing it.

Quote:

General: there were almost no pauses with the script configuring things. I had a script I used to do this by-hand that worked. It takes about 10-15 seconds with the sleeps I have in it to work, but it brings up things correctly every time.


Could you tell me where you have your sleeps? If sleeping is required then I will put some customisable defaults in!
I've made the sleep before scan customisable as well.

Quote:

Line unsure: I edited the ath0 to wlan0 in the script... was one rogue one left.


Opps :oops:
You did the right thing - this has been resolved in my script
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Wed Jan 14, 2004 5:05 pm    Post subject: Reply with quote

I'll try to find where pauses are needed, but I'm at work at the moment which may make things more difficult. ;) We have wifi, but I won't be able to verify picking the right AP as there's only one in range.
Back to top
View user's profile Send private message
Rhysem
Tux's lil' helper
Tux's lil' helper


Joined: 18 Dec 2002
Posts: 76

PostPosted: Wed Jan 14, 2004 5:14 pm    Post subject: Reply with quote

I've been thinking some more about this and I'm not sure that a rc-script in etc is the right solution. It's better than where we were, for sure, but what you'd really like would be a daemon process that would keep scanning wifi networks if you lost the old one.

Like if you did suspend-to-disk, you'd want it to re-scan on boot, and I don't think it will with how things are done right now. Of course right now suspend-to-disk with wireless up (ndiswrapper) is better know as write-to-disk-so-you-can-crash-after-restore-on-network-use but hey.


Other script issues:

I don't think I want to set iface_wlan0 if I've got multiple networks I may swap between (one dhcp, one static ip). But if I don't set it, the script gets very unhappy due to checkconfig(). I can set it to dhcp and that works fine at work where we use dhcp, but I'm not sure that'll work at home. Setting it to dhcp is great at work, we'll see if that holds at home.


For what it's worth tho, the script works great at work! :-) *thumbs up!*
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 14, 2004 6:05 pm    Post subject: Reply with quote

Rhysem wrote:
I've been thinking some more about this and I'm not sure that a rc-script in etc is the right solution. It's better than where we were, for sure, but what you'd really like would be a daemon process that would keep scanning wifi networks if you lost the old one.

Like if you did suspend-to-disk, you'd want it to re-scan on boot, and I don't think it will with how things are done right now. Of course right now suspend-to-disk with wireless up (ndiswrapper) is better know as write-to-disk-so-you-can-crash-after-restore-on-network-use but hey.


There are a few solutions for wired ethernet for this. I use ifplugd on my lappy which works great! Unplug cable and "net.eth0 stop" gets called. Plug it back in again and "net.eth0 start" gets called.

An rc-script is the correct solution for configuring wireless and networking. We just need a daemon for working out if a connection has been dropped to the AP and restarting the apprioprate net.xxx script.

Quote:

Other script issues:

I don't think I want to set iface_wlan0 if I've got multiple networks I may swap between (one dhcp, one static ip). But if I don't set it, the script gets very unhappy due to checkconfig(). I can set it to dhcp and that works fine at work where we use dhcp, but I'm not sure that'll work at home. Setting it to dhcp is great at work, we'll see if that holds at home.


The new script - the one you have caters for this.
You can set wireless_iface_Home="dhcp" and wireless_iface_Work="192.168.0.1 broadcast 0.0.0.255 netmask 255.255.255.0" and it will flip between the two quite happily.
You don't even need to set iface_wlan0 if it can detect the correct SSID :)

I've even implemented basic roaming when the driver doesn't support scanning. Just set wireless_essid_ath0="any" and off it trots!

Quote:

For what it's worth tho, the script works great at work! :-) *thumbs up!*


Glad you like it :)
Hopefully the next version I post will work even better :D
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2, 3, ... 57, 58, 59  Next
Page 2 of 59

 
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