You are not logged in.

#1 2006-07-17 18:10:22

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

ndiswrapper and belkin

I'm trying to get my belkin wireless g card running under ndiswrapper (the rt2x00 aren't stable enough yet as it's a rt61 card...).  Everything seems to have worked - the card has lights on the back, /etc/ndiswrapper seems to contain all the files that it should and it can scan for my router and correctly identify it's mac address, but it can't seem to actually connect to the router...

It's supposed to be able to get it's ip via dhcp but I've tried both that and static config and neither work...  The card will connect quite happily under windows and the only security on the router is mac address restriction  - and the card's mac is included in that...

I simply can't seem to get a card that appears to be working onto the network at all.

My router is a netgear one if that tells anyone anything...

Offline

#2 2006-07-18 21:53:19

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: ndiswrapper and belkin

If your card is 'eth1', say, try (from root prompt):

# dhcpcd eth1

This should interogate your Netgear router and ask it for an IP address.  If you're WiFI is wide open, you shouldn't have a problem.  (Assuming DHCP server is enabled on the Netgear).

What does 'ifconfig' show?

If 'eth1' has obtained an address, say, 192.168.0.254, then see if you can ping the Netgear, say, 'ping 192.168.0.1'

(Have been using my Belkin 802.11g PCMCIA for a long time now, without issue.)

Offline

#3 2006-07-19 06:55:10

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: ndiswrapper and belkin

I've tried "dhcpd wlan0" - I assume it's not the name of the interface (i.e. wlan0 over eth0) that could be the problem?

It just thinks about it for a while and then comes back without either error or ip address...

I know that the range of the ips given out by the router is 192.168.1.1-250 so I've tried just setting it manually to one which I know will be free - but then I simply can't seem to reach the network

It all seems to be working from a hardware point of view, but it's as if the netgear router simply refuses to talk to my wireless card...  As I said, the wlan card can see the router even to the point of picking up it's mac address - so it's working to some degree - but it simply cna't actually get on any kind of network...

Offline

#4 2006-07-19 14:54:11

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: ndiswrapper and belkin

:arrow:
Well, there are a few other things to determine:
1) Give us some more info:
** When you do a 'dhcpcd wlan0', what does 'ifconfig' show?
** What does your /etc/rc.conf look like?  And related WiFI config files?
** Is WiFI enabled in your Netgear?  (Believe me, this one's easy to overlook.)

2) Be sure your Belkin isn't trying to hop onto someone else's WiFI router -- which may block your attempts at DHCP.

3) Try switching channels.  Sounds crazy but someone in your neighborhood may be on the same channel as your Netgear and for some reason, your Belkin card is unable to make heads nor tails of the situation.  Happens.

4) Look for a /var/run/dhcpcd-<interface>.pid file and remove it.  (I think that's the right path -- from a groggy memory.)  The try dhcpcd again.

:arrow: Putting this emoticon here to solve the dred CSS no-padding problem, for readability's sake!

Offline

#5 2006-07-19 17:31:34

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: ndiswrapper and belkin

Well, there are a few other things to determine:
1) Give us some more info:
** When you do a 'dhcpcd wlan0', what does 'ifconfig' show?

It just shows the lo interface

** What does your /etc/rc.conf look like?  And related WiFI config files?

The relevant bit looks like:

wlan_wlan0="wlan0 essid RedFruit"
wlan="dhcp"

** Is WiFI enabled in your Netgear?  (Believe me, this one's easy to overlook.)  Yes - I'm using it now via my windows laptop to write this...

2) Be sure your Belkin isn't trying to hop onto someone else's WiFI router -- which may block your attempts at DHCP.  It'm pretty sure it's not as wlist wlan0 scan finds my router and even can pull it's mac address - which is the correct one.

3) Try switching channels.  Sounds crazy but someone in your neighborhood may be on the same channel as your Netgear and for some reason, your Belkin card is unable to make heads nor tails of the situation.  Happens.

I'll give this a go - it's the only thing I haven't tried.  I'll post back with the results...

4) Look for a /var/run/dhcpcd-<interface>.pid file and remove it.  (I think that's the right path -- from a groggy memory.)  The try dhcpcd again.

There isn't one...

Offline

#6 2006-07-19 19:25:30

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: ndiswrapper and belkin

phunni wrote:

Well, there are a few other things to determine:
1) Give us some more info:
** When you do a 'dhcpcd wlan0', what does 'ifconfig' show?

It just shows the lo interface

Ah.  Well then wlan0 isn't up. Try:

iwconfig eth1 mode managed
iwconfig essid "[ESSID]"
ifconfig eth1 up
ifconfig

And see what the last command shows (i.e. instead of 'wlan0', it could be 'eth1' -- and I don't remember how to determine this in a more straighforward way, would have to look in my notes).

If this works, then do:
route add default gw [IP of router] (optional)
dhcpcd eth1
ifconfig

And see what results.

phunni wrote:

The relevant bit looks like:

wlan_wlan0="wlan0 essid RedFruit"
wlan="dhcp"

Mine is set up differently.  Unfortunately my laptop isn't with me to look it up.  Will post it, later.
.

Offline

#7 2006-07-19 22:02:49

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: ndiswrapper and belkin

OK - I'll give it a go as eth1 and post how I get on.  I also tried playing around with the channels.  One channel (3) broke it completely and others just gave the same result as the default one...

Offline

#8 2006-07-20 17:59:06

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: ndiswrapper and belkin

I've tried using different iterface names (ra0 and eth0/1)  and the only one that will work properly is wlan0...

It's very bizarre - it seems to me as if everything is set up as it should be - but the router simply refuses to network with the card - which is odd as it's networking with the card on my laptop and with the desktop on windows...

Edit: I do wonder if it's something to do with the mode -what are the various options for mode?  The only thing I can find in the router settings for mode are "g & b" - which I'm assuming isn't related...?

Offline

#9 2006-07-22 16:02:46

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: ndiswrapper and belkin

Is it possible that this could be to do with my locale setting?  I always get errors about no such file or directory whenever I run the locale command...

I notice that when I try and install the ndiswrapper driver it seems to try and set the locale so I wondered if it's really important...

Offline

#10 2006-07-22 18:06:20

phunni
Member
From: Bristol, UK
Registered: 2003-08-13
Posts: 768

Re: ndiswrapper and belkin

OK - never mind the locale thing - I figured that out.

I do wonder now, though, whether the driver is set up properly.

For example, I checked through all the .conf files in /etc/ndiswrapper and all of them have a field called mac_address with a value of XX:XX:XX:XX:XX:XX

which, obviously, isn't right...

I've also jsut noticed that when I switch my PC off then my router lists my card (by mac address) as being an attached device.  As soon as the system tries to start the network then it's no longer listed...

Offline

#11 2006-07-24 02:17:51

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: ndiswrapper and belkin

Here's my /etc/rc.conf's relevant content:

# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
eth0="dhcp"
eth1="dhcp"
INTERFACES=(lo !eth0 !eth1)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

In other words, I boot my laptop all the way into KDE with only 'lo' connected.

Then I have a KDE icon that execs the following:

sudo /usr/sbin/connect home > /dev/null

The /etc/sudoers file contains the line:

<my_username> ALL = NOPASSWD: /usr/sbin/connect

The /usr/sbin/connect script looks like this:

#!/bin/bash

. /etc/rc.conf
[ -f /etc/conf.d/dhcpcd ] && . /etc/conf.d/dhcpcd

HOME_ESSID=Soloport
HOME_KEY=<long_key_goes_here>

SELF=$0
CMD=$1
ESSID=$2
KEY=$3

IFCONFIG=/sbin/ifconfig
IWCONFIG=/usr/sbin/iwconfig
DHCPCD=/sbin/dhcpcd

usage() {
    echo "USAGE: $SELF [eth | wep [<ESSID> [<WEP>]] | wpa <ESSID> <WPA> | down]"
    echo "  eth: Ethernet (eth0)"
    echo "  wep: WiFI (with or without WEP support)"
    echo "  wpa: WPA-based WiFI (not yet supported)"
    echo " down: Shut down eth0 and eth1"
}

if [ "$ESSID" == "" ]; then
    ESSID="any"
fi

case "$CMD" in
    eth)
        $IFCONFIG eth0 up
        $DHCPCD $DHCPCD_ARGS eth0
        ;;
    home)
        $IFCONFIG eth1 up
        $IWCONFIG eth1 essid $HOME_ESSID key $HOME_KEY
        $DHCPCD $DHCPCD_ARGS eth1
        ;;
    wep)
        $IFCONFIG eth1 up
        if [ $KEY == "" ]; then
            $IWCONFIG eth1 essid $ESSID
        else
            $IWCONFIG eth1 essid $ESSID key $KEY
        fi
        $DHCPCD $DHCPCD_ARGS eth1
        ;;
    wpa)
        $IFCONFIG eth1 up
        $IWCONFIG eth1 essid $ESSID key $KEY
        $DHCPCD $DHCPCD_ARGS eth1
        ;;
    down)
        $DHCPCD -k
        $IFCONFIG eth0 down
        $IFCONFIG eth1 down
        ;;
    *)
        CMD=""
        usage
esac

if [ "$CMD" != "" ]; then
    $IFCONFIG
    if [ "$CMD" == "down" ]; then
        /etc/rc.d/ntpd stop
    else
        /etc/rc.d/ntpd start
    fi
fi

Because this file contains a KEY, its permissions are strictly 'chmod 700'.

You'll want to substitute eth1 for wlan0, of course, etc.
.

Offline

Board footer

Powered by FluxBB