Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Belkin wireless G card
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
martincox
n00b
n00b


Joined: 27 Feb 2005
Posts: 30

PostPosted: Thu Mar 10, 2005 8:51 pm    Post subject: Belkin wireless G card Reply with quote

Im having a really hard time trying to get my wireless card to work. So far I have emerge'd ndiswrapper...

ndiswrapper -i /mnt/cdrom/drivers/bcmlw5a.inf (worked ok)

ndiswrapper -l (bcmwl5a driver present, hardware present)

modprobe ndiswrapper ( seemed ok)

/etc/init.d/net.eth0 start
*Bringing up eth0 (192.168.0.2)...
SIOCSIFADDR: No such device
eth0: unknown interface: no such device
SIOCSIFBRDADDR: No such device
eth0: unknown interface: no such device
SIOCSIFNETMASK: No such device

I have no idea what this means, can anybody shed any light on what I am doing wrong? Is my card incompatible?
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Thu Mar 10, 2005 9:43 pm    Post subject: Reply with quote

Try doing the following as root:

Code:

# ln -s /etc/init.d/net.eth0 /etc/init.d/net.wlan0
# /etc/init.d/net.wlan0 start


I think ndiswrapper use 'wlan0' as the name for the interface, rather then 'eth0'. The above commands setup the startup script to use that name instead. You'll also need to look at '/etc/conf.d/net' and change all the references to 'eth0' to wlan0'.

G.
Back to top
View user's profile Send private message
j3ff3r
n00b
n00b


Joined: 23 Feb 2005
Posts: 27

PostPosted: Thu Mar 10, 2005 10:47 pm    Post subject: Reply with quote

also, add the line:
Code:
alias wlan0 ndiswrapper

into /etc/modules.d/aliases (I'm not at a linux machine, so that might not be exactly correct, but the filename is something like that) and then run
Code:
modules-update
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Mar 10, 2005 11:25 pm    Post subject: Reply with quote

aliases are bad - some wifi drivers install themselves as eth, wlan or ra.
You can alias the driver to wlan0 all you like, but if the driver wants eth0, it gets eth0 (or 1, 2, 3, etc)
Back to top
View user's profile Send private message
martincox
n00b
n00b


Joined: 27 Feb 2005
Posts: 30

PostPosted: Thu Mar 10, 2005 11:28 pm    Post subject: Reply with quote

After posting I went back into Gentoo and did both of the previous things. When I did /etc/init.d/net.wlan0 start it said that it had started fine, but, I was unable to ping / connect to anything on my network??
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Thu Mar 10, 2005 11:45 pm    Post subject: Reply with quote

martincox wrote:
After posting I went back into Gentoo and did both of the previous things. When I did /etc/init.d/net.wlan0 start it said that it had started fine, but, I was unable to ping / connect to anything on my network??


Whenever I bring up my wlan0, it doesnt log me onto my default AP and I need to tell it:
Code:
iwconfig wlan0 essid myessid


This is very annoying, and I suspect its what is causing your problem too.

Does anyone know where to edit the default config for ndiswrapper so that i can edit it manually?
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Fri Mar 11, 2005 2:33 am    Post subject: Reply with quote

To configure my wireless card at boot I created a script called '/etc/init.d/wireless' with the following in it:

Code:

#!/sbin/runscript

start(){
  ebegin "Configuring wireless interface"
  $IWCONFIG $IFACE essid $ESSID
  $IWCONFIG $IFACE mode Managed
  $IWCONFIG $IFACE key restricted $WEP_KEY
  eend $?
}


then copy (not symlink) '/etc/init.d/net.eth0' to '/etc/init.d/net.wlan0' and add 'wireless' to the depend section:

Code:

# For pcmcia users. note that pcmcia must be added to the same
# runlevel as the net.* script that needs it.
depend() {
        use wireless hotplug pcmcia
}


final create a file called '/etc/conf.d/wireless' and put the following information in it:

Code:

IWCONFIG=/usr/sbin/iwconfig # Path the your iwconfig prog
IFACE=wlan0                         # Interface that the wireless card is on
ESSID=INSECURE_WLAN        # Your AP's ESSID
WEP_KEY=1234567890           # Your WEP key


It's not a very clever script but it does what I need.

G.
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Fri Mar 11, 2005 10:47 am    Post subject: Reply with quote

Thanks GordSki, you're the man. :D
I'll try that right away.

Also, I wrote a complete howto on how to setup a ndiswrapper-supported card here. Its only my 3rd howto so if it is a bit rubbish, please tell me any problems with it.
Have a look though. I think I will integrate your script onto the end if thats ok. :)
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Fri Mar 11, 2005 11:20 am    Post subject: Reply with quote

NP plonka!

You might want to use this instead, makes it useful for ad-hoc and WEP-less configs:

Code:

#!/sbin/runscript

start(){
  ebegin "Configuring wireless interface $IFACE"
 
  $IWCONFIG $IFACE essid $ESSID
 
  if [ "$MANAGED" == "true' ]
  then
    $IWCONFIG $IFACE mode Managed
  fi

  if [ "$WEP_KEY" != "" ]
  then
    $IWCONFIG $IFACE key restricted $WEP_KEY
  fi

  eend $?
}


Only difference in the config is that if your using an infrastructure (ie. access point based system) add the following line to '/etc/conf.d/wireless':

Code:

MANAGED=true


EDIT: Might look into making this work for multiple wireless interfaces too.......

G.
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Fri Mar 11, 2005 5:03 pm    Post subject: Reply with quote

Hi,

Thats great... I was trying your initial script this morning and i'll try your amended version as soon as I get my daily WoW fix. ;)
I know this is a silly question, but I'm currently using this command to get my wlan0 connection on boot:
Code:
rc-update add net.wlan0 default


Is this correct, because my wlan0 card still is refusing to start at boot...

Thanks. :)
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Sat Mar 12, 2005 12:48 am    Post subject: Reply with quote

Yeah. That should set up the plain network side of the configuration (ie the stuff that's the same as any other network card, IP address, etc.). You need to make sure that your 'ndiswrapper' module is loaded before this script is run. AFAIK if you stick the module into /etc/modules/autoload.d/kernel-2.x it should load before the net.wlan0 script is run.

Also, its been my experience that you need to do the wireless side of the config (ie ESSID, WEP key, etc), before the plain network config will work (hence the 'wireless' entry in the 'depend' section of net.wlan0). I think this is perticularly the case with DHCP configuration.

G.
Back to top
View user's profile Send private message
plonka2000
Apprentice
Apprentice


Joined: 02 Dec 2004
Posts: 160
Location: UK, Surrey

PostPosted: Sun Mar 13, 2005 6:28 pm    Post subject: Reply with quote

Hi,

I did all that already. I input the 'ndiswrapper' line into /etc/modules.autoload.d/kernel-2.6.
I also know ndiswrapper is starting first because I can see it listed while booting.
This was set just after installing the card. However, its just not launching at boot.

It works perfectly if I boot up then issue these commands:

Code:
# iwconfig essid mywlan

# dhcpcd wlan0


If I use those two commands, it gets the card up perfectly and grabs an IP, however, it will just not carry this out at boot using:

Code:
rc-update add net.wlan0 default


Would there be another way?
_________________
-Do not be afraid of what is different.
-Do not be afraid of being different.
-After all, ignorance is not an excuse.

Using Gentoo and Windows XPee.

Check my site here
Back to top
View user's profile Send private message
GordSki
Guru
Guru


Joined: 18 Oct 2004
Posts: 329

PostPosted: Sun Mar 13, 2005 7:52 pm    Post subject: Reply with quote

Is the wireless script running?

You should see this at start-up:

Quote:

* Configuring wireless interface... [ ok ]


or what ever message you put in your script.

The wireless script has to be added to default run level too. The depend section of the script doesn't force the loading of the script, it just makes sure it is loaded before the net.wlan0 scripts.

G.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
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