# 3com 3CRPAG175 Atheros chipset

## tms

3com 3CRPAG175 w/xjack, Atheros chipset.

Got some problems getting this card working.

 *Quote:*   

> # dmesg |grep -i ath
> 
> ath_hal: module license 'Proprietary' taints kernel.
> 
> ath_hal: 0.9.11.6
> ...

 

Basically wont receieve an IP from the dhcp server nor work if I specify one manually.

***

Furthermore, I also got an Intel prowireless with ipw2100 driver version 0.55.

I want to enable WPA support and downloaded wpa-supplicant and got the ipw2100 wpa-supplicant patch.

Here are the files 

 *Quote:*   

>  http://dev.gentoo.org/~brix/files/overlay/net-wireless/wpa-supplicant/files/

 

this is my .config file for compiling wpa-supplicant

 *Quote:*   

> # Needed for the wireless drivers
> 
> CONFIG_WIRELESS_EXTENSION=y
> 
> # Drivers which compile out-of-the-box
> ...

 

This is my error message

 *Quote:*   

> 
> 
> # make
> 
> gcc -o wpa_supplicant config.o ctrl_iface.o eloop.o common.o md5.o rc4.o sha1.o aes_wrap.o driver_hostap.o driver_prism54.o driver_atmel.o driver_ndiswrapper.o driver_ipw2100.o eap_md5.o eap_mschapv2.o eap_gtc.o eap_otp.o eap_leap.o eapol_sm.o eap.o ms_funcs.o driver_wext.o wpa_supplicant.o wpa.o l2_packet.o -lcrypto
> ...

 

----------

## hecatomb

IMHO the compile fails because it is not linked with the needed libraries!

 *Quote:*   

> 
> 
> ```
> # make
> 
> ...

 

Here only libcrypto is linked into it.

You can find out which libraries are needed by listing the symboles in all libraries installed in your system.

```
for LIB in /lib/*.so* /usr/lib/*.so*; do if ! test -h ${LIB}; then echo "-----> ${LIB}"; nm ${LIB} | grep SSL_state; fi; done
```

Then look through the output. On my system here (sorry at work here we have only suse boxes) it get this.

```
-----> /lib/ld-2.3.2.so

-----> /lib/libacl.so.1.1.0

...

-----> /usr/lib/libssl.so.0.9.7

000233e0 T SSL_state

0000c52c T SSL_state_string

0000bb7a T SSL_state_string_long

...
```

You can grep on everything. On this system I found:

SHA1* in /lib/libxcrypt

SSL_* in /usr/lib/libssl

Then edit the Makefile to use the correct libraries. So the call should look like this:

```
gcc -o wpa_supplicant config.o ... l2_packet.o -lxcrypt -lssl
```

----------

## tms

your commands didnt work too well on my system it seems.

 *Quote:*   

> 
> 
> root@cloud ~ # for LIB in /lib/*.so* /usr/lib/*.so*; do if ! test -h ${LIB}; then echo "-----> ${LIB}"; nm ${LIB} | grep SSL_state; fi; done
> 
> -----> /lib/ld-2.3.3.so
> ...

 

but here's an idea. emerge wpa-supplicant compiles nicely, but its not patched to work with ipw2100.

I hope Im patching it correctly. in the source if wpa_supplicant I do

 *Quote:*   

>  patch -p1 < wpa-supplicant-0.2.4-ipw2100.patch

 

hopefully the ebuild will be patched in the future and thanks for the reply.

----------

## hecatomb

 *Quote:*   

> your commands didnt work too well on my system it seems.

 

Sorry, have not tested this on a gentoo box. Seems like they have removed all these symboles from the libraries using a command like strip. The libraries don't need these symbols but as you can see sometimes they maybe helpful.  :Wink: 

For me the source compiles great with your .config weather I'm using the patch or not!! The patch command is ok if you are in the source directory!

So I looked through the source (e.g. eap.c):

```
...

#ifdef EAP_TLS_FUNCS

static void ssl_info_cb(const SSL *ssl, int where, int ret)

{

...

   if (where & SSL_CB_LOOP) {

      wpa_printf(MSG_DEBUG, "SSL: %s:%s",

            str, SSL_state_string_long(ssl));

   }

...

}

#endif /* EAP_TLS_FUNCS */

...
```

As you can see the function 'SSL_state_string_long' should only be used when 'TLS_FUNCS=y' is in your .config!!!

Maybe you compiled your source with this option then removed it from your config and forgot a 'make clean'.

```
# cd /usr/local/src

# cp wpa_supplicant-0.2.4/.config .

# rm -rf wpa_supplicant-0.2.4

# tar xzf /path/to/tar/wpa_supplicant-0.2.4.tar.gz

# mv .config wpa_supplicant-0.2.4

# cd wpa_supplicant-0.2.4

# patch -p1 < /patch/to/patch/wpa-supplicant-0.2.4-ipw2100.patch

# make
```

If you want to change your .config after a compile please do a 'make clean' to remove all object files compiled yet!

----------

## tms

I did use make clean to remove previous files, but now I deleted the source files, redownloaded them and used the same .config as in my first post.. and it worked o_O

thanks alot hecatomb  :Smile: 

now its just to get my 3com card working..

----------

## hecatomb

ok great so let's go on!

 *Quote:*   

> Basically wont receieve an IP from the dhcp server nor work if I specify one manually.

 

What's going wrong when you set a static ip and do a /etc/init.d/net.ath0 restart? Any errors?

----------

## tms

it seems all fine

 *Quote:*   

> 
> 
> # /etc/init.d/net.ath0 restart
> 
>  * Bringing ath0 down...                                                                         [ ok ]
> ...

 

on a side note about WPA support for the ipw2100 driver, I think I was too hasty in my conclusion. as I ran

 *Quote:*   

> wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf -Dipw2100 -B

 

it told me ipw2100 was an unsupported driver. so I removed the source again and patched it all over just in case I forgot it last time. and now it wont compile again. I have tested compiling it both with the patch and without, strange...

 *Quote:*   

> 
> 
> gcc -MMD -O2 -Wall -g -I../driver/modules -I../utils -I../hostapd -DCONFIG_DRIVER_PRISM54 -DCONFIG_DRIVER_IPW2100 -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MD5 -DEAP_MSCHAPv2 -DIEEE8021X_EAPOL -DPCSC_FUNCS -DEAP_TLS_FUNCS -DCONFIG_WIRELESS_EXTENSION   -c -o pcsc_funcs.o pcsc_funcs.c
> 
> pcsc_funcs.c:18:22: warning: winscard.h: No such file or directory
> ...

 

but I can live without WPA support for the time beeing, I'd rather get my 3com card working as it has higher speeds and the xjack  :Smile: 

----------

## hecatomb

 *Quote:*   

> 
> 
> ```
> ...
> 
> ...

 

I found winscard.h should be included in the package 'pcsc-lite'

http://packages.gentoo.org/search/?sstring=pcsc-lite

Have you unemerged this? Emerging it should help to succed with the compile.

 *Quote:*   

> but I can live without WPA support for the time beeing, I'd rather get my 3com card working as it has higher speeds and the xjack 

 

Does the card work correctly now? Getting an IP from the dhcp and so on.

----------

## tms

I set up ath0(3com) as I would set up my eth1(ipw2100), when I run dhcpcd it doesnt even seem to try sending. just jumps to the next line awaiting next command. link quality shows 0/94 and I dont get any connectivety when I specify an IP address.

ipw2100:

pcsc-lite is indeed the package required to compile wpa_supplicant <solved>  :Smile: 

sadly enough, WPA still doesnt work.

 *Quote:*   

> 
> 
> /usr/local/bin/wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf -Dipw2100 -dd
> 
> 

 

I will paste my wpa_supplicant.conf and debug output from wpa_supplicant later

----------

## tms

iwconfig eth1

 *Quote:*   

> 
> 
> eth1      IEEE 802.11b  ESSID:"homenet"  Nickname:"ipw2100"
> 
>           Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0E:6A:D3:BD:24
> ...

 

ifconfig eth1

 *Quote:*   

> 
> 
> eth1      Link encap:Ethernet  HWaddr 00:0C:F1:46:B2:0C
> 
>           BROADCAST MULTICAST  MTU:1500  Metric:1
> ...

 

I use eth1.sh to start the interface

 *Quote:*   

> 
> 
> #!/bin/sh
> 
> /etc/init.d/net.eth1 restart
> ...

 

/etc/wpa_supplicant.conf

 *Quote:*   

> 
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> ...

 

Here is the debug info from wpa_supplicant

wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf -Dipw2100 -dd

 *Quote:*   

> 
> 
> Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
> 
> Reading configuration file '/etc/wpa_supplicant.conf'
> ...

 

iwconfig only shows link quality when wpa_supplicant is running

----------

## hecatomb

Sorry but I'm not very familiar with this wireless things.

The only thing I mentioned is that eth1 isn't up:

 *Quote:*   

> ...
> 
>  BROADCAST MULTICAST MTU:1500 Metric:1 
> 
> ...

 

There should be UP in front of this line!

----------

## tms

hmmm. Im starting to think I have some faulty or non-functional drivers installed.

 *Quote:*   

> 
> 
> *  net-wireless/madwifi-driver
> 
>       Latest version available: 0.1_pre20040906
> ...

 

 *Quote:*   

> 
> 
> ath0      IEEE 802.11  ESSID:"myessid"
> 
>           Mode:Managed  Frequency:2.447 GHz  Access Point: FF:FF:FF:FF:FF:FF
> ...

 

notice the link quality and the access point. it should atleast relate to the access point in spite not having an IP

----------

## hecatomb

Sorry for my late reply!

 *Quote:*   

> notice the link quality and the access point. it should atleast relate to the access point in spite not having an IP

 

Yes that doesn't really seem to be ok!

Does the madwifi-driver need a kernel module? Maybe you installed madwifi which patched the kernel source but you did not compile and install the new kernel! Just a guess please don't mind if I'm wrong!

Here are some links I found. Hope that help's more than I did  :Wink: 

http://jmccoy.sdf-us.org/slackware10/toshiba-a75.php#wireless

https://forums.gentoo.org/viewtopic.php?t=218009&highlight=madwifi

http://www.mattfoster.clara.co.uk/madwifi-faq.htm

http://www.linux-on-laptops.com/

 *http://madwifiwiki.thewebhost.de/wiki/WifiCards wrote:*   

> 3Com 3CRPAG175 --2003/10/26 02:41 CET
> 
> Works fine, no special instructions.

 

WPA support: https://forums.gentoo.org/viewtopic.php?t=226068&highlight=madwifi

----------

## tms

I recompiled my kernel, recompiled madwifi and modprobed them. voila it works :)

stunningly weird

----------

## hecatomb

Oh, it's great to hear this!!!  :Smile: 

All problems solved now?

----------

## tms

there's still problems with WPA support in ipw2100, but I think I'll wait till wpa_supplicant supports it out of the box. hopefully wont be long

----------

## mamac

Trying to install this card now, does it work for you tms ?

----------

## tms

jean-marc.beaune: yes. the madwifi drivers arent perfect, and there were some issues with my card when I initially tried it, but its alot more functional now. madwifi benefits from using latest wireless-tools and drivers, even though its not marked stable

----------

## mamac

Yes, the package is masked, that's why I'm quite afraid to emerge it ! My Gentoo box works so fine... :Wink: 

Did you emerge hotplug to have the card configured when you plug it ?

I found this : http://linux.seindal.dk/item23.html

Thanks

----------

## tms

I have coldplug and hotplug both at boot runlevel, to ensure module is loaded *before* the network is brought up

----------

## mamac

Ok,

I've installed madwifi and hotplug and it's going quiet well at the moment, it can get an ip provided by the access point with WPA encryption.

The problem I have now is that ath0 doesn't start automtically even if I did the following :

```

cd /etc/init.d

ln -s net.eth0 net.ath0

rc-update add net.ath0 default

```

I added the following in /etc/conf.d/net :

```

iface_ath0="dhcp"

```

but it ath0 is not up when gentoo starts.

I need to do the following to get an ip address :

```

modprod ath_pci

iwconfig ath0 essid "jmb"

dhcpcd ath0

iwconfig ath0 key S:WPA_KEY

```

What do I have to do to start ath0 automatically ?

Thank you !

----------

## j-m

 *jean-marc.beaune wrote:*   

> 
> 
> The problem I have now is that ath0 doesn't start automtically even if I did the following :
> 
> ```
> ...

 

You should probably link to net.lo, not net.eth0

----------

## tms

you see, the stable baselayout version doesnt have support for wireless, but baselayout 1.11.9-r1 does. you probably want to unmask it as well as its other masked dependencies (ouch  :Razz: ). its been fine for me. if you dont feel like using a masked baselayout, Ive put together a small script to connect with a static wlan configuration.

```

#!bin/bash

# script to bring up a wlan int

# choose what interface to use

int="wlan0"

# choose what ESSID to use

id="myNetwork"

# encryption key. prefix with "s:" for string, else hex

key="s:MyPrivateKey"

iwconfig $int essid $id

iwconfig $int enc $key

ifconfig $int up

if test ! -e /var/run/dhcpcd-${int}.pid

        then echo -e "bringing up $int by DHCP" && dhcpcd $int

        else echo -e "DHCP already running,\ndeleting pid and trying again"

        rm /var/run/dhcpcd-${int}.pid && dhcpcd $int

        if [ "ifconfig ${int} |grep -c" != "1" ]

                then echo -e "got `/sbin/ifconfig $int ${inet_if} |sed '/.*inet addr:/!d;s///;s/ .*//'` from DHCP"

                else echo -e "could not contact DHCP server"

        fi

fi

```

you could possible place it in /sbin/, make it executable and just run it every time you need to connect. or perhaps have it autorun somehow

----------

## mamac

Thank you for the script !

But what about modprob...I don't understand

iwconfig without doing "modprobe ath_pci" :

 *Quote:*   

> 
> 
> bash-2.05b# iwconfig
> 
> lo        no wireless extensions.
> ...

 

iwconfig if I do modprobe ath_pci :

```

bash-2.05b# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

ath0      IEEE 802.11  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00

          Bit Rate:0 kb/s   Tx-Power:50 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

I have to find a solution to enable ath0 at startup otherwise the script won't work... :Confused: 

----------

## tms

hotplug/coldplug should take care of the module loading. if you wish to load it regardless if the card beeing inserted or not, then add it to autoload

```
echo "ath_pci" >> /etc/modules.autoload.d/kernel-2.6

```

----------

## mamac

Everything is ok for me now, thank you.

----------

