# drivers for ATMEL wlan cards ?

## thm

I just bought a wireless lan pcmcia card for my notebook that comes with linux drivers. The company that makes the key chips is called ATMEL and someone seems to provide and even maintain linux drivers at sourceforge. 

Since I couldn't find  the corresponding package in Gentoo, though, I'm going to give it a shot and try to write the ebuild myself.  Someone please stop me, if that has already been done  and I am just wasting my time...

----------

## kcarlson

Before you write the ebuild, make sure the driver works.  I had some problems, but did get things working...

Here are my notes:

Wireless NIC install on gentoo

Hardware:

MB:     SY-K7ADA, Athlon XP1700

NIC:    Netgear MA101 (a)

OS:     Gentoo 1.4

Software to get and links to check:

       For Netgear MA101B (which worked for my MA101a)

http://at76c503a.berlios.de/#distr

http://mckinney.co.nz/wireless/binary.html

https://forums.gentoo.org/viewtopic.php?t=60076&highlight=ma101

        For Netgear MA101A (which did NOT work for my MA101a)

http://atmelwlandriver.sourceforge.net/howto/howto-4.html#ss4.3

http://atmelwlandriver.sourceforge.net/downloads.html

         - YOU NEED INTERSIL SUPPORT 

         - http://atmelwlandriver.sourceforge.net/snapshots/atmelwlandriver-ss-2

0021209.tar.gz

1.  Configure your kernel with Wireless Extensions

        ( CONFIG_NET_RADIO enabled )

        - check for /proc/net/wireless

        make dep && make clean bzImage modules modules_install

        install your bzImage for lilo or grub or whatever.

2.  emerge wireless-tools

3.  emerge hotplug

4.  Download driver 

        a)  tar xzvf at76c503-0.10.tar.gz 

        b)  make all

        c)  make install

5.  Testing:

        try plugging in NIC

        dmesg

        iwconfig wlan0 mode Managed essid Wireless channel 11 key xx-xx-xx-xx-xx...etc...

        dhcpcd wlan0

6. cp /etc/init.d/net.eth0 /etc/init.d/net.wlan0

        Find line like this:  ebegin "Bringing ${IFACE} up"

          an insert the following right after it:

        if [ -f /etc/conf.d/net.${IFACE} ]

        then

                iwconfig ${IFACE} mode ${MODE} essid ${ESSID} channel ${CHANNEL} key ${KEY}

        fi

7. vim /etc/conf.d/net.wlan0 

        # Config file for /etc/init.d/net.wlan0

        # Created with advice from https://forums.gentoo.org/viewtopic.php?t=78664&highlight=iwconfig

        MODE="Managed"

        ESSID="MyESSID"

        CHANNEL="1"

        KEY="xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx"

8. Edit /etc/conf.d/net

        - add entry for wlan0 ( ex. iface_wlan0="dhcp" )

9. rc-udpate add net.wlan0 default

Other commands to play with:

lvnet iwconfig iwlist iwspy iwpriv

good luck.

----------

## UberLord

For steps 6 onwards you can simply use my handy wireless configuration ebuild linked in my sig  :Smile: 

----------

## thm

Thank you for providing the various helpful hints.

I just wanted to give a little update:

The good news is that I now have a working ebuild for atmelwlandriver version 3.2.4.4. which is the most recent package available from sourecforge. The package is a little messy but it's better than nothing.

The PCMCIA driver (at least for my card)  seems to work all right - after some patching.  However, kernel 2.6 refuses to load the driver for the PCI card - which I unfortunately can't test anyway  because I don't have such a card. Likewise, I can't test the USB driver because I don't have the hardware. I'm pretty sure that the USB stuff isn't working properly, either. At least, it doesn't seem to be configured correctly by the scripts included in the original package. 

Furthermore, the X app "xvnet"  for configuring and monitoring the wireless network doesn't seem to work (it can't find the wlan interface !). If someone can tell me why, I'll give it another shot. But for the moment, IMHO it's "nice to have" rather than essential (translate that to: I don't need it). I haven't tried "winter" yet.

If anyone has either the ATMEL PCI or USB hardware and cares to share the details (up to the point where you call iwconfig) with me, I would try to incorporate that into the new ebuild. If not, I will just submit it as it is, i.e. buggy with respect to PCI, USB, and X apps, in the next few days.

----------

## Voltago

<edit>I'll assume you have already installed the pcmcia_cs package</edit>

Actually, the atmel drivers are in 2.6er kernel. You don't have to download anything. After enabling pcmcia support, go to

```
Device Drivers->Networking Support->Wireless LAN
```

and select

```
<M> Atmel at76c50x chipset 802.11b support
```

and, further down

```
<M> Atmel at76c502/at76c504 PCMCIA cards
```

Now, build your kernel, emerge a recent version of pcmcia-cs, run

```
cardctl ident
```

check if the vendorid, productid pair displayed for your card is in /etc/pcmcia/config, if not so, create the entry

```
card "<nameofyouratmelcard>"

manfid <yourvendorid>, <yourproductid>

bind "atmel_cs"
```

and of course don't forget

```
rc-update add pcmcia boot
```

<edit>

As thm has pointed out correctly, for this driver to work you'll need the firmware package from http://thekelleys.org.uk/atmel/. Sorry, I forgot to mention this  :Embarassed: 

</edit>Last edited by Voltago on Sun Jul 25, 2004 2:01 pm; edited 2 times in total

----------

## thm

Too bad, you didn't tell me last friday. I guess I should have upgraded the kernel first. Anyway, I learned something about writing ebuilds...   :Wink: 

----------

## thm

 *Voltago wrote:*   

> Actually, the atmel drivers are in 2.6er kernel. You don't have to download anything...

 

Well, that isn't quite true. My card needs downloadable firmware that isn't included here. Furthermore, I'm not so enthusiastic about this driver for other reasons. Further details and submitted ebuilds for both, the sourceforge drivers and the firmware can be found here:

https://bugs.gentoo.org/show_bug.cgi?id=10730

----------

