LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Thinkpad T400 Wireless (https://www.linuxquestions.org/questions/slackware-14/thinkpad-t400-wireless-4175468729/)

Woodsman 07-06-2013 07:32 PM

Thinkpad T400 Wireless
 
I bought a refurbished Thinkpad T400. This is my first laptop and first wireless device. :)

I am unable to get wireless to function. Problems likely are between my ears because I always have used static IP addresses in my home LAN and never before used NetworkManager or wireless.

In the beginning I configured rc.inet1.conf with the usual static IP address. No problems with a wired connection. I used only rc.inet1.conf for several days while I installed and tweaked Slackware 14.0.

Next I enabled rc.networkmanager, configured for a manual wired connection using the same static IP address as rc.inet1.conf.

NetworkManager always overwrites /etc/resolv.conf with an empty file. I found two clunky work-arounds: 1) a script (https://bbs.archlinux.org/viewtopic.php?id=45394) and 2) chattr +i. Yet I still had no problem connecting wired.

Next the great chasm, wireless.

The router is a Linksys WRT54GL 1.1. I'm using DD-WRT v24 preSP2. I have been using the router and DD-WRT for several years. I enabled the router wireless radio.

Nothing I did allowed me to ping when I pulled the cable and used only wireless, despite popup dialogs that the connection was established.

Help appreciated. I haven't been this confused in a long time. Please start with the basics. :banghead:

Thanks. :)

yooy 07-06-2013 07:35 PM

are you sure you need to go Arch way? ubuntu should be easier on that task.

4 ways to get wifi working on linux

Woodsman 07-06-2013 07:52 PM

Thanks but I have no idea what you're talking about. This is the Slackware forum. :)

sycamorex 07-06-2013 07:59 PM

Perhaps you should revert rc.inet1.conf (and any other network configuration files) to their original states and let networkmanager or wicd do their jobs. Might there be some clashes? I might be wrong but I think you're overcomplicating things a bit. I've actually never used NetworkManager but have been using wicd for both wired and wireless connections for a long time. As long as the network card is detected, it should be as easy as this:

Code:

# installpkg ./path/to/wicd-....txz (from /extra)
# wicd
$ wicd-client

At this point a GUI program will pop up where you'll be able to choose your wifi network (edit the settings) and connect to it.

That's all I always do after installing a fresh Slackware system.

HTH.

On a separate note, make sure you've got the correct settings for DNS/Gateway etc.

Z038 07-06-2013 08:08 PM

You can issue "iwconfig" to list the wireless interfaces on your laptop.

Then try "iwlist <interface> scanning" to make sure your laptop wireless NIC is able to pick up your router's broadcast. For example, "iwlist eth1 scanning", if eth1 is your wireless interface. If you get nothing from iwlist, then check to make sure the laptop wireless radio is turned on. There's usually a hard switch or a special function key soft switch to toggle it on or off.

Make sure you have an active dhcp server somewhere on your network, probably on your router.

Verify your router's wireless access point is enabled and configured with an ssid and security keys (preferably wpa2).

There's more than one way to configure your wireless setup. Here is how I do it:

Turn off networkmanager and/or wicd. (I don't use them, so I don't know anything about them.) Edit rc.inet1.conf and set USE_DHCP(n) to "yes" for your wireless interface. Leave the other parameters null, except perhaps DHCP_HOSTNAME(n) if you want. Verify that you have the address of your gateway specified in the GATEWAY parameter.

Make sure /etc/rc.d/rc.wireless is executable.

In /etc/rc.d/rc.wireless.conf, make sure this section near the top is NOT commented out:

Code:

## Pick up any Access Point, should work on most 802.11 cards
*)
    INFO="Any ESSID"
    ESSID="any"
    ;;

Configure any specific wireless settings pertinent to your network in /etc/wpa_supplicant.conf. Here is an example for a network with ssid "eatmorepizza":

Code:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root
eapol_version=1
ap_scan=1
fast_reauth=1

# 7/6/2006 Use wpa_passphrase to obtain pre-computed hexadecimal psk:
#    wpa_passphrase eatmorepizza "this is just a fake sample password"

network={
        ssid="eatmorepizza"
        proto=WPA RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP WEP104 WEP40
        psk=a05a1952c8abcd92104f9c5ff6daf0077d23ebb66cf810b931beea889a1803f0
        priority=10
}

# Plaintext connection (no WPA, no IEEE 802.1X),
# nice for hotel/airport types of WiFi network.
network={
  key_mgmt=NONE
  priority=0
}

Make sure the /etc/wpa_supplicant.conf is rw for root only.

Let me know if any of that helps.

Woodsman 07-06-2013 08:40 PM

Quote:

Perhaps you should revert rc.inet1.conf (and any other network configuration files) to their original states and let networkmanager or wicd do their jobs.
I ran netconfig to empty rc.inet1.conf and use NM. Rebooting with the cable pulled resulted in no network.

Quote:

have been using wicd for both wired and wireless connections for a long time
I tried wicd. I was successful once. After rebooting I could not again get wicd to connect.

Quote:

You can issue "iwconfig" to list the wireless interfaces on your laptop.
I ran ifconfig to find three interfaces: eth0, lo, and wlan0.

I ran iwconfig and I see some information about wlan0.

I ran 'iwlist wlan0 scanning' and I receive a message the interface doesn't support scanning because the network is down.

Quote:

Make sure you have an active dhcp server somewhere on your network, probably on your router.
I don't have the router configured that way. I always have used static IP addresses with my home LAN. Is there no way to use static IP addresses with wireless?

If I have to configure the router as a DHCP server, I want the laptop to use the same IP address wired or wireless. Is that possible?

Whether using NM, wicd, or rc.wireless, I don't want to login and start the desktop just to get wireless working. I have system scripts that need networking that I run in rc.local for auto updates of various system files. Whether the system is using wired or wireless I want those scripts to run before any logins. I want the laptop to use wired when available but to otherwise first look for wireless.

Z038 07-06-2013 08:57 PM

Quote:

Originally Posted by Woodsman (Post 4985432)
Is there no way to use static IP addresses with wireless?

I haven't ever done that, but I think you can. Just specify the IP address in rc.inet1.conf in the IPADDR(n) parameter, set the NETMASK(n) for your network, and change USE_DHCP(n) to null or NO.

Quote:

Originally Posted by Woodsman (Post 4985432)
If I have to configure the router as a DHCP server, I want the laptop to use the same IP address wired or wireless. Is that possible?

Yes, you can do that. You would set up the DHCP server to assign a particular IP address based on the MAC of the wireless NIC. If you decide you want to do that, I can give you an example dhcpd.conf. I run dhcpd on my desktop, not in my router, but the dhcp server on many of the routers I've used could be configured that way too.

Quote:

Originally Posted by Woodsman (Post 4985432)
Whether using NM, wicd, or rc.wireless, I don't want to login and start the desktop just to get wireless working. I have system scripts that need networking that I run in rc.local for auto updates of various system files. Whether the system is using wired or wireless I want those scripts to run before any logins. I want the laptop to use wired when available but to otherwise first look for wireless.

On my Thinkpad T43, dhcpcd (note, not dhcpd the server, but rather dhcpcd, the client) runs sometime before rc.local and solicits an IP address from my dhcp server.

manwichmakesameal 07-06-2013 09:02 PM

You don't have to start a desktop to have NM start your connection. I have a T510 and NM starts just fine when I boot. I use dispatcher.d to start some stuff, like mounting NFS shares, when booting. I know rc.nfs can do that, but I don't want it to try to mount on hostile networks. One thing I would look at, is firmware. What chipset are you using, and do you need to load any firmware for it? You can also try nmcli and see if you can see any of the networks.

Woodsman 07-06-2013 09:18 PM

Much of the configuring of the laptop has gone well, despite being my first laptop and me wanting to configure some special things because of the laptop's mobility. The last day and half trying to get wireless running has been mind numbing. :)

With the above responses I think I have something working. After I ran netconfig, which wiped the rc.inet1.conf (as somewhat hinted by sycamorex) and also wiped my /etc/hosts (not nice Pat :() I then disabled rc.wicd and re-enabled rc.networkmanager. With the cable pulled I rebooted and the wireless network now seems to be working, also with static IP addresses defined in NetworkManager.

So at least one problem would seem to have been a conflict between NM and rc.inet1? Is this written somewhere and I missed getting the memo?

I have rebooted a couple of times now, but I notice wireless seems to initialize in steps, or very slowly. When my rc.local attempts to run my auto updating scripts, they all fail. During that period the laptop wireless LED is blinking. After many seconds the LED goes solid. When the LED goes solid I then can manually run the same set of auto updating scripts.

Apparently I need some kind of wireless test before running the scripts in rc.local. Are there any programmatic ways to validate the wireless network is up and stable and not just initialized?

Related, how do I programmatically detect which interface the laptop is using (eth0/wlan0)?

Another question: should rc.inet1 be disabled when using rc.networkmanager?

manwichmakesameal 07-06-2013 09:29 PM

RE: rc.inet1: Mine is still executable and I don't have any issues at all. Instead of testing for connection then running rc.local, check out /etc/NetworkManager/dispatcher.d.

Woodsman 07-06-2013 09:32 PM

Another question: iwconfig lists Bit Rate=1 Mb/s. Should that be 54 Mb/s or at least something close to that?

allend 07-06-2013 10:02 PM

Quote:

So at least one problem would seem to have been a conflict between NM and rc.inet1? Is this written somewhere and I missed getting the memo?
You missed the memo. :) From the email to root titled ' Welcome to Linux (Slackware 14.0)!'
Quote:

With NetworkManager or wicd, it's
a good idea to remove any existing network configuration in
/etc/rc.d/rc.inet1.conf first. This can be done by running netconfig
and setting the machine to use loopback. Then, if you're using
NetworkManager run it a second time and select NetworkManager.
Quote:

Apparently I need some kind of wireless test before running the scripts in rc.local. Are there any programmatic ways to validate the wireless network is up and stable and not just initialized?

Related, how do I programmatically detect which interface the laptop is using (eth0/wlan0)?
As mentioned by manwichmakesameal, you can setup scripts in /etc/NetworkManager/dispatcher.d
For example: http://www.linuxquestions.org/questi...1/#post4579765

BTW - Did you see this in CHANGES_AND_HINTS.TXT?
Quote:

If you have a Thinkpad T400 or T500, you probably want to append "pci=reboot"
to the kernel boot parameters. For more information about this issue, see
https://encrypted.google.com/search?...ci%3Dreboot%22

Woodsman 07-06-2013 10:54 PM

Quote:

You missed the memo.
Sigh. So much to read. So little remembered. :)

Quote:

As mentioned by manwichmakesameal, you can setup scripts in /etc/NetworkManager/dispatcher.d
For example: http://www.linuxquestions.org/questi...1/#post4579765
Yes, I ran into that same problem. The rc.firewall script runs from rc.inet2 but the NM script runs from rc.M.

The challenge is running rc.firewall in rc.inet2 works just fine in any wired system. Only the new laptop hiccups with that and only when I use NM.

Why is the NM script launched in rc.M rather than rc.inet2?

Quote:

BTW - Did you see this in CHANGES_AND_HINTS.TXT?
Nope, missed that too. Or I should say, ignored because at the time I never owned a laptop. I added pci=reboot as a kernel parameter and saw a message about unknown option. I'm not seeing any delay when rebooting. Perhaps the problem is resolved with newer kernels?

Quote:

Are there any programmatic ways to validate the wireless network is up and stable and not just initialized?
I came up with the following kludge:

Code:

if [ "`ifconfig eth0 | grep 'inet '`" = "" ]; then
  # Probably using wireless and not wired.
  # Another way to delay would be using 'iwconfig | grep Frequency'.
  echo "Waiting for the wlan0 interface to stabilize..."
  while [ "`ifconfig wlan0 | grep 'inet '`" = "" ]; do
    sleep 1
  done
fi


volkerdi 07-06-2013 10:56 PM

Quote:

Originally Posted by Woodsman (Post 4985492)
Why is the NM script launched in rc.M rather than rc.inet2?

Because DBus isn't running when rc.inet2 is executed.

Woodsman 07-06-2013 11:00 PM

Quote:

Because DBus isn't running when rc.inet2 is executed.
No matter where I go, there I am.

Okay, thanks.

Perhaps add a comment in rc.M so other dweebs like me don't ask again? :)

Woodsman 07-07-2013 01:42 PM

Quote:

I use dispatcher.d to start some stuff, like mounting NFS shares, when booting.
I am unable to get any scripts to execute. I started a new thread addressing the topic.

dive 07-07-2013 04:29 PM

You could also try using nmcli:

nmcli con up uuid 0b1486b8-4a7b-4bea-ae6d-10390d898619

'nmcli d' will print a list of connection uuids. I used to put the above line in rc.local but don't really bother anymore.

Woodsman 08-09-2013 01:19 PM

I'm tagging this thread as solved. The core of my solution resides in comment 12. Basically, when using NetworkManager do not populate rc.inet1.conf. :)

NightSky 10-28-2013 09:42 PM

This thread is the best simple current & short slackware wifi setup I found. Needs to be a 'wifi sticky' Thanks


All times are GMT -5. The time now is 02:40 AM.