Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: D-Link DWL-G650+, acx100, kernel 2.6.7
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
reznor666
n00b
n00b


Joined: 08 Jul 2004
Posts: 9

PostPosted: Thu Jul 08, 2004 9:55 am    Post subject: HOWTO: D-Link DWL-G650+, acx100, kernel 2.6.7 Reply with quote

HOWTO: D-Link DWL-G650+, acx100, kernel 2.6.7

My WLAN-Card is a D-Link DWL-G650+ B1 (You can check your revision by looking at the backside
of your D-Link card. Mine is H/W:B1) with the Texas Instruments ACX 111 Chip.
My Laptop is a Toshiba Satellite and my access point is a
Trendnet TEW-431BRP.

I used the acx100 drivers from http://acx100.sourceforge.net

Everything works fine except WEP encryption with acx100-0.2.0pre8_plus_fixes_14 driver.
For more infos look at the bottom of this post.

And this is how I did it (everything as root):


1. Requirements:

Download the full kernel sources for the kernel 2.6

emerge development-sources

and just to be sure to have the newest module tools

emerge module-init-tools

since we have a pcmcia/cardbus card, we need a tool to
check the check the pcmcia status:

emerge pcmcia-cs

and you'll need the wireless-tools to configure ssid, ipaddress, ...

emerge wireless-tools


2. Inject the acx100 driver into the kernel tree

Download the newest archive from http://rhlx01.fht-esslingen.de/~andi/acx100/
Unpack the archive and change to its directory. Start injecting the driver:

make inject

This creates the directory /usr/src/linux/drivers/net/wireless/acx
and puts the sources in place.

Now edit the file /usr/src/linux/drivers/net/wireless/Makefile.
After injecting a line at the bottom was added.
This line looks like this:

Code:
      obj-$(CONFIG_ACX) += acx/


Change this to:

Code:
      obj-m += acx/



3. Configure the kernel

cd /usr/src/linux
make menuconfig


Activate the following additionally (and respectively to your PCMCIA/CardBus hardware,
in my case it's yenta-socket compatible) in your kernel configuration:

Code:
      Bus Options (PCI, PCMCIA, EISA, MCA, ISA)  --->
         PCMCIA/CardBus support  --->
            <*> PCMCIA/CardBus support
            <*> CardBus yenta-compatible bridge support
         PCI Hotplug support  --->
            <*> Support for PCI Hotplug (EXPERIMENTAL)
      
      Device Drivers  --->
         Networking Support  --->
            [*] Networking support
            [*] Network device support
               Wireless LAN (non-hamradio)  --->
                  [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions

DO NOT CHECK THE "PCMCIA network device support" !!!

Exit and save your kernel configuration.
Compile your kernel as usual and copy it to your mounted /boot partition

make
mount /boot
cp arch/i386/boot/bzImage /boot/kernel-2.6.x


After your kernel was compiled you should now have a compiled module
acx_pci.ko in /usr/src/linux/drivers/net/wireless/acx.

If you only have to compile the module you just have to do a

/usr/src/linux/make modules


Edit your /boot/grub/grub.conf if needed:

vi /boot/grub/grub.conf



4. Reboot

reboot :)


5. Install the firmware for the DWL-G650+


To prevent using the wrong firmware, I recommend using the drivers from the driver cd shipped with your card.
I really got annoyed about the driver confusion on the D-Link Webpage and the naming of the cards..
and i got to know that especially the DWL-G650+ card is not sold outside Europe, so you won't get
the correct driver from ftp.d-link.com...
I would also like to place the compiled module and the firmware
somewhere else than in the kernel tree:

mkdir /lib/modules/2.6.7/net
cp -r /usr/src/linux/drivers/net/wireless/acx /lib/modules/2.6.7/net
mkdir /lib/modules/2.6.7/net/acx/firmware
mount /dev/cdrom /mnt/cdrom
cd /lib/modules/2.6.7/net/acx/firmware
cp /mnt/cdrom/Driver/Drivers/Win2000/GPLUS.bin .

IMPORTANT: Case sensitive..

mv GPLUS.bin TIACX111.BIN

You'll have to do this, because the start_net script searches for TIACX111.BIN.

In case you have two .bin files in the "Driver/Drivers/Win2000/" directory, you
have to copy both (eg. FwRad16.bin & FwRad17.bin) into your firmware dir and
rename the FwRad17.bin file to WLANGEN.BIN. Keep FwRad16.bin as is!

cp /mnt/cdrom/Driver/Drivers/Win2000/FwRad* .
mv FwRad17.bin WLANGEN.BIN


6. Install the scripts for configuring and starting up your new wlan0 device

mkdir /lib/modules/2.6.7/net/acx/scripts
cd <your-unpacked-acx-drivers-dir>/scripts
cp * /lib/modules/2.6.7/net/acx/scripts

Edit the start_net script for functionality:

vi /lib/modules/2.6.7/net/acx/scripts/start_net

Edit the values to your needs (Leave KEY and ALG commented out):

Code:
      
      DEV=wlan0
      IP=Enter your IP here
      NETMASK=Enter your netmask here
      GATEWAY=Enter your Gateway IP here
      ESSID="Enter your ESSID here" # THIS IS CASE SeNsItIvE!! any == associate to any ESSID
      # Default rate configured as 11Mbps to not cause connection problems with non-22Mbps hardware...
      RATE=22M
      CHAN=Enter Channel number here # it's useful to try to stick to channels 1, 6 or 11 only, since these ...
      #TXPOWER=16 # 16 == 16.5dBm, 18 == 18dBm (default)
      MODE=Managed
      DEBUG=0xb
      #KEY="B401CD21B44CCD21DEADBEEF11" # WEP128
      #ALG=open # open == Open System, restricted == Shared Key


Find the line that starts with MODULE_AT="${SCRIPT_AT}
edit this to

Code:
      MODULE_AT="${SCRIPT_AT}/../acx_pci.ko"

Next find the line that starts FIRMWARE_AT="${SCRIPT_AT}
edit this to

Code:
      FIRMWARE_AT="${SCRIPT_AT}/../firmware/"

7. Start the WLAN-Card

/lib/modules/2.6.7/net/acx/scripts/start_net

This helpful script loads the compiled acx_pci module into your kernel
and sets up your WLAN-Card as wlan0.
Check if your card was configured correctly:

iwconfig wlan0

If you can see your configured settings... Congratulations! :)


8. Startup the WLAN automatically


Write a short rc-script:

vi /etc/init.d/wireless


Code:

      #!/sbin/runscript

      depend() {
      use hotplug pcmcia
      }

      start() {
      ebegin "Starting Wirless LAN Interface wlan0"
      /lib/modules/2.6.7/net/acx/scripts/start_net
      eend $? "Failed to bring up wlan0"
      }
   
      stop() {
      ebegin "Stopping Wireless LAN Interface wlan0"
      /lib/modules/2.6.7/net/acx/scripts/stop_net
      eend $? "Failed to stop wlan0"
      }


Make it executable:

chmod 755 /etc/init.d/wireless

Add it to your default runlevel

rc-update add wireless default

9. WEP encryption


The Changelog for acx100-0.2.0pre8_plus_fixes_14 says, that WEP
support has been removed for the acx111 based wlan cards...
I will try using version acx100-0.2.0pre8_plus_fixes_13 and post my
expreriences to this thread later...

--------------------

I hope this works for you.


Greetings

reznor666


Last edited by reznor666 on Sun Jul 11, 2004 2:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Sat Jul 10, 2004 3:12 pm    Post subject: Reply with quote

Nice howto, it worked great for me. One step you missed was actually compiling the module for acx_pci.

chris
Back to top
View user's profile Send private message
reznor666
n00b
n00b


Joined: 08 Jul 2004
Posts: 9

PostPosted: Sun Jul 11, 2004 2:41 pm    Post subject: Reply with quote

You're right.
I added a line to make clear, when the module
actually gets compiled.

reznor666
_________________
My opinions may have changed,
but not the fact that I am right. :P
_________________
Back to top
View user's profile Send private message
Sibben
n00b
n00b


Joined: 16 Nov 2003
Posts: 40
Location: Sweden

PostPosted: Sun Jul 11, 2004 3:15 pm    Post subject: Reply with quote

Great work! Tnx!
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Mon Jul 12, 2004 2:39 am    Post subject: Reply with quote

I recompiled my kernel for some reason and went to start the wireless card and poof all my scripts and firmware was missing. I'm currently working on a permanent fix for this that should even get one through a kernel upgrade. I have the start_net script finished, but I'm kind of struggling with where all the files should be located to be "correct". I know they should go somewhere in /usr/local since this is something that I'm doing myself. So that limits the options.

Unfortunately I won't be around for a few days but when I get back hopefully I can get the locations up and running. I'm thinking right now that eventually I/we could even turn this into an ebuild. When I do get back I want to see if this module will work as a standard wireless nic, ie. not having to use the start_net script to get it working. Anyone tried this?

chris
Back to top
View user's profile Send private message
Chaosite
Guru
Guru


Joined: 13 Dec 2003
Posts: 540
Location: Right over here.

PostPosted: Mon Jul 12, 2004 7:10 pm    Post subject: Reply with quote

ctford0 wrote:
I recompiled my kernel for some reason and went to start the wireless card and poof all my scripts and firmware was missing. I'm currently working on a permanent fix for this that should even get one through a kernel upgrade. I have the start_net script finished, but I'm kind of struggling with where all the files should be located to be "correct". I know they should go somewhere in /usr/local since this is something that I'm doing myself. So that limits the options.

Unfortunately I won't be around for a few days but when I get back hopefully I can get the locations up and running. I'm thinking right now that eventually I/we could even turn this into an ebuild. When I do get back I want to see if this module will work as a standard wireless nic, ie. not having to use the start_net script to get it working. Anyone tried this?

chris


What? Sure it works as a standard wireless nic, I use the Gentoo Wireless startup script from another thread on this forum. Works like a charm.

Also, default place the module looks for firmware is "/usr/share/acx/", so put it there. Or, you could place it in your "/etc/modules.autoload.d/kernel-2.6" like this:

Code:
acx_pci FIRMWARE_DIR="/some/directory/here/"


Which would work as well.

Also, the latest version of this driver can always be found in the latest love-sources, so I recommend checking that out as well...

VERY IMPORTANT AS WELL, READ THIS!

The acx driver is NOT, repeat NOT, SMP safe. That is the reason you had to edit Makefile is because the driver knows this, and doesn't put itself in the menu if SMP is enabled.

Also, the way the author edited the file was not so good, since it meant that the acx driver will be compiled without taking heed of the .config file. A better way is to edit the Kconfig file and removing the "!SMP" bit in the ACX driver's line, which would ensure the driver shows up when you do `make menuconfig`.

(Its in the networking section next to all the other Wireless drivers)

ACX + Reiser4 + SMP = A way to OOPS when trying to bring up wlan0.
Back to top
View user's profile Send private message
reznor666
n00b
n00b


Joined: 08 Jul 2004
Posts: 9

PostPosted: Tue Jul 13, 2004 12:02 pm    Post subject: Reply with quote

Hi there!

It's really not very important where the acx_pci.ko (kernel-module) or the start_net/stop_net scripts are located.
Important is to set the right paths in the start_net script, since relative
paths are used.
Take a look at the script start_net:
There are two variables that define the location of the firmware
and the kernel module:

SCRIPT_AT --> where the start_net script is located
MODULE_AT --> for the kernel module
FIRMWARE_AT --> for the firmware

and all paths to the module and firmware are set relative to the path of the start_net script:

Code:

SCRIPT_AT=`dirname $0`
MODULE_AT="${SCRIPT_AT}/../acx_pci.ko"
FIRMWARE_AT="${SCRIPT_AT}/../firmware"


So, the script "searches" for the module in "../acx_pci.ko" which is one level lower in the directory hierarchy relative to where the script is located.
The same for the firmware. But in this case the variable points to a directory "../firmware" one level lower relative to the script.

reznor666
_________________
My opinions may have changed,
but not the fact that I am right. :P
_________________
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

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

right, but the only thing that i was commenting on was the fact that if you have to recompile your kernel then you loose all your scripts. basically, /lib is not the proper place for it.

Chaosite: Thanks for the info, I'll probably give wireless-config a try then...


chris
Back to top
View user's profile Send private message
Festiz
n00b
n00b


Joined: 15 Jul 2004
Posts: 6
Location: Sweden

PostPosted: Thu Jul 15, 2004 11:48 am    Post subject: Reply with quote

I think you guys should look here:
http://www.linuxquestions.org/hcl/showproduct.php?product=1125
to see a little guide that works with WEP and don't really care if you update your kernel.
I've also written a little script that deides if the card is inserted or not and if it is inserted it configurates it automatically, this sequence is run every time I boot my laptop.
Code:
#!/usr/bin/perl

(`/sbin/lspci` =~ /ACX 111 54Mbps Wireless Interface/) ? `/sbin/WLAN` : print "WLAN-card is not inserted.\n"

If the card is inserted it calls upp my WLAN-setupscript containing this:
Code:
#!/bin/bash
echo "Modprobing ndiswrapper for the WLAN-Card"
/sbin/modprobe ndiswrapper && echo "Done."
echo "Configuring the wireless network"
/usr/sbin/iwconfig wlan0 channel 11 essid 3Com && echo "Done."
echo "Requesting IP-adress"
/sbin/dhcpcd wlan0 && echo "Done."
echo "Your IP:"
/usr/sbin/ip wlan0"

In the above script you need to edit channel and essid to suite your local wireless network.

If you've gotten an IP from the DHCP, my next homemade script the ip-script will echo your newly gained ip:
Code:
#!/usr/bin/perl
  if ($ARGV[0] eq 'wlan0') {
          @lines = `ifconfig wlan0`;
        }else{
          @lines = `ifconfig eth0`;
        }
foreach (@lines) {
        if (/inet addr:(.*)\s+B/) {
                print $1 . "\n";
                last;
        }
}

_________________
//Festiz
Back to top
View user's profile Send private message
Chaosite
Guru
Guru


Joined: 13 Dec 2003
Posts: 540
Location: Right over here.

PostPosted: Thu Jul 15, 2004 3:22 pm    Post subject: Reply with quote

Festiz wrote:
I think you guys should look here:
http://www.linuxquestions.org/hcl/showproduct.php?product=1125
to see a little guide that works with WEP and don't really care if you update your kernel.
I've also written a little script that deides if the card is inserted or not and if it is inserted it configurates it automatically, this sequence is run every time I boot my laptop.

... SNIP! ...


NO, NO, NO!

Your script uses NDISWRAPPER! NDISWRAPPER is evil! It should only be used in cases where there is no alternative native linux driver available, which is most definatly not the case here!

Please read this:
http://acx100.sourceforge.net/ndis_cludge.html

256-bit WEP works wonderfully here, everything works like a charm. With some modification, however, your script could be modified to use the native ACX driver.

Oh yeah, and I should mention the Gentoo WLAN initscript again. It really does rock... UberLord did a great job.

Read more about it here: http://forums.gentoo.org/viewtopic.php?t=122435
Back to top
View user's profile Send private message
ctford0
l33t
l33t


Joined: 25 Oct 2002
Posts: 774
Location: Lexington, KY,USA

PostPosted: Fri Jul 16, 2004 4:52 am    Post subject: Reply with quote

Ok, so here's how I set mine up. I first created a new file called acx in /etc/modules.d/ which contained the following:

Code:

options acx_pci firmware_dir=/usr/share/acx/firmware/ debug=0x0
options acx_usb firmware_dir=/usr/share/acx/firmware/ debug=0x0


Then run
Code:
modules-update
.

I used this method instead of loading with modules.autoload because I'm using a laptop, so hotplug takes care of loading the module for me when I insert the card. I put the usb part in just in case I may need it someday. :)

now working good!! I have acx100 working with wireless-config and ifplugd. Sweet!!!!!

chris
Back to top
View user's profile Send private message
pubecon
Guru
Guru


Joined: 03 Mar 2003
Posts: 342
Location: Glasgow, Scotland

PostPosted: Thu Aug 12, 2004 8:00 pm    Post subject: weird! Reply with quote

I had it working, so many thanks for that!

however, I had to repartition my hard disc meaning I had to back up everything then restore it.

everything appeared to be going fine, as I ran
Code:
/etc/init.d/wireless start
and the light came on on the card. Then I tried pinging and the activity light was flashing on the pcmcia card AND the wireless router but then a dissapointing

[code]Destination Host Unreachable[code] is all I get back from anything (apart from my internal interfaces (wlan0 and loopback))

iwconfig has the correct essid, access point mac address, bit rate and channel

ifconfig has the correct ip address, mac address for the card, broadcast, netmask etc.

however, same as when I had it working, I am unable to retrieve an ip address via dhcp.


what on earth is going on?!/where else could I be looking for messages?

[edit]weird, seems to have resolved itself by continually stopping/starting and fiddling about. wonder if it was perhaps my double checking of the settings on the router that caused the router to reboot[/edit]
Back to top
View user's profile Send private message
Festiz
n00b
n00b


Joined: 15 Jul 2004
Posts: 6
Location: Sweden

PostPosted: Tue May 03, 2005 12:47 pm    Post subject: Reply with quote

The reason why I use Ndiswrapper is that the ACX111 is very beta and doesn't perform well. My laptop operates very hot and due to that my card gets hot and then stops transmitting and not performing well at all. If i use Ndis it doesn't care about the temperature. I know this isn't ideal. But is there someway to make my laptop work cooler(fan working harder)
_________________
//Festiz
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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