# New to wireless

## peter_poulsen

Hi

I just got my hands on a ZyAIR B-100 PCMCIA card which I would like to use with my Dell Inspiron 5150. Yes, I know it's an old card but it's free  :Smile: 

The problem is that I know nothing about wireless  :Sad: 

I have selected the following in the kernel (2.6.11.11):

```

Bus options

  PCCARD

    <*> PCCard (PCMCIA/CardBus)

    [ ] Enable PCCARD debugging

    <*> 16-bit PCMCIA support

    <*> 32-bit PCMCIA support

    --- PC-card bridges

     <*> CardBus yenta-compatible bridge support 

     <*> Cirrus PD6729 compatible bridge support 

     <*> i82092 compatible bridge support

     < > i82365 compatible bridge support

     < > Databook TCIC host bridge support

```

I have emerged: 

```

[ebuild   R   ] sys-apps/pcmcia-cs-3.2.8-r2  +X +gtk +gtk2 -trusted -vanilla -xforms 0 kB 

```

and my /etc/conf.d/pcmcia looks like this:

```
# Options for the 'cardmgr' daemon

CARDMGR_OPTS="-f"

# Default PCMCIA scheme

SCHEME="home"

# If using kernel PCMCIA drivers, PCIC should be "yenta_socket". If

# using the pcmcia-cs drivers, PCIC should be either "i82365" or

# "tcic", depending on your hardware.  If using non-modular kernel

# drivers, set PCIC to ""

PCIC="yenta_socket"

# Options for the PCIC module

PCIC_OPTS=""

# Alternative PCIC driver to use if PCIC driver fails

PCIC_ALT="i82365"

PCIC_ALT_OPTS=""

# Options for the pcmcia_core module

CORE_OPTS=""

```

And this is what I get from cardctl:

```
# cardctl status

Socket 0:

  5V 16-bit PC Card

  function 0: [ready]

```

My big question is: now what? I have searched around for howtos and tutorial but they at best seem confusing, and at worst conflicting. 

Help anybody? (I know how to setup regular networking in Gentoo, but have absolutely no idea how to use wireless)

----------

## lghman

You also need to emerge wireless-tools.  This will give the the all important iwconfig and iwlist commands.  These are the two most important commands to any wireless user  :Smile: .

--sonik

----------

## peter_poulsen

ok, it is emerged. Now what?

----------

## lghman

First you should run.

```
#iwconfig
```

This should list all your ethernet addresses including the ones with out wireless.  Like this:

```
iwconfig

lo        no wireless extensions.

eth0      IEEE 802.11b  ESSID:"USF"  Nickname:"USF"

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:0D:29:F0:A9:7A   

          Bit Rate=11 Mb/s   Tx-Power=20 dBm   

          Retry limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=89/100  Signal level=-39 dBm  Noise level=-88 dBm

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

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

eth1      no wireless extensions.

eth2      IEEE 802.11-DS  ESSID:"tsunami"  

          Mode:Managed  Frequency:2.442 GHz  Access Point: FF:FF:FF:FF:FF:FF   

          Bit Rate:11 Mb/s   Tx-Power=20 dBm   Sensitivity=0/65535  

          Retry limit:16   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/100  Signal level=-118 dBm  Noise level=-118 dBm

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

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

wifi0     IEEE 802.11-DS  ESSID:"tsunami"  

          Mode:Managed  Frequency:2.442 GHz  Access Point: FF:FF:FF:FF:FF:FF   

          Bit Rate:11 Mb/s   Tx-Power=20 dBm   Sensitivity=0/65535  

          Retry limit:16   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/100  Signal level=-118 dBm  Noise level=-118 dBm

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

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

```

Your card might automatically associate with an AP, some of mine do (as you can see) and others dont.  If it doesnt you can run

```
#iwlist ethx scanning
```

which will list all availble access points and then use iwconfig to set it to that wireless AP.  Such as :

```
#iwconfig ethx essid "your_ap_name"
```

--sonik

----------

## peter_poulsen

hmmm.... iwconfig does not really give me what I would expect. Any ideas for debugging?

```
# iwconfig 

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

```

Note: both the power and the link led on the card is on after I run /etc/init.d/pcmcia

----------

## lghman

What does an lsmod show you?  Did you compile the drivers in or did you compile them as modules in your kernel?

Now that I am looking at your orginal post, did you compile any of the net or wireless drivers for the cards.  I see that you went in and activated the pcmcia, but did you go into networking and turn on the wireless and compile the drivers for them?  

--sonik

----------

## peter_poulsen

```

# lsmod

Module                  Size  Used by

yenta_socket           23304  2 

rsrc_nonstatic         11264  1 yenta_socket

```

I also have enabled the following:

```

Device Drivers->networking support->Wireless LAN (non-hamradio)

  <*>   Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)

  <*>     Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.) (EXPERIMENTAL) 

  <*>     Hermes in TMD7160 based PCI adaptor support (EXPERIMENTAL)  

Device Drivers->networking support->PCMCIA network device support 

  (I have not selected any cards here as non of those listed seems to match mine)

```

```
#lspci

0000:02:04.0 CardBus bridge: Texas Instruments PCI4510 PC card Cardbus Controller (rev 02)

```

The card is a ZyXEL ZyAIR B-100 (IEEE 802.11b)

Hope that covers your questions.

----------

## lghman

 *peter_poulsen wrote:*   

> 
> 
> I also have enabled the following:
> 
> ```
> ...

 

Under the Wireless PCMCIA card section you need to enable support for 

```

---   Wireless 802.11b Pcmcia/Cardbus cards support            

  <M>   Hermes PCMCIA card support  

```

Since it looks like your trying to use the Hermes chipset drivers, you would need that option in there.

--sonik

----------

## peter_poulsen

ok, we are getting somewhere now.

```
 # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

eth1      IEEE 802.11-DS  ESSID:""  Nickname:"Prism  I"

          Mode:Managed  Access Point: 00:00:00:00:00:00   Bit Rate:11 Mb/s

          Tx-Power=15 dBm   Sensitivity:1/3

          Retry min limit:8   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/92  Signal level=-68 dBm  Noise level=-122 dBm

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

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

```

however

```
# iwlist eth1 scanning

eth1      Interface doesn't support scanning : Operation not supported

```

 :Sad: 

Any ideas?

Unfortunately I'm not sure that it is the right driver. It is simply a guess based on that alot of users on various newsgroups use that driver with ZyAir B-100, but usually they appear to have other problems.

----------

## lghman

Do you know the name of the access point you are trying to connect to?  If you do try 

```
#iwconfig eth1 essid "name of ap"
```

If not try this command

```
#iwconfig eth1 essid any
```

 which will try and connect to any access point in range.

--sonik

----------

## peter_poulsen

What should happen?

I can use any name for the AP and nothing happens.

----------

## lghman

After you use one of those commands you sould see if it connected to an ap or not. 

```
#iwconfig eth0

eth0      IEEE 802.11g  ESSID:"belkin54g"  Nickname:"belkin54g"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:11:50:19:AF:27   

          Bit Rate=54 Mb/s   Tx-Power=20 dBm   

          Retry limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=86/100  Signal level=-44 dBm  Noise level=-82 dBm

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

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

```

Such as this is the first ap that my card sees and when i run 

```
#iwconfig eth0 essid any
```

So it connects to it when I type any.

--sonik

----------

## biehl

Hi Peter,

It might not exactly be your hardware - but have a look at this 

http://gentoo-wiki.com/HARDWARE_ipw2100

- and especially at the links

http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup#Configuration_using_wpa_supplicant

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

https://forums.gentoo.org/viewtopic-p-2706430.html#2706430

Hope this helps

Anders

----------

## peter_poulsen

Thanks alot guys. I'm not entirely there yet, but I think I'm getting closer.

```
# cat /etc/conf.d/net                                                                                           

iface_eth0="dhcp"                                                                                                            

dhcpcd_eth0="-t 10 -h ${HOSTNAME} -DN"                                                                                       

                                                                                                                             

iface_eth1="dhcp"                                                                                                            

dhcpcd_eth1="-t 10 -N"                                                                                                       

                                                                                                                                                                                                                                                          

modules=( "wpa_supplicant" )                                                                                                 

iwconfig_eth1="mode managed"                                                                                                 

wpa_supplicant_eth1="-Dhostap"                                                                                               

wpa_timeout_eth1=60                        

```

```
# cat /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

eapol_version=1

ap_scan=1

fast_reauth=1

network={

        ssid="aau"

        key_mgmt=NONE

}

```

```
# /etc/init.d/net.eth1 start

 * Caching service dependencies ...                                                                                    [ ok ]

 * Starting eth1

 *   Running preup function

 *   Starting wpa_supplicant on eth1 ...

ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported

Failed to set encryption.

ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported

Failed to set encryption.

ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported

Failed to set encryption.

ioctl[PRISM2_IOCTL_HOSTAPD]: Operation not supported

Failed to set encryption.                                                                                              [ ok ]

```

```
# iwconfig 

lo        no wireless extensions.

eth0      no wireless extensions.

dummy0    no wireless extensions.

sit0      no wireless extensions.

eth1      IEEE 802.11-DS  ESSID:"AAU"  Nickname:"Prism  I"

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:02:8A:0E:37:05   

          Bit Rate:11 Mb/s   Tx-Power=15 dBm   Sensitivity:1/3  

          Retry min limit:8   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=20/92  Signal level=-98 dBm  Noise level=-143 dBm

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

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

```

```
# ifconfig 

eth0      Link encap:Ethernet  HWaddr 00:0F:1F:1C:3D:83  

          inet addr:192.168.195.158  Bcast:192.168.195.255  Mask:255.255.254.0

          inet6 addr: fe80::20f:1fff:fe1c:3d83/64 Scope:Link

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:11819 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1747 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:5185954 (4.9 Mb)  TX bytes:250293 (244.4 Kb)

          Interrupt:17 

eth1      Link encap:Ethernet  HWaddr 00:A0:C5:40:7A:0B  

          inet6 addr: fe80::2a0:c5ff:fe40:7a0b/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:667 errors:0 dropped:6 overruns:0 frame:0

          TX packets:10 errors:15 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:57893 (56.5 Kb)  TX bytes:1240 (1.2 Kb)

          Interrupt:3 Base address:0x100 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:84 errors:0 dropped:0 overruns:0 frame:0

          TX packets:84 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:5112 (4.9 Kb)  TX bytes:5112 (4.9 Kb)

```

Is everything alright now or what? I'm a little concerned about those messages I get when I start net.eth1.

----------

## lghman

Can you ping the other computers on the network or the internet?  If you can then you are connected. I dont know about the WPA warnings though. I havent really had the need to mess with WPA much as we use a VPN system here.

--sonik

----------

## biehl

hrm - don't know about the errors.

 *Quote:*   

> 
> 
> eth1      Link encap:Ethernet  HWaddr 00:A0:C5:40:7A:0B 
> 
>           inet6 addr: fe80::2a0:c5ff:fe40:7a0b/64 Scope:Link
> ...

 

Your eth1 seems to have an inet6 addr - is that correct? How did you get it? Is your accesspoint set up with DHCP? Have you run your dhcp client?

-Anders

----------

## peter_poulsen

I'm using DHCP to get my IP, at least that what I thank I'm (look at my /etc/conf.d/net).

No, I cannot ping any other computer  :Sad:   (I guess it is not working.)

I have found out that I'm supposed to get a IP4V address.

----------

## lghman

Well what happens if you manually run dhcp to get an ip?

```
#dhcpcd ethx
```

Does that work?

--sonik

----------

## peter_poulsen

When I do that I actually gets an IP (v4), but I cannot ping anything (not even the IP I just got for eth1)??

----------

## lghman

Since its starting to sound like a driver issue, I did some searching around on the net and found that others are using one of two drivers.  Some of the listings show it using the link-wlan-ng drivers and others show it using the orinoco.  I guess it would also depend on the release number of the card.  As I see a "B-100" and a "B120".  The B-100 uses the prism2 chipset, so either the linux-wlan-ng or the or the orinoco should work.  I would try and use the linux-wlan as this long stent with the orinoco doesnt seem to be helping much.

```

net-wireless/linux-wlan-ng

      Latest version available: 0.2.1_pre23

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 437 kB

      Homepage:    http://linux-wlan.org

      Description: The linux-wlan Project

      License:     MPL-1.1

```

I dont know about now, but I remeber back when I had a Prism chipset card that the driver issues got to be a little fun.  Make sure to take out the drivers for the Hermes in the kernel if you have hot/coldplug as otherwise they will load automatically.  Or if you have them in your modules.autoload take them out of there too.  Otherwise you could have some fun with drivers fighting each other.   :Smile: 

--sonik

----------

## peter_poulsen

Yes! Finally! At last! 

Installing linux-wlan-ng got it working (and the crowed goes wild)!

I will return with a more detail description of what I did (and more questions). I'm just so excited that I had to share it   :Very Happy: 

----------

## lghman

 *peter_poulsen wrote:*   

> Yes! Finally! At last! 
> 
> Installing linux-wlan-ng got it working (and the crowed goes wild)!
> 
> I will return with a more detail description of what I did (and more questions). I'm just so excited that I had to share it  

 

Good stuff man! Glad you got it to work finally.

--sonik

----------

## awesomescot

I am having similar problems getting a belkin card to work. I know i installed the right driver for it but i think its using the wrong one. the package that had the driver had a few others with it. I was wondering how do I tell it witch driver to use?

```
lsmod

Module                     Size   Used by

pcmf502re             108052  1

```

It's supposed to be using the pcmf502rd driver. 

Thanks

----------

## peter_poulsen

Well, I promised I would explain what I did to make it work. Here goes:

Kernel config:

In Device Drivers->Network support I enabled "Wireless LAN drivers (non-hamradio) & Wireless Extensions" and "PCMCIA network device support" but I did not select any of the devices.

In Bus options->PCCARD support->

```
<*> PCCard (PCMCIA/CardBus) support 

[ ]   Enable PCCARD debugging 

<*>   16-bit PCMCIA support 

[*]   32-bit CardBus support 

--- PC-card bridges 

<M> CardBus yenta-compatible bridge support 

...

```

yenta_socket was also added to /etc/modules.autoload.d/kernel-2.6

Package install:

The following packages are installed:

```
sys-apps/pcmcia-cs-3.2.8-r2

net-wireless/linux-wlan-ng-0.2.1-pre23

```

From /etc/conf.d/net

```
...

iface_wlan0="dhcp"

dhcpcd_wlan0="-t 10 -N"

...

```

From /etc/conf.d/wlan.conf

```
...

WLAN_DEVICES="wlan0"

...

SSID_wlan0="AAU"

ENABLE_wlan0=y

...

```

I copied /etc/conf.d/wlancfg-DEFAULT to /etc/conf.d/wlancfg-AAU

I think that was it. I did not modify /etc/conf.d/pcmcia nor /etc/conf.d/wireless

----------

