# bringing up my wireless device failed :(

## jeanluca

Hi All

I just configured my /etc/conf.d/wireless. Off course I'm not really sure if I did it correct. A few thing I'm not sure about. Is the encrytion key specified via:

   key_MyAPName="s:12345667899"

Set it to dhcp:

   config_ESSID=( "dhcp" )

But when I try to start it (/etc/init.d/net.eth1 start) it failes. here is my dmesg (shrinked) :

```
codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

.........

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_semaphore: semaphore is not ready [0x1][0x700300]

intel8x0_measure_ac97_clock: measured 49370 usecs

intel8x0: clocking to 48000

mtrr: base(0xf0020000) is not aligned on a size(0x180000) boundary

eth0: link down

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1

codec_semaphore: semaphore is not ready [0x1][0x700300]

codec_write 0: semaphore is not ready for register 0x2c

ipw2200: Fatal error

ipw2200: Start IPW Error Log Dump:

ipw2200: Status: 0x00000100, Config: 00000142

ipw2200: ERROR_NMI_INTERRUPT -869641292 0x000003b4  0x00000000  0x0000022c  0x0000021c  0x00000000

ipw2200: ERROR_DMA_STATUS -869641288 0x000279b0  0x00027b50  0x01540002  0x00000000  0x00000000

ipw2200: ERROR_DMA_STATUS -869641285 0x00028400  0x000285a0  0x00540001  0x00000000  0x00000001

ipw2200: ERROR_DMA_STATUS -869641281 0x00028000  0x00028220  0x00540000  0x9c6a4200  0x00000002

ipw2200: ERROR_DMA_STATUS -869641277 0x00400000  0x00408000  0x30408200  0x00000086  0x00000003

ipw2200: Start IPW Event Log Dump:

ipw2200: -870133741     0x0000020a      93

ipw2200: -870133738     0x0000054d      183

ipw2200: -870133731     0x00000009      184

ipw2200: -870133727     0x00000450      189

ipw2200: -870133724     0x00000000      189

ipw2200: -870235728     0x00000061      274

......

ipw2200: -870235719     0x00000169      288

ipw2200: -870235715     0x000001c4      117
```

I'm not sure if this has anything to do with my wlan. When I try to start my wlan and  I do a tail -f /var/log/messages I get 

```
Jan 10 17:06:38 leppie eth1: decryption failed (SA=00:0a:e9:02:ef:a5) res=-2

Jan 10 17:06:38 leppie eth1: WEP decryption failed ICV mismatch (key 0)

Jan 10 17:06:38 leppie eth1: decryption failed (SA=00:0a:e9:02:ef:a5) res=-2

Jan 10 17:06:38 leppie eth1: WEP decryption failed ICV mismatch (key 0)

Jan 10 17:06:39 leppie eth1: decryption failed (SA=00:0a:e9:02:ef:a5) res=-2

Jan 10 17:06:39 leppie eth1: WEP decryption failed ICV mismatch (key 0)

Jan 10 17:06:40 leppie eth1: decryption failed (SA=00:0a:e9:02:ef:a5) res=-2

Jan 10 17:06:40 leppie eth1: WEP decryption failed ICV mismatch (key 0)

Jan 10 17:06:42 leppie eth1: decryption failed (SA=00:0a:e9:02:ef:a5) res=-2

Jan 10 17:06:42 leppie eth1: WEP decryption failed ICV mismatch (key 0)

```

Last edited by jeanluca on Sun Jan 09, 2005 4:20 pm; edited 1 time in total

----------

## Ferdy

You have to configure it properly, what you wrote is horribly bad  :Razz:  Take a look at the documentation

Cheers,

Ferdy

----------

## jeanluca

Ok, I've changed some stuff (still not working thou):

```

      essid_eth1="myAPName"

       key_myAPName="s:passkey"

       key_ESSID1="s:myEncryptionKey enc open"

       preferred_aps=( "ESSID1" )

       channel_eth1="6"
```

When I do net.eth1 start it displays:

```

     * Starting eth1

     *    Configuring wireless network for eth1

     *       eth1 connected to "AP7XR" at 00:0A:E9:02:EF:A5

     *       in managed mode (WEP enabled - open)

     *    Bringing up eth1

     *       dhcp

     *          Running dhcpcd ...
```

But the last line fails. Now messages gives:

```

Jan 10 17:20:19 leppie dhcpcd[977]: timed out waiting for a valid DHCP server response

Jan 10 17:22:44 leppie dhcpcd[1456]: timed out waiting for a valid DHCP server response
```

----------

## jeanluca

Hi Again, I've emerged dhcpcd (with ACCEPT_KEYWORDS="~x86". The result, no new lines in /var/log/messages, but this is the result:

```

 * Starting eth1

 *    Configuring wireless network for eth1

 *    Failed to configure wireless for eth1                               [ !! ]
```

Luca

----------

## UberLord

 *jeanluca wrote:*   

> Ok, I've changed some stuff (still not working thou):
> 
> ```
> 
>       essid_eth1="myAPName"
> ...

 

Maybe it would be simpler if I removed lots of documentation.........

```

key_myAPName="s:passkey"

preferred_aps=( "myAPName" )

```

That's all you need ....

----------

## luca

And what about the encryption key?

If I look inside wireless.examle, I see:

# key_ESSID1="s:yourkeyhere enc open"

# key_ESSID1="s:yourothrkey enc open"

# preferred_aps( "ESSID1" "ESSID2" )

So your answer is a little bit confusing!

Luca

----------

## UberLord

Well, if you can write better documentation, be my guest.

The example defines two ESSID's to connect to and keys for them both - most people only need one but I thought showing two would be better as some people (like me) connect to more than one on a regular basis.

----------

## unix

is your module (ipw2200) working?

----------

## luca

Yep, my ipw2200 is working. If I do iwlist eth1 scanning, it detects all available wireless networks. Something that doesn't work is a light on my laptop that indicats wireless activity (which works on windows XP) 

So I think I'm almost there. What is the difference between

```
      key_myAPName="s:passkey"
```

and

```
      key_myAPName="s:123456 enc open"
```

So,  for now my configuration looks like:

```
       essid_eth1="myAPName"

       key_myAPName="s:passkey"                  

       key_myAPName="s:123456 enc open"     

       preferred_aps=( "myAPName" )

       channel_eth1="6"
```

(channel 6 showed up when I did iwlist)

And about writing better documentation, I just keep my documentation for myself!! which doesn't mean I don't share my knowledge with others !!

Luca

----------

## UberLord

 *luca wrote:*   

> 
> 
> So I think I'm almost there. What is the difference between
> 
> ```
> ...

 

The first one sets the wep key to ascii "passkey"

The second sets the wep key to ascii "123456" and sets the encryption type to open (which is regarded as more secure than restricted)

 *Quote:*   

> 
> 
> So,  for now my configuration looks like:
> 
> ```
> ...

 

Don't specify key_myAPName twice as the last one overwrites the first one

You don't need to set channel unless you're in ad-hoc or master mode

----------

## luca

So I removed from my /etc/conf.d/wireless the following two lines:

```
   eth1_myAPName="s:passkey"

   channel_eth1="6"
```

But when I try to connect it tells me that it fails to configure....

Today I'll do one more test with three different encryptographic options,

```
   Cryptographic API

   <M>   ARC4 cipher algorithm    # this was the only one so far

   <M>   Michael MIC keyed digest algorithm

   <M>   CRC32c CRC algorithm
```

But anyway I guess I need some advanced options.......

Before asking any questions about configuration options, I like to read some wireless tutorial or something like that.

Can someone tell me where I can find very good documentation?

The only thing I've now for documentation is that wireless file!

Luca

----------

## jeanluca

I've some extra information, it seems that I needed CRC32c for wireless internet.

Furthermore, here is the output from iwlist eth1 scanning

```
eth1      Scan completed :

          Cell 01 - Address: 00:0A:E9:02:EF:A5

                    ESSID:"AP7XR"

                    Protocol:IEEE 802.11b

                    Mode:Master

                    Channel:6

                    Encryption key:on

                    Bit Rate:11 Mb/s

                    Extra: Rates (Mb/s): 1 2 5.5 11

                    Extra: RSSI: -33  dBm

                    Extra: Last beacon: 2ms ago
```

Something tells me that I need the master mode!!

But if I add the following two lines to my /etc/conf.d/wireless

```
mode_eth1="Master"

channel_eth1="6"
```

Here is the result when I bring it up (/etc/init.d/net.eth1 start):

```
 * Starting eth1

 *    Configuring wireless network for eth1

 *    eth1 does not support setting the mode to "master"

 *    Failed to configure wireless for eth1                               [ !! ]
```

How do I get this master mode support ???

Luca

----------

## UberLord

No, that means that the AP is in master mode

You should be able to connect in Managed mode - and you don't need to specify the channel

----------

## luca

Hmm that didn't work too. 

And I was thinking a was so close after I notice iwlist worked!!

I think I need documentation about modes, keys, AP's etc.

Can someone give me a link so somewhere ???

Luca

ps don't worry, I'll never quit.....this wireless thing WILL work!

----------

## nenn

why not try some simple bash scripts i have the same wifi card as you do, i hate it so much ;p

heres the script im using to connect at home 

```

#!/bin/sh

echo " * Resetting eth1..."

modprobe -r ipw2200

modprobe ipw2200

echo " * Done..."

echo " * Setting essid to \"04Z409074603\"..."

iwconfig eth1 essid "04Z409074603"

echo " * Done..."

echo " * Deleting old IP..."

rm /var/run/dhcpcd-eth1.pid

echo " * Done..."

echo " * Pulling an IP..."

dhcpcd eth1

echo " * Done"

echo " * All processes completed"

```

having one of these in  /usr/bin/ is quite handy for different locations i usually go to ie: work, school.

so just edit it to your liking and the syntax for setting a WEP key is... 

iwconfig eth1 key xxxxxxxxx restricted (correct me if im wrong, i dont use wep keys and i just took this off the man page)

so having a little script like that is quite handy  :Very Happy: 

also note if you want to use wep encryption modprobe ieee80211_crypt_wep

 :Smile:  hope this helps a bit

----------

## jeanluca

Tried your script, didn't work. First of all it couldn't remove anything, and second of all it still looks like its using the /etc/conf.d/wireless file. 

But there is also good news, I've been able to use my wireless internet for a non-encrypted network. So the whole problem is the encryption.....

So I was thinking, shouldn't I specify the bit length of the encryption. I know the AP is configured  for an bit size of 128, so how can do I tell this to  my wireless device??

Luca

----------

## luca

it is solved!

If I change 

   eth1_myAPName="s:passkey enc open" 

to

eth1_myAPName="passkey enc open"

it works fine. Something with hax and string keys!!

Luca

----------

## maxpayne

hi,

i have no etc/conf.d/wireless - any idea?

----------

## jeanluca

Yes, try to emerge baselayout

----------

## maxpayne

```
[ebuild   R   ] sys-apps/baselayout-1.9.4-r6  -bootstrap -build -debug -livecd (-selinux) -static (-uclibc) 197 kB

```

----------

## jeanluca

thats an old version of baselayout! Try first to update your portage. I have baslayout version 1.11.9-r1

Luca

----------

