LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 12.1 and Wireless Network: Almost There!! (https://www.linuxquestions.org/questions/slackware-14/slackware-12-1-and-wireless-network-almost-there-639761/)

andrew.46 05-04-2008 05:19 AM

Slackware 12.1 and Wireless Network: Almost There!!
 
Hi,

I am so close to having wireless networking set up under Slackware 12.1 that it is a little infuriating that I cannot finish the job :-) The problem is that although I can start the wireless connection manually from a script I cannot place the settings 'formally' in the normal manner.

The wireless chip is a Broadcom Corporation BCM4312 802.11a/b/g (rev 01) and I have downloaded and installed the Broadcom firmware from Linux Wireless. I have cleaned out the /etc/rc.d/rc.wireless.conf and the total file contents are:

Code:

# Wireless LAN adapter configuration

00:1c:26:97:bd:d0)
    INFO="Speedtouch 585 ADSL Router"
    ESSID="SpeedTouch688ADB"
    KEY="C***-****-**"
    ;;

although I have masked the KEY section. After booting on this I get only:

Code:

bash-3.1# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
wmaster0  no wireless extensions.

wlan0    IEEE 802.11g  ESSID:"" 
          Mode:Managed  Channel:0  Access Point: Not-Associated 
          Tx-Power=0 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2346 B 
          Encryption key: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

and:

Code:

bash-3.1# dmesg | grep Broadcom
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:1c:23:9e:f1:63
b43-phy0: Broadcom 4311 WLAN found

But after running this script that I have cobbled together the network springs successfully to life:

Code:

#!/bin/bash

ifconfig wlan0 up
iwconfig wlan0 essid "SpeedTouch688ADB"
iwconfig wlan0 key C*********F
dhcpcd wlan0

and wireless performance is flawless. The same commands now show:
Code:

bash-3.1# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
wmaster0  no wireless extensions.

wlan0    IEEE 802.11g  ESSID:"SpeedTouch688ADB" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:14:7F:8B:B2:DD 
          Bit Rate=2 Mb/s  Tx-Power=27 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2346 B 
          Encryption key:C*******F
          Link Quality=66/100  Signal level=-65 dBm  Noise level=-72 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0

I suspect I am missing something very basic here and I would be grateful to anybody who can show me what I am missing.

Andrew

introuble 05-04-2008 06:07 AM

[Note: I don't currently use Slackware nor have I ever set up wireless networking on Slackware.]

#1. You borked your /etc/rc.d/rc.wireless.conf file. There's supposed to be a bash "case" in there (i.e. a C "switch", etc.). Try:

Code:

# Wireless LAN adapter configuration

case "$HWADDR" in
00:1c:26:97:bd:d0)
    INFO="Speedtouch 585 ADSL Router"
    ESSID="SpeedTouch688ADB"
    KEY="C***-****-**"
    ;;
esac

#2. What does `ls -al /etc/rc.d/rc.wireless` say ?

mRgOBLIN 05-04-2008 06:41 AM

I'd highly Recommend wicd.

If you decide to try this you should use rworkmans' slackbuild here http://slackbuilds.org/repository/12.1/network/wicd/.

Just make sure you fulfill the dependencies, apply the patches and read the instructions and you'll be managing your wireless connections with ease in no time at all.

andrew.46 05-04-2008 07:08 AM

Hi,

Can I say that this is a very tempting thought:

Quote:

Originally Posted by mRgOBLIN (Post 3142064)
I'd highly Recommend wicd.

If you decide to try this you should use rworkmans' slackbuild here http://slackbuilds.org/repository/12.1/network/wicd/.

Just make sure you fulfill the dependencies, apply the patches and read the instructions and you'll be managing your wireless connections with ease in no time at all.

But I am so close now! I have managed to get the connection set but I am having some trouble with automatically getting a dhcp address.

Andrew

Bruce Hill 05-04-2008 07:13 AM

What does your /etc/rc.d/rc.inet1.conf look like?

We have three comps with wireless and I have never
touched /etc/rc.d/rc.wireless.conf

Okie 05-04-2008 07:16 AM

i been silently lurking here as i have found slackware's wifi configuration a bit of a mystery, i have debian lenny running wifi great but i been a slackware user for years (just new to wifi) and i am going to give wicd a shot, thanks mRgOBLIN :)

andrew.46 05-04-2008 08:06 AM

As you have suggested I returned the /etc/rc.d/rc.wireless.conf file to its original state and altered only the /etc/rc.d/rc.inet1.conf as follows:

Code:

IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]=SpeedTouch688ADB
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
WLAN_KEY[4]="C**-****-**"

All other settings intact. This gave me the following:

Code:

root@skamandros~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0    IEEE 802.11g  ESSID:"SpeedTouch688ADB" 
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:14:7F:8B:B2:DD 
          Bit Rate=1 Mb/s  Tx-Power=27 dBm 
          Retry min limit:7  RTS thr:off  Fragment thr=2346 B 
          Encryption key:**********F
          Link Quality=66/100  Signal level=-65 dBm  Noise level=-71 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0  Missed beacon:0

But no connection to the router. Seems to be a dhcp problem? As usual my little script gets the connecton going:

Code:

#!/bin/bash

ifconfig wlan0 up
iwconfig wlan0 essid "SpeedTouch688ADB"
iwconfig wlan0 key ********F
dhcpcd wlan0

Tried wicd which worked fine but I would prefer to work this one out so it is uninstalled at the moment.

Andrew

jimX86 05-04-2008 10:17 AM

This problem keeps coming up with Broadcom cards (especially the 4312) and mac80211. Other threads have suggested that it's a timing issue, but in any event, these cards seem to need a bit of manual intervention.

Bruce Hill 05-04-2008 11:01 AM

Check out this post ...

Although in Slackware-12.1 that is supposedly fixed in the wireless tools pkg.

I believe it's a bug in the kernel driver.

Okie 05-04-2008 12:05 PM

i tried wicd and it did not work, what i did do though that worked perfectly was add my info to /etc/rc.d/rc.inet1.conf using a static IP and the nameserver IP#s in to /etc/resolv.conf since this PC is the only wireless in the house, the rest are wired and the router wants to put the wireless on the first IP address...

Code:

# Default gateway IP address:
GATEWAY="192.168.1.1"

IFNAME[0]="wlan0"
IPADDR[0]="192.168.1.100"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]="cpe.cableone.net"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[0]=sooner
WLAN_MODE[0]=Managed
WLAN_RATE[0]="54M auto"
WLAN_CHANNEL[0]="1"
WLAN_KEY[0]="##########"


andrew.46 05-04-2008 09:29 PM

Well I have achieved success of a sort and I thought I would post my solution here for the record; it is a bit of a hack but it seems to guarantee when I turn the laptop on there is a wireless network waiting for me.

So for the BCM4312 (rev 01) under Slackware 12.1 I followed the following steps:

1. Downloaded the appropriate firmware (broadcom-wl-4.80.53.0) and fwcutter tool (b43-fwcutter-011) and loaded these as per the directions on Linux Wireless.

2. Altered only /etc/rc.d/rc.inet1.conf wih the following (after futzing around in my ignorance with other config files):

Code:

IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_ESSID[4]=SpeedTouch688ADB
WLAN_KEY[4]="C***-****-**"

However this worked about twice in every 10 boots: wlan0 was active but had not been allocated an address from the router. Hence the ugliness of this:

3. Added the following script (wireless.sh) to be called from /etc/rc.d/rc.local:

Code:

#!/bin/bash

ifconfig wlan0 up
iwconfig wlan0 essid "SpeedTouch688ADB"
iwconfig wlan0 key C*******
dhcpcd wlan0

And now wlan0 coughs into life every boot, although I suspect that on some boots it coughs into life twice :-) I would still dearly love a neater solution to this but what I am doing works on this computer.

Edit: Actually running dhcpcd twice at times caused wlan0 to become non-responsive so I spent another hour or two on this in /etc/rc.d/rc.local:

Code:

if [ -e /etc/dhcpc/dhcpcd-wlan0.pid ]; then
  echo "---> dhcpcd-wlan0.pid already exists! <---"
else
  /home/andrew/scripts/wireless.sh
fi

Andrew

dugan 05-10-2008 02:25 AM

What happens if you revert your rc.inet1.conf and rc.wireless.conf to the default ones, and only run your shell script? Does wireless work then?

Alstare 05-10-2008 02:37 AM

Also to save you some time and waiting, when you make changes to your "rc.wireless.conf" & "rc.inet1.conf" files you don't need to restart each time.

You can issue a restart command for the network instead.

Code:

cd /etc/rc.d/
./rc.inet1 restart


andrew.46 05-10-2008 02:58 AM

I am afraid that I abandoned my attempts at getting wireless to run effectively on this laptop:

Quote:

Originally Posted by dugan (Post 3148923)
What happens if you revert your rc.inet1.conf and rc.wireless.conf to the default ones, and only run your shell script? Does wireless work then?

And made a choice to run slackware on my desktop and an 'easier' distro on my laptop. It was fascinating investigating all of this but I have time constraints.

Maybe when I have some extended leave I will return ...

Andrew

BCarey 05-10-2008 09:58 AM

Quote:

Originally Posted by andrew.46 (Post 3148946)
I am afraid that I abandoned my attempts at getting wireless to run effectively on this laptop:



And made a choice to run slackware on my desktop and an 'easier' distro on my laptop. It was fascinating investigating all of this but I have time constraints.

Maybe when I have some extended leave I will return ...

Andrew

Andrew,

Please report back your results with whatever other distro you choose. I think that the problem you are experiencing is related to the kernel and not to Slackware. There are many problems with broadcom cards on recent kernels (2.6.23 and later, I believe), both using ndiswrapper and native drivers. You might also try Slack 12.0, which uses an earlier kernel that does not have these problems.

Your steps 1 and 2, which are quite simple, should be enough to get wireless working on Slackware.

So let us know if you get it working on another distro with a 2.6.23 or later kernel.

Brian


All times are GMT -5. The time now is 04:07 PM.