# Trying to get my wireless card working with NetworkManager

## kahlil88

I just got my Airlink AWLH5025 to connect using the instructions provided by Gentoo Wiki's article on Wireless Networking. I'd like to use NetworkManager, but I'm running into problems - launching it kills my connection, and even though it finds my network it won't connect to it.

----------

## m_gustafsson

Have you removed net.eth0 from your runlevels?

Could you post: 

```
# rc-update show
```

----------

## kahlil88

 *m_gustafsson wrote:*   

> Have you removed net.eth0 from your runlevels?

 

Yes, and I also removed net.wlan0

 *Quote:*   

> mount-ro | shutdown
> 
> ntpd | default
> 
> net.lo | boot
> ...

 

----------

## m_gustafsson

Ok...

So, here is how I got it up and running a while ago:

```
# rc-update add NetworkManager default

# rc-update add dhcdbd default
```

Edited /etc/dhcp/dhclient.conf to like this (the name of your computer should be here),

```
send host-name "YOUR_HOSTNAME";

supersede host-name "YOUR_HOSTNAME"
```

```
# rc-update del net.eth0
```

Edited /etc/init.d/NetworkManagerDispatcher

```
# cat /etc/init.d/NetworkManagerDispatcher

#!/sbin/runscript

# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>

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

# $Header: $

prefix=/usr

exec_prefix=/usr

sbindir=${exec_prefix}/sbin

NETWORKMANAGERDISPATCHER_BIN=${sbindir}/NetworkManagerDispatcher

# Sanity checks.

[ -x $NETWORKMANAGERDISPATCHER_BIN ] || exit 0

# so we can rearrange this easily

processname=$NETWORKMANAGERDISPATCHER_BIN

pidfile=/var/run/NetworkManagerDispatcher.pid

depend() {

   need NetworkManager

}

start() {

   ebegin "Starting NetworkManagerDispatcher"

   start-stop-daemon --start --quiet --pidfile /var/run/NetworkManagerDispatcher.pid --exec /usr/sbin/NetworkManagerDispatcher

   eend $?

}

stop()

{

   local retval

   ebegin "Stopping NetworkManagerDispatcher"

   start-stop-daemon --stop --quiet --pidfile /var/run/NetworkManagerDispatcher.pid

   retval=$?

   eend ${retval}

   [ -e /var/run/NetworkManagerDispatcher.pid ] && rm -f /var/run/NetworkManagerDispatcher.pid

   return ${retval}

}

# vim: set ft=gentoo-init-d ts=3 sw=3 et:
```

```
# rc-update add NetworkManagerDispatcher default

 * NetworkManagerDispatcher added to runlevel default
```

Added the script /etc/NetworkManager/dispatcher.d/50-ntp-client and made it executable:

```
# cat /etc/NetworkManager/dispatcher.d/50-ntp-client 

#!/bin/bash

/etc/init.d/ntp-client status | grep -q "started"

if test "$2" == "up" -a "$?" != "0" ; then

        rc-config start ntp-client

else

        rc-config stop ntp-client

fi
```

I think that I in principle followed a guide similar to this one:

http://wiki.msiwind.net/index.php/Gentoo_NetworkManager

Have you walked through the same steps?

----------

## kahlil88

I followed a different article that seems to have a few less steps, but is more or less the same otherwise. I start running into problems when I try to restart dbus - it hangs forever saying "hald: waiting for xdm" until I press Ctrl+C to cancel it.

----------

## m_gustafsson

Strange. Here is what it looks like when I restart dbus (I use GDM though):

```
# /etc/init.d/dbus restart

 * Service dbus stopping

 * Service dhcdbd stopping

 * Service hald stopping

 * Service NetworkManager stopping

 * Service NetworkManagerDispatcher stopping

 * Service NetworkManagerDispatcher stopped

 * Service NetworkManager stopped

 * Service hald stopped

 * Service dhcdbd stopped

 * Service dbus stopped

 * Service dbus starting

 * Service dbus started

 * Service NetworkManagerDispatcher starting

 * Service dhcdbd starting

 * Service NetworkManager starting

 * Service hald starting

 * Service dhcdbd started

 * Service hald started

 * Service NetworkManager started

 * Service NetworkManagerDispatcher started
```

----------

## kahlil88

My system is configured to automatically log me in, but GDM comes up when I log out.

----------

## m_gustafsson

I am sorry, but I think this is a bit out of my competence area...

Have you seen anything strange in your /var/log/syslog when it comes to dbus or hal?

----------

## kahlil88

I re-installed my system from scratch, and now I can get nm-applet to run. The drivers and firmware for my wireless card are installed but it says "device not ready" and doesn't display any wireless networks.

----------

## linbox

I installed Networkmanger 0.7.1 and KDE4.2.3

When I follow the configuration of Networkmanager I get stuck when I try to add 

NetworkManagerDispatcher to the startup

rc-update add NetworkManagerDispatcher default

the script /etc/init.d/NetworkManagerDispatcher does not exist on my system. What package includes this script?

Thanks for any hint

----------

## linbox

I searched more around the internet and I found wicd It does what I need it todo and I got it up and going in 5 minutes.

Just emerge wicd

rc-update del net.net0

rc-update del net.wlan0

rc-update add wicd default

run wicd-client -u

done 

PS it also asked someting about /etc/conf.d/rc,but it was already done on my PC

great so far

thanks for the help

----------

## kahlil88

I re-emerged wpa_supplicant and wireless-tools and managed to get online once by restarting /etc/init.d/net.wlan0, but NetworkManager still says "device not ready" even though I'm connected to a network.

----------

## okiniko

I was having this same issue. The solution for me was to re-emerge dbus after installing nm-applet. That was about it.

----------

## kahlil88

 *okiniko wrote:*   

> I was having this same issue. The solution for me was to re-emerge dbus after installing nm-applet. That was about it.

 After re-emerging dbus, I can now see the available networks, but I can't actually connect to any of them.

----------

## marlgl

 *okiniko wrote:*   

> I was having this same issue. The solution for me was to re-emerge dbus after installing nm-applet. That was about it.

 

my wireless okay after re-emerge dbus

----------

