# Wireless, obtain ip address.

## Heverkuhn

Hi,

 I have a INPROCOMM IPN 2220 that I setup with ndiswrapper module.

I installed wicd, but It can not connected to my net because 

it can not obtain any IP address.

I tried using a static ip but then wicd can not contact the access point   :Evil or Very Mad:  .

Same problems with wifi-radar

if a try a manual configuration

```

iwconfig wlan0 essid FASTWEB-1-XXXX

iwconfig wlan0 key XXXXXXX

dhcpcd -HD wlan0

wlan0: dhcpcd 4.0.15 starting

wlan0: broadcasting for a lease

wlan0: offered 23.225.20.115 from 23.225.20.112

wlan0: acknowledged 23.225.20.115 from 23.225.20.112

wlan0: checking 23.225.20.115 is available on attached networks

wlan0: leased 23.225.20.115 for 1800 seconds

```

but It doesn t ping

```
 ping -c 3 www.google.com

ping: unknown host wwww.google.com

```

maybe this can be helpfull:

```
rc-update show

           alsasound | boot default                  

            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

                dbus |      default                  

                hald |      default                  

            hostname | boot                          

             keymaps | boot                          

               local |      default nonetwork        

          localmount | boot                          

             modules | boot                          

              net.lo | boot                          

            netmount |      default                  

           rmnologin | boot                          

                sshd |      default                  

           syslog-ng |      default                  

             urandom | boot                          

          vixie-cron |      default                  

                wicd |      default                  

                 xdm |      default    

```

I have no problem when I use a wired connection.

Do you have any ideas?

----------

## pianosaurus

 *Heverkuhn wrote:*   

> but It doesn t ping
> 
> ```
>  ping -c 3 www.google.com
> 
> ...

 

It is unable to resolve the domain name. First try pinging your dhcp server (23.225.20.112). If that works, you have communication at least. Then try pinging a google IP address.

```
$ resolveip www.google.com

IP address of www.google.com is 66.102.13.104

IP address of www.google.com is 66.102.13.105

IP address of www.google.com is 66.102.13.106

IP address of www.google.com is 66.102.13.147

IP address of www.google.com is 66.102.13.99

IP address of www.google.com is 66.102.13.103
```

----------

## d2_racing

Can you post this  :

```

# emerge --info

# cat /etc/init.d/wicd

```

----------

## Heverkuhn

 *d2_racing wrote:*   

> Can you post this  :
> 
> ```
> 
> # emerge --info
> ...

 

ok,

```
 

emerge --info

Portage 2.1.6.13 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 x86_64)

=================================================================

System uname: Linux-2.6.31-gentoo-r6-x86_64-Mobile_AMD_Athlon-tm-_64_Processor_3000+-with-gentoo-1.12.13

Timestamp of tree: Wed, 20 Jan 2010 12:00:01 +0000

app-shells/bash:     4.0_p35

dev-lang/python:     2.6.4

dev-util/cmake:      2.6.4-r3

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/X11/xkb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=k8 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="C"

LDFLAGS="-Wl,-O1"

LINGUAS="it en"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X acl alsa amd64 amd64codecs berkdb bzip2 cdr cli consolekit cracklib crypt cups cxx dbus dri dvd fortran fts3 gdbm gmplayer gnome gpm gtk hal iconv ipv6 mmx modules mudflap multilib ncurses ndiswrapper nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sqlite sse sse2 ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa radeon"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

and 

```

cat /etc/init.d/wicd

#!/sbin/runscript

# Copyright 1999-2006 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

opts="start stop restart"

WICD_DAEMON=/usr/sbin/wicd

WICD_PIDFILE=/var/run/wicd/wicd.pid

depend() {

   need dbus

}

start() {

   ebegin "Starting wicd daemon"

   "${WICD_DAEMON}" >/dev/null 2>&1

   eend $?

}

stop() {

   ebegin "Stopping wicd daemon"

   start-stop-daemon --stop --pidfile "${WICD_PIDFILE}"

   eend $?

}

```

I read  that this version of wicd has a bug that could be fixed, setting " after dbus" "after hal"

...but noway   :Crying or Very sad: 

pianosaurus,

yes...it seem that there is a problem with the domain server.

Indeed I can ping succesfully  66.102.13.104....

----------

## Heverkuhn

This is really strange:Now I can connect using iwconfig   :Shocked:  . I did not do anything more !

But this not resolved the problem with wicd or wifi radar 

 :Crying or Very sad: 

----------

## d2_racing

Replace that inside your /etc/init.d/wicd

```

depend() {

   need dbus

   need hald

} 
```

----------

## d2_racing

Also, run this :

```

# rc-update del wicd

# rc-update add wicd boot

```

And reboot your box.

----------

## Heverkuhn

d2_racing,

unfortunatly change /etc/init.d/wicd did not solve the problem:

I can connect manually but not with wicd.  :Confused: 

I dont now if it is related to this problem, but in the xsession-errors file

I found this string:

```
** (wicd-client.py:3424): CRITICAL **: draw_box: assertion `height >= -1' failed

Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1c0003a (Mozilla Fi)

Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.

```

----------

## d2_racing

Maybe the best is to remove wicd and reuse the old fashion method of having a working network card  :Razz: 

----------

## Heverkuhn

 *d2_racing wrote:*   

> Maybe the best is to remove wicd and reuse the old fashion method of having a working network card 

 

Yes, I think that is the better idea  :Smile: 

By the way I ask your help to configure /etc/conf.d/net in order to automatically connect to the wireless

 :Wink: 

My essid is, FASTWEB-1-00219629127C

the first question is how I have to write it in the /etc/conf.d/net.

I mean:

```

essid_wlan0="FASTWEB\-\1\-\00219629127C"

```

or maybe 

```

essid_wlan0="FASTWEB-1-00219629127C"

```

Anyway that s my /etc/conf.d/net:

```
config_eth0=( "dhcp" )

modules_wlan0=( "iwconfig" )

config_wlan0=( "dhcp" )

essid_wlan0="FASTWEB\-\1\-\00219629127C"

key_FASTWEB_1_00219629127C="s:*******  enc open"

channel_wlan0="6"

```

I think that I have to put wlan0 in rc boot.

But I noticed that /etc/init.d/wlan0

is not a link

```
 ls -l

-rwxr-xr-x 1 root root  2947 Dec 17 10:23 modules

lrwxrwxrwx 1 root root     6 Dec 30 19:12 net.eth0 -> net.lo

-rwxr-xr-x 1 root root 30689 Dec 17 10:23 net.lo

```

Have I to link wlan0 to net.lo too?

Thank you, and sorry for the trivial questions... :Smile: 

----------

## d2_racing

First,we will use wpa_supplicant instead of iwconfig.

```

# nano /etc/conf.d/net

```

```

config_eth0=( "dhcp" )

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

After that, run this :

```

# cd /etc/init.d

# ln -s net.lo net.wlan0

```

----------

## d2_racing

Now, edit this file :

```

# nano /etc/wpa_supplicant/wpa_supplicant.conf

```

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

    ssid="FASTWEB\-\1\-\00219629127C"

    key_mgmt=NONE

}

```

I see that you don't use any encryption.

So, try that :

```

# ifconfig -a

# iwconfig

# qlist -ICv wpa_supplicant

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

# dmesg | tail

# iwconfig

```

----------

## Heverkuhn

Thank you d2_racing for your precious help, as always   :Laughing: 

Actually I use WEP encryption

so I think that I have to add this

```

wep_key0="******"

```

correct?

----------

## d2_racing

If so, you need that one : 

```

ctrl_interface=/var/run/wpa_supplicant 

ctrl_interface_group=wheel 

ap_scan=0 

network={

  ssid="FASTWEB\-\1\-\00219629127C"

  key_mgmt=NONE

  # Keys in quotes are ASCII keys

  wep_key0="abcde"

  # Keys specified without quotes are hex keys

  wep_key1=0102030405

  wep_tx_keyidx=0

  priority=5

}

```

Can you retry  :Razz: 

----------

## Heverkuhn

It is a persecution:p : the net doesn t start at boot.

During the boot I read this two line:

```

cannot start netmount as net.lo could not start

```

and then that sshd could noy start...

I hope that this is not related to this bug

https://bugs.gentoo.org/show_bug.cgi?id=148751[url]

The strange thing is that the net works if i start it manually.

It is not so annoying to do it manually, 

but I thought that set up the wireless card would be easier  :Razz: 

...

----------

## d2_racing

Ok, post this :

```

# rc-update show

# cd /etc/init.d && ls -la

```

----------

## Heverkuhn

ok

```
rc-update show             

           alsasound | boot default                  

            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

                dbus |      default                  

                hald |      default                  

            hostname | boot                          

             keymaps | boot                          

               local |      default nonetwork        

          localmount | boot                          

             modules | boot                          

              net.lo | boot                          

            netmount |      default                  

           rmnologin | boot                          

                sshd |      default                  

           syslog-ng |      default                  

             urandom | boot                          

          vixie-cron |      default                  

                 xdm |      default

```

Yes I forgot to add wlan0 to boot.... I did it now

and 

```
ls- la

total 212

drwxr-xr-x  2 root root 4096 Jan 22 18:41 .

drwxr-xr-x 66 root root 4096 Jan 22 23:07 ..

-rwxr-xr-x  1 root root  818 Jan  6 02:18 acpid

-rwxr-xr-x  1 root root 6231 Jan 10 20:07 alsasound

-rwxr-xr-x  1 root root  533 Jan  8 01:06 atieventsd

-rwxr-xr-x  1 root root 1171 Jan 20 20:18 bluetooth

-rwxr-xr-x  1 root root 3614 Dec 17 10:23 bootmisc

-rwxr-xr-x  1 root root 1232 Dec 17 10:23 checkfs

-rwxr-xr-x  1 root root 3226 Dec 17 10:23 checkroot

-rwxr-xr-x  1 root root 3054 Dec 17 10:23 clock

-rwxr-xr-x  1 root root 1419 Dec 17 10:23 consolefont

-rwxr-xr-x  1 root root  586 Jan  8 01:07 consolekit

-rwxr-xr-x  1 root root 1729 Dec 17 10:21 crypto-loop

-rwxr-xr-x  1 root root  286 Jan  9 18:50 cupsd

-rwxr-xr-x  1 root root 1152 Dec 31 03:32 dbus

lrwxrwxrwx  1 root root   21 Dec 30 19:15 depscan.sh -> ../../sbin/depscan.sh

-rwxr-xr-x  1 root root  684 Jan 18 19:34 device-mapper

-rwxr-xr-x  1 root root 2421 Jan 19 22:04 dhcpd

-rwxr-xr-x  1 root root  736 Jan 19 22:04 dhcrelay

-rwxr-xr-x  1 root root  660 Dec 31 03:34 dmcrypt

-rwxr-xr-x  1 root root  536 Jan 18 19:34 dmeventd

lrwxrwxrwx  1 root root   23 Dec 30 19:15 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root  951 Dec 17 11:17 gpm

-rwxr-xr-x  1 root root 1187 Jan  8 01:09 hald

-rwxr-xr-x  1 root root 5606 Dec 17 10:23 halt.sh

-rwxr-xr-x  1 root root  433 Dec 17 10:23 hostname

-rwxr-xr-x  1 root root 1855 Dec 17 10:23 keymaps

-rwxr-xr-x  1 root root  620 Dec 17 10:23 local

-rwxr-xr-x  1 root root 2088 Dec 17 10:23 localmount

-rwxr-xr-x  1 root root  761 Jan 18 19:34 lvm

-rwxr-xr-x  1 root root 2947 Dec 17 10:23 modules

lrwxrwxrwx  1 root root    6 Dec 30 19:12 net.eth0 -> net.lo

-rwxr-xr-x  1 root root    0 Jan 21 21:50 net.lo

lrwxrwxrwx  1 root root    6 Jan 22 18:41 net.wlan0 -> net.lo

-rwxr-xr-x  1 root root 3307 Dec 17 10:23 netmount

-rwxr-xr-x  1 root root 1526 Jan 18 20:42 nscd

-rwxr-xr-x  1 root root  670 Dec 17 10:23 numlock

-rwxr-xr-x  1 root root 1871 Dec 31 03:30 pciparm

-rwxr-xr-x  1 root root  666 Jan 12 18:36 pydoc-2.6

-rwxr-xr-x  1 root root  304 Dec 17 09:08 reboot.sh

-rwxr-xr-x  1 root root  276 Dec 17 10:23 rmnologin

-rwxr-xr-x  1 root root  558 Dec 17 10:57 rsyncd

lrwxrwxrwx  1 root root   23 Dec 30 19:15 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root  385 Dec 17 09:08 shutdown.sh

-rwxr-xr-x  1 root root 2159 Jan  6 19:30 sshd

-rwxr-xr-x  1 root root 1882 Dec 31 01:35 syslog-ng

-rwxr-xr-x  1 root root 5803 Dec 17 12:37 udev

-rwxr-xr-x  1 root root 2585 Dec 17 12:37 udev-dev-tarball

-rwxr-xr-x  1 root root 2686 Dec 17 12:37 udev-mount

-rwxr-xr-x  1 root root  685 Dec 17 12:37 udev-postmount

-rwxr-xr-x  1 root root  942 Dec 17 10:23 urandom

-rwxr-xr-x  1 root root  530 Dec 31 01:37 vixie-cron

-rwxr-xr-x  1 root root  446 Jan 21 18:59 wicd

-rwxr-xr-x  1 root root 6515 Jan  6 02:36 xdm

```

 and 

```
 dmesg | tail

[  129.464890] ADDRCONF(NETDEV_UP): wlan0: link is not ready

```

and finally:

```
iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wlan0     IEEE 802.11g  ESSID:off/any  

          Mode:Managed  Channel:0  Access Point: Not-Associated   

          Bit Rate:1 Mb/s   Tx-Power:0 dBm   

          RTS thr:2347 B   Fragment thr:2346 B   

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

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

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

```

thanks

----------

## d2_racing

Ok, we will try that :

```

# ifconfig wlan0 up

# ifconfig -a

# dmesg | tail

# iwlist scan

# dmesg | tail

```

----------

## Heverkuhn

ok 

```
ifconfig wlan0 up && ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:0c:76:f7:c5:b6  

          BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:18 Base address:0xe800 

lo        Link encap:Local Loopback  

          LOOPBACK  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

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

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

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:11:09:9c:13:0b  

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:16 Memory:fbffe800-fbfff000 

```

and here the complete dmesg | tail

```

[   19.776349] pci 0000:01:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

[   19.838475] [drm] Initialized drm 1.1.0 20060810

[   19.874126] pci 0000:01:00.0: setting latency timer to 64

[   19.875756] [drm] Initialized radeon 1.31.0 20080528 for 0000:01:00.0 on minor 0

[   20.434164] [drm] Setting GART location based on new memory map

[   20.434551] [drm] Loading R400 Microcode

[   20.434584] [drm] Num pipes: 2

[   20.434592] [drm] writeback test succeeded in 1 usecs

[  105.315560] cc1 used greatest stack depth: 4352 bytes left

[  138.826266] ADDRCONF(NETDEV_UP): wlan0: link is not ready

```

scanning for wireless

```
iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

wlan0     Scan completed :

          Cell 01 - Address: 00:21:96:29:12:84

                    ESSID:"FASTWEB-1-00219629127C"

                    Protocol:IEEE 802.11g

                    Mode:Managed

                    Frequency:2.437 GHz (Channel 6)

                    Quality:75/100  Signal level:-48 dBm  Noise level:-96 dBm

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:bcn_int=100

                    Extra:atim=0

          Cell 02 - Address: 00:0C:F6:27:AB:31

                    ESSID:"Sitecom"

                    Protocol:IEEE 802.11g

                    Mode:Managed

                    Frequency:2.462 GHz (Channel 11)

                    Quality:35/100  Signal level:-73 dBm  Noise level:-96 dBm

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:bcn_int=100

                    Extra:atim=0

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

```

and then if i run dmesg | tail here, the result is the same I posted before.

Grazie  :Smile: 

----------

