# getting wlan0 with wep on boot

## SilentK

I can manually connect by doing the following commands:

```

tux conf.d # iwconfig wlan0 key <mywepkey>

tux conf.d # iwconfig wlan0 channel 6

tux conf.d # iwconfig wlan0 essid MorelloWEP

tux conf.d # dhcpcd -do wlan0

```

however when I boot it fails to connect.

here's my /et/conf.d/net file:

```

# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 $

modules=("iwconfig")

key_Network_MorelloWEP="s:<mywepkey>"

essid_wlan0="MorelloWEP"

config_wlan0="dhcpcd"

```

What am I doing wrong?

----------

## dgaffuri

 *SilentK wrote:*   

> 
> 
> ```
> tux conf.d # iwconfig wlan0 key <mywepkey>
> 
> ...

 

Here's what I see, but maybe are typos: first, it should be key_MorelloWep instead of key_Network_MorelloWep. Second, if you use an hex key (like it seems in manual command) you dont'have to use s:.

Hope this helps.

----------

## SilentK

Hmmm still no luck.

I am using ndiswrapper with a linksys WMP54GS.

here's the dmesg entry relating to ndiswrapper

```

ndiswrapper version 1.1 loaded (preempt=yes,smp=yes)

ndiswrapper: driver bcmwl5 (Linksys,02/19/2004, 3.50.21.11) loaded

ACPI: PCI Interrupt 0000:04:03.0[A] -> GSI 16 (level, low) -> IRQ 16

ndiswrapper: using irq 16

wlan0: ndiswrapper ethernet device 00:0f:66:6c:e4:da using driver bcmwl5, configuration file 14E4:4320:1737:0015.5.conf

wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP

```

Current /etc/conf.d/ file:

```

# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 $

modules=("iwconfig")

key_MorelloWEP="<mykey>"

essid_wlan0="MorelloWEP"

config_wlan0="dhcpcd"

```

Here's the entire dmesg log

```

Linux version 2.6.12-gentoo-r6 (root@tux) (gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)) #3 SMP Sun Oct 2 17:58:13 EST 2005

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001fe8cc00 (usable)

 BIOS-e820: 000000001fe8cc00 - 000000001fe8ec00 (ACPI NVS)

 BIOS-e820: 000000001fe8ec00 - 000000001fe90c00 (ACPI data)

 BIOS-e820: 000000001fe90c00 - 0000000020000000 (reserved)

 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)

 BIOS-e820: 00000000fec00000 - 00000000fed00400 (reserved)

 BIOS-e820: 00000000fed20000 - 00000000feda0000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved)

 BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)

510MB LOWMEM available.

found SMP MP-table at 000fe710

On node 0 totalpages: 130700

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 126604 pages, LIFO batch:31

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 DELL                                  ) @ 0x000fec00

ACPI: RSDT (v001 DELL    XPSGEN3 0x00000007 ASL  0x00000061) @ 0x000fccad

ACPI: FADT (v001 DELL    XPSGEN3 0x00000007 ASL  0x00000061) @ 0x000fcce9

ACPI: SSDT (v001   DELL    st_ex 0x00001000 MSFT 0x0100000d) @ 0xfffca2be

ACPI: MADT (v001 DELL    XPSGEN3 0x00000007 ASL  0x00000061) @ 0x000fcd5d

ACPI: BOOT (v001 DELL    XPSGEN3 0x00000007 ASL  0x00000061) @ 0x000fcdcf

ACPI: MCFG (v001 DELL    XPSGEN3 0x00000007 ASL  0x00000061) @ 0x000fcdf7

ACPI: HPET (v001 DELL    XPSGEN3 0x00000007 ASL  0x00000061) @ 0x000fce35

ACPI: DSDT (v001   DELL    dt_ex 0x00001000 MSFT 0x0100000d) @ 0x00000000

ACPI: Local APIC address 0xfee00000

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)

Processor #0 15:3 APIC version 20

ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)

Processor #1 15:3 APIC version 20

ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] disabled)

ACPI: LAPIC (acpi_id[0x04] lapic_id[0x07] disabled)

ACPI: LAPIC_NMI (acpi_id[0xff] high level lint[0x1])

ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0])

IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)

ACPI: IRQ0 used by override.

ACPI: IRQ2 used by override.

ACPI: IRQ9 used by override.

Enabling APIC mode:  Flat.  Using 1 I/O APICs

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 20000000 (gap: 20000000:c0000000)

Built 1 zonelists

Kernel command line: root=/dev/sda3

mapped APIC to ffffd000 (fee00000)

mapped IOAPIC to ffffc000 (fec00000)

Initializing CPU#0

PID hash table entries: 2048 (order: 11, 32768 bytes)

Detected 3192.840 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Memory: 512716k/522800k available (3031k kernel code, 9540k reserved, 1244k data, 240k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 6291.45 BogoMIPS (lpj=3145728)

Mount-cache hash table entries: 512

CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000 0000441d 00000000 00000000

CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000 0000441d 00000000 00000000

monitor/mwait feature present.

using mwait in idle threads.

CPU: Trace cache: 12K uops, L1 D cache: 16K

CPU: L2 cache: 1024K

CPU: Physical Processor ID: 0

CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080 0000441d 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU0: Intel P4/Xeon Extended MCE MSRs (12) available

CPU0: Thermal monitoring enabled

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

CPU0: Intel(R) Pentium(R) 4 CPU 3.20GHz stepping 04

Booting processor 1/1 eip 3000

Initializing CPU#1

Calibrating delay loop... 6373.37 BogoMIPS (lpj=3186688)

CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000 0000441d 00000000 00000000

CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000 0000441d 00000000 00000000

monitor/mwait feature present.

CPU: Trace cache: 12K uops, L1 D cache: 16K

CPU: L2 cache: 1024K

CPU: Physical Processor ID: 0

CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080 0000441d 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#1.

CPU1: Intel P4/Xeon Extended MCE MSRs (12) available

CPU1: Thermal monitoring enabled

CPU1: Intel(R) Pentium(R) 4 CPU 3.20GHz stepping 04

Total of 2 processors activated (12664.83 BogoMIPS).

ENABLING IO-APIC IRQs

..TIMER: vector=0x31 pin1=2 pin2=-1

checking TSC synchronization across 2 CPUs: passed.

Brought up 2 CPUs

CPU0 attaching sched-domain:

 domain 0: span 03

  groups: 01 02

  domain 1: span 03

   groups: 03

CPU1 attaching sched-domain:

 domain 0: span 03

  groups: 02 01

  domain 1: span 03

   groups: 03

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfb759, last bus=4

PCI: Using MMCONFIG

mtrr: v2.0 (20020519)

ACPI: Subsystem revision 20050309

ACPI: Interpreter enabled

ACPI: Using IOAPIC for interrupt routing

ACPI: PCI Root Bridge [PCI0] (0000:00)

PCI: Probing PCI hardware (bus 00)

PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1

Boot video device is 0000:01:00.0

PCI: Transparent bridge - 0000:00:1e.0

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI2._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI3._PRT]

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI4._PRT]

ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 15)

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 *10 11 12 15)

ACPI: PCI Interrupt Link [LNKC] (IRQs *3 4 5 6 7 9 10 11 12 15)

ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 *9 10 11 12 15)

ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 *5 6 7 9 10 11 12 15)

ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 *9 10 11 12 15)

ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 6 7 9 10 11 12 15)

ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 *10 11 12 15)

Linux Plug and Play Support v0.97 (c) Adam Belay

pnp: PnP ACPI init

pnp: PnP ACPI: found 12 devices

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Using ACPI for IRQ routing

PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report

pnp: 00:00: ioport range 0x800-0x85f could not be reserved

pnp: 00:00: ioport range 0xc00-0xc7f has been reserved

pnp: 00:00: ioport range 0x860-0x8ff has been reserved

Simple Boot Flag at 0x7a set to 0x1

Machine check exception polling timer started.

audit: initializing netlink socket (disabled)

audit(1128360185.785:0): initialized

inotify device minor=63

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

lp: driver loaded but no devices found

[drm] Initialized drm 1.0.0 20040925

vesafb: , ,  (OEM: ATI ATOMBIOS)

vesafb: VBE version: 3.0

vesafb: protected mode interface info at c000:b1f8

vesafb: pmi: set display start = c00cb286, set palette = c00cb2c6

vesafb: hardware supports DDC2 transfers

vesafb: monitor limits: vf = 85 Hz, hf = 82 kHz, clk = 140 MHz

vesafb: scrolling: redraw

vesafb: framebuffer at 0xd0000000, mapped to 0xe0880000, using 2560k, total 16384k

fb0: VESA VGA frame buffer device

ACPI: Power Button (FF) [PWRF]

PNP: PS/2 controller doesn't have AUX irq; using default 0xc

PNP: PS/2 Controller [PNP0303:KBD] at 0x60,0x64 irq 112

serio: i8042 AUX port at 0x60,0x64 irq 12

serio: i8042 KBD port at 0x60,0x64 irq 1

Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

parport: PnPBIOS parport detected.

parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP(,...)]

lp0: using parport0 (interrupt-driven).

mice: PS/2 mouse device common for all mice

io scheduler noop registered

io scheduler anticipatory registered

io scheduler deadline registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

ICH6: IDE controller at PCI slot 0000:00:1f.1

ACPI: PCI Interrupt 0000:00:1f.1[A] -> GSI 16 (level, low) -> IRQ 16

ICH6: chipset revision 3

ICH6: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio

Probing IDE interface ide0...

input: AT Translated Set 2 keyboard on isa0060/serio0

input: PS/2 Generic Mouse on isa0060/serio1

hda: Philips DVD+RW DVD8601, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

Probing IDE interface ide1...

Probing IDE interface ide2...

Probing IDE interface ide3...

Probing IDE interface ide4...

Probing IDE interface ide5...

hda: ATAPI 40X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

libata version 1.11 loaded.

ata_piix version 1.03

ACPI: PCI Interrupt 0000:00:1f.2[C] -> GSI 20 (level, low) -> IRQ 20

PCI: Setting latency timer of device 0000:00:1f.2 to 64

ata1: SATA max UDMA/133 cmd 0xFE00 ctl 0xFE12 bmdma 0xFEA0 irq 20

ata2: SATA max UDMA/133 cmd 0xFE20 ctl 0xFE32 bmdma 0xFEA8 irq 20

ata1: dev 0 cfg 49:2f00 82:7869 83:7f09 84:4633 85:7869 86:3e01 87:4623 88:203f

ata1: dev 0 ATA, max UDMA/100, 195371568 sectors: lba48

ata1: dev 0 configured for UDMA/100

scsi0 : ata_piix

ata2: dev 0 cfg 49:2f00 82:3469 83:5b01 84:4003 85:3469 86:1a01 87:4003 88:207f

ata2: dev 0 ATA, max UDMA/133, 156250000 sectors:

ata2: dev 0 configured for UDMA/133

scsi1 : ata_piix

  Vendor: ATA       Model: Maxtor 6L100M0    Rev: BANC

  Type:   Direct-Access                      ANSI SCSI revision: 05

  Vendor: ATA       Model: WDC WD800JD-75HK  Rev: 14.0

  Type:   Direct-Access                      ANSI SCSI revision: 05

SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)

SCSI device sda: drive cache: write back

SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)

SCSI device sda: drive cache: write back

 sda: sda1 sda2 sda3

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

SCSI device sdb: 156250000 512-byte hdwr sectors (80000 MB)

SCSI device sdb: drive cache: write back

SCSI device sdb: 156250000 512-byte hdwr sectors (80000 MB)

SCSI device sdb: drive cache: write back

 sdb: sdb1

Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0,  type 0

ohci1394: $Rev: 1250 $ Ben Collins <bcollins@debian.org>

ACPI: PCI Interrupt 0000:04:01.2[B] -> GSI 18 (level, low) -> IRQ 18

ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[18]  MMIO=[dfaf5000-dfaf57ff]  Max Packet=[2048]

ACPI: PCI Interrupt 0000:04:07.0[A] -> GSI 19 (level, low) -> IRQ 19

ohci1394: fw-host1: OHCI-1394 1.1 (PCI): IRQ=[19]  MMIO=[dfaf5800-dfaf5fff]  Max Packet=[2048]

ieee1394: raw1394: /dev/raw1394 device initialized

usbmon: debugs is not available

ACPI: PCI Interrupt 0000:00:1d.7[A] -> GSI 21 (level, low) -> IRQ 21

PCI: Setting latency timer of device 0000:00:1d.7 to 64

ehci_hcd 0000:00:1d.7: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller

ehci_hcd 0000:00:1d.7: debug port 1

ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:1d.7: irq 21, io mem 0xffa80800

PCI: cache line size of 128 is not supported by device 0000:00:1d.7

ehci_hcd 0000:00:1d.7: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 8 ports detected

USB Universal Host Controller Interface driver v2.2

ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 21 (level, low) -> IRQ 21

PCI: Setting latency timer of device 0000:00:1d.0 to 64

uhci_hcd 0000:00:1d.0: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1

uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2

uhci_hcd 0000:00:1d.0: irq 21, io base 0x0000ff80

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 22 (level, low) -> IRQ 22

PCI: Setting latency timer of device 0000:00:1d.1 to 64

uhci_hcd 0000:00:1d.1: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2

uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3

uhci_hcd 0000:00:1d.1: irq 22, io base 0x0000ff60

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 18

PCI: Setting latency timer of device 0000:00:1d.2 to 64

uhci_hcd 0000:00:1d.2: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3

uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4

uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ff40

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 23 (level, low) -> IRQ 23

PCI: Setting latency timer of device 0000:00:1d.3 to 64

uhci_hcd 0000:00:1d.3: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4

uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5

uhci_hcd 0000:00:1d.3: irq 23, io base 0x0000ff20

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 2 ports detected

usb 3-1: new low speed USB device using uhci_hcd and address 2

usbcore: registered new driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

input: USB HID v1.10 Mouse [Logitech Optical USB Mouse] on usb-0000:00:1d.1-1

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.01:USB HID core driver

Advanced Linux Sound Architecture Driver Version 1.0.9rc2  (Thu Mar 24 10:33:39 2005 UTC).

ACPI: PCI Interrupt 0000:04:01.0[A] -> GSI 17 (level, low) -> IRQ 17

Installing spdif_bug patch: Audigy 1 or 2 [Unknown]

ALSA device list:

  #0: Audigy 1 or 2 [Unknown] (rev.4, serial:0x10031102) at 0xccc0, irq 17

oprofile: using NMI interrupt.

NET: Registered protocol family 2

IP: routing cache hash table of 2048 buckets, 32Kbytes

TCP established hash table entries: 16384 (order: 6, 262144 bytes)

TCP bind hash table entries: 16384 (order: 5, 196608 bytes)

TCP: Hash tables configured (established 16384 bind 16384)

ip_conntrack version 2.1 (4084 buckets, 32672 max) - 220 bytes per conntrack

ip_tables: (C) 2000-2002 Netfilter core team

ipt_recent v0.3.1: Stephen Frost <sfrost@snowman.net>.  http://snowman.net/projects/ipt_recent/

arp_tables: (C) 2002 David S. Miller

NET: Registered protocol family 1

NET: Registered protocol family 17

Starting balanced_irq

ACPI wakeup devices:

VBTN PCI0 PCI1 PCI2 PCI3 PCI4  KBD USB0 USB1 USB2 USB3

ACPI: (supports S0 S1 S3 S4 S5)

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Freeing unused kernel memory: 240k freed

ieee1394: Host added: ID:BUS[0-00:1023]  GUID[00023c04110683b9]

ieee1394: Host added: ID:BUS[1-00:1023]  GUID[801111006f7f3200]

Adding 1004052k swap on /dev/sda2.  Priority:-1 extents:1

EXT3 FS on sda3, internal journal

ndiswrapper version 1.1 loaded (preempt=yes,smp=yes)

ndiswrapper: driver bcmwl5 (Linksys,02/19/2004, 3.50.21.11) loaded

ACPI: PCI Interrupt 0000:04:03.0[A] -> GSI 16 (level, low) -> IRQ 16

ndiswrapper: using irq 16

wlan0: ndiswrapper ethernet device 00:0f:66:6c:e4:da using driver bcmwl5, configuration file 14E4:4320:1737:0015.5.conf

wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP

```

Any ideas on why it's not working?

----------

## dgaffuri

 *SilentK wrote:*   

> 
> 
> ```
> modules=("iwconfig")
> 
> ...

 

Just comparing with mine. First line is not needed (but should not harm), second one looks like config_wlan0="dhcp", and not dhcpcd.

----------

## SilentK

Hmm still not working.

```

# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 $

key_MorelloWEP="<mywepkey>"

essid_wlan0="MorelloWEP"

config_wlan0="dhcp"

```

are there any other files I need to edit?

----------

## SilentK

The only thing that I can think of is that I am not setting the channel. How would I do that?

Also is there a boot error log I can look at that's more detailed then the message it gives me while it boots? (failed to configure wirelessnetwork for wlan0 (something like that.))?

----------

## VinzC

In /etc/conf.d/wireless add

```
preferred_aps=( "MorelloWEP" )
```

----------

## SilentK

Hmmm still getting "Failed to configure wireless on Wlan0" on boot.

/etc/conf.d/net:

```

preferred_aps=( "MorelloWEP" )

key_MorelloWEP="<mykey>"

essid_wlan0="MorelloWEP"

config_wlan0="dhcp"

```

/etc/conf.d/wireless:

```

preferred_aps=( "MorelloWEP" )

key_MorelloWEP="<mykey>"

essid_wlan0="MorelloWEP"

config_wlan0="dhcp"

```

----------

## VinzC

Well, you should leave only one occurrence of each statement. Keep wireless configuration in /etc/conf.d/wireless and wired lan configuration in /etc/conf.d/net.

Note I also found myself with such a weirdness. Can you at least activate and connect by running the following command?

```
/etc/init.d/net.wlan0 start
```

This assumes you have also symlinked net.lo in /etc/init.d 

```
ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0
```

Also what package (firmware) have you installed for your wireless lan: ipw2200, acx100 or something else?

----------

## SilentK

I can run it, but it's not successful.

```

/etc/init.d/net.wlan0 start

: command not foundne 5:

 * Starting wlan0

 *   Configuring wireless network for wlan0

 *   Failed to configure wireless for wlan0                               [ !! ]

```

Not sure what firmware here's the last part of my dmesg

```

ndiswrapper version 1.1 loaded (preempt=yes,smp=yes)

ndiswrapper: driver bcmwl5 (Linksys,02/19/2004, 3.50.21.11) loaded

ACPI: PCI Interrupt 0000:04:03.0[A] -> GSI 16 (level, low) -> IRQ 16

ndiswrapper: using irq 16

wlan0: ndiswrapper ethernet device 00:0f:66:6c:e4:da using driver bcmwl5, configuration file 14E4:4320:1737:0015.5.conf

wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP

ndiswrapper (add_wep_key:644): adding encryption key 1 failed (C0010015)

```

```

ndiswrapper (add_wep_key:644): adding encryption key 1 failed (C0010015)

```

that line peaks my interest don't remember seeing that before.

----------

## VinzC

What peeks my interrest more is that

```
: command not foundne 5:
```

especially the "ne"... There must be something wrong in the init script. And I'm almost sure the error you see in the log wouldn't appear if the script ran fine.

Try running the instructions as they appear in the script (might be a long study) but this is how I make my way when I have such a problem, difficult to solve. Last thing: your WEP key should be in the form "s:IofHGhju76...hJy/9" or "ABCFED46FD29...349DD".

----------

## SilentK

Hmmm it could take sometime there's quite a few control structures in there.

Is it possible to replace their code and just stick

iwconfig wlan0 key 

and so on in that file?

----------

## VinzC

The best place is /etc/conf.d/local.start. Just remove net.wlan0 from any runlevels. Or you could also unlink /etc/init.d/net.wlan0 and create a script of the same name with the instructions you mentionned.

----------

## VinzC

Just in case you edit your files with nano. I once noticed strange things happen with scripts I wrote. I got error messages like "bad interpreter" of something like that. In fact my script was saved under MSDOS charset - I had accidentally pressed Ctrl+D (or was it ESC-D?) before saving. It is indicated in nano when you save your file: there is a status message "[DOS format]". Maybe you should check as well your configuration file as it is source'd before the init script runs.

----------

