Author |
Message |
rben
|
Posted: Thu Jun 10, 2004 12:18 pm |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
In short, what is the correct way to set up a wireless LAN connection in KnoppMyth? I've got the card working and the drivers working, as demonstrated by using iwconfig and ifconfig, but the wireless interface, eth1, does not come up with an IP address.
Currently I'm using a script in rc5.d that executes a couple of iwconfig commands and ifup to try to get the network going. That doesn't work. I'm trying to use dhcp to set up the IP addresses.
There is a regular ethernet card as well as the wireless card on the machine and I'm using both while trying to get the wireless link working correctly. When I'm done, I'll move the box to the livingroom where it will live using only the wireless link.
Currently I'm using dhcpcd rather than pump, since I couldn't get things to work with pump. Perhaps that was a mistake. At one point I was getting an address for both links as long as the hard wired link was plugged in, but now even that seems broken.
I'm pretty frustrated.
Please reply to raybenjamin@comcast.net as well as here, if you'd be so kind.
Thanks
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
Xsecrets
|
Posted: Thu Jun 10, 2004 1:11 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
well with debian you shouldn't have to worry about pump vs dhcpcd the mechanics in place should take care of it, but it does use dhcpcd. if you have the card there with drivers loaded you could try netcardcfg see if it detects it.
or the manual way. make sure you have a line in your /etc/modutils/alias file like
Code: alias eth1 modulename after inserting that line run update-modules then in /etc/network/interfaces file make sure you have a section similar to Code: auto eth1 iface eth1 inet dhcp wireless_essid networkname wireless_mode managed wireless_key longhexkeygoeshere(if needed)
once all that is done you should be able to do an ifup eth1 and get an ip address. you may want to do ifdown eth0 first to turn off your wired card so the routes don't conflict.
|
|
Top |
|
 |
cyrus007
|
Posted: Thu Jun 10, 2004 1:37 pm |
|
Joined: Thu May 20, 2004 1:38 pm
Posts: 20
Location:
Dallas, TX
|
I came across the following patch for debian at one of the forums while doing the research for the problem. Seems like my version was not looking up /etc/network/interfaces at the right moment. Moreover I had to move my hotplug script from rc5.d to rcS.d to take care of the delay in USB system initialization. Don't know if you are using USB/PCI.
Note: I am using linux-2.6.6-epia1 kernel with modules-init-tools.
Code: --- wlan.agent 2003-09-18 19:48:26.000000000 +0200 +++ /etc/hotplug/wlan.agent 2003-09-18 18:56:39.000000000 +0200 @@ -43,6 +43,11 @@ case $ACTION in 'register'|'resume') debug_mesg WLAN $INTERFACE registered. + if [ -f /etc/network/interfaces ] ; then + mesg "WLAN Hotplug bypassed for Debian network configuration" + /sbin/ifup $INTERFACE + exit $? + fi wlan_bring_it_up $INTERFACE if [ $? = 0 ] ; then mesg WLAN $INTERFACE brought up successfully. @@ -52,6 +57,11 @@ # eventually invoke net.agent on $INTERFACE w/ REGISTER ;; 'remove'|'suspend') + if [ -f /etc/network/interfaces ] ; then + mesg "WLAN Hotplug bypassed for Debian network configuration" + /sbin/ifdown $INTERFACE + exit $? + fi debug_mesg WLAN $INTERFACE removed. ;; 'startup')
HTH
Cyrus
|
|
Top |
|
 |
Xsecrets
|
Posted: Thu Jun 10, 2004 2:09 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
yes I suppose the info I posted won't get you all the way there if you are using usb and pluging and unpluging. I use pci, so I don't have to worry about all the hotplug stuff.
|
|
Top |
|
 |
rben
|
Posted: Thu Jun 10, 2004 2:45 pm |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
I'm using PCI, the LinkSys WMP54Gs.
Sorry about being so dense, but what modulename goes in the aliases file?
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
rben
|
Posted: Thu Jun 10, 2004 2:56 pm |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
Ok, I think I found the info about aliases, there is a file called linux-wlan-ng that has the following:
Aliases to tell insmod/modprobe which module to use when bringing up the
# wlan0 interface.
# Uncomment the line corresponding to the type of prism2 device you have.
alias wlan0 prism2_pci
#alias wlan0 prism2_usb
#alias wlan0 prism2_cs
#alias wlan0 prism2_plx
I'm using the WMP54Gs and I'm using the Linuxant DriverLoader to load the Windows driver for that device, so I'm assuming that I don't need the alias part. Am I correct?
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
rben
|
Posted: Thu Jun 10, 2004 3:00 pm |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
Yet more info. Linuxant placed a file in the modutils directory called driverloader that contains:
alias eth1 driverloader
Should that be changed to wlan0?
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
Xsecrets
|
Posted: Thu Jun 10, 2004 3:27 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
no it will not need to be changed. the eth1 wlan0 ath0 etc is just a designation. As long as the same one is in /etc/modules.conf and /etc/network/interfaces it doesn't matter what it is.
So in your case you don't need to edit the aliases file the driverloader file will take care of the alias for you (just for clarification in your particular case the modulename is driverloader). just make sure you run update-modules and edit the /etc/network/interfaces file like I specified earlier and you should be able to use ifup eth1 to bring up the interface.
oh and since you are using pci you should safely be able to ignore any hotplug junk and not worry about any scripts.
|
|
Top |
|
 |
rben
|
Posted: Thu Jun 10, 2004 3:39 pm |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
I did all that and took out my original 'mylocal' script. the results of iwconfig is:
root@tvbox:/home/rben# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
eth1 IEEE 802.11g ESSID:"Zyrcanet" Nickname:"unknown"
Mode:Managed Bit Rate=54Mb/s Tx-Power=25 dBm
RTS thr:off Fragment thr:off
Encryption key:8FD5-8520-B9
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
I try ifup eth1...
root@tvbox:/home/rben# ifup eth1
ifup: interface eth1 already configured
and when I check with ifconfig:
root@tvbox:/home/rben# ifconfig
eth0 Link encap:Ethernet HWaddr 00:40:2B:74:FF:1A
inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:163 errors:0 dropped:0 overruns:0 frame:0
TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16680 (16.2 KiB) TX bytes:15524 (15.1 KiB)
Interrupt:9 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
It appears that the interface is not really up and there is no IP address. Also, I think I need to tell it to use channel 4 somehow, since that's the channel that I've got set up.
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
rben
|
Posted: Thu Jun 10, 2004 3:51 pm |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
Another relevant bit, maybe. When I try to bring the eth1 interface down using ifdown, I get the message:
**** /sbin/dhcpcd-bin: not running
although, if I grep for dhcpcd in the ps aux output, I get:
root@tvbox:/home/rben# ps aux | grep dhcpcd
root 563 0.0 0.1 1500 416 ? S 17:34 0:00 /sbin/dhcpcd-bin -h tvbox -Y -N -R eth0
root 1198 0.0 0.1 1532 448 ttyp1 R 17:51 0:00 grep dhcpcd
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
Xsecrets
|
Posted: Thu Jun 10, 2004 9:10 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
so once you try to bring it down then try to bring it up again does it still tell you it's already up?
|
|
Top |
|
 |
rben
|
Posted: Fri Jun 11, 2004 9:53 am |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
No, if I bring it down and then back up, there is no complaint:
root@tvbox:/home/rben# ifdown eth1
**** /sbin/dhcpcd-bin: not running
root@tvbox:/home/rben# ifup eth1
root@tvbox:/home/rben#
So I'm still stuck.
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
Xsecrets
|
Posted: Fri Jun 11, 2004 10:42 am |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
well two more suggestions bring both interfaces down then just bring up eth1 and if that doesn't work try using ifup with the -v switch for verbose, so maybe we can get an idea of why it's failing.
|
|
Top |
|
 |
rben
|
Posted: Fri Jun 11, 2004 11:15 am |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
When I bring down eth1 it always complains that dhcpcd-bin is not running. I don't get the same complaint when bringing down eth0, the hard wired ethernet card. If I use ifup -v I get the following:
root@tvbox:/etc/network # ifup -v eth1
Configuring interface eth1=eth1 (inet)
run-parts /etc/network/if-pre-up.d
dhcpcd
root@tvbox:/etc/network #
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |
rben
|
Posted: Fri Jun 11, 2004 11:21 am |
|
Joined: Tue Apr 06, 2004 7:28 am
Posts: 38
Location:
Boston
|
I tried using the command:
dhcpcd -d eth1
and go the following in the log file:
Jun 11 13:18:25 tvbox dhcpcd[1997]: dhcpStart: ioctl SIOCGIFHWADDR: No such device
---
Not sure what to make of it.
_________________ -- All that is gold does not glitter -- J.R.R. Tolkien
|
|
Top |
|
 |