LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Is there a simple guide to setting up wlan in Slackware? (https://www.linuxquestions.org/questions/slackware-14/is-there-a-simple-guide-to-setting-up-wlan-in-slackware-4175575286/)

deleted_03 03-18-2016 12:39 PM

Is there a simple guide to setting up wlan in Slackware?
 
I've been trying out Slackware and having difficulty with wireless LAN, in particular with the guides at http://docs.slackware.com/slackware:beginners_guide, http://docs.slackware.com/slackbook:wifi and also http://alien.slackbook.org/dokuwiki/...eless_networks

I'm confused by the options, such as whether to run Network Manager, Wicd, whether to edit /etc/rc.d/rc.inet1.conf or rc.wireless.conf. Presumably for the average user, there is a tried and trusted way. Is there such a guide available?

I noticed that when I run iwconfig, I see the following:

eth0 no wireless extensions
lo no wireless extensions
wlan0 IEEE 802.11bgn ESSID: off/any
Mode: Managed Access Point: Not-associated Tx-Power=0 dBm
Retry long limit:7 RTS thr: off Fragment thr: off
Encryption ley: off
Power Management: on

I presume this means Slackware has detected my Wireless card (a Broadcom BCMM4313 802.11 b/g/n), and yet when I run ifconfig, I only get details of eth0: and lo:

If I enter ifconfig wlan0
... then I see my card with its MAC address. I'm not sure why it doesn't appear in ifconfig by default.

Would really appreciate some guidance. I'm using WPA mode.

slacktroll 03-18-2016 02:28 PM

see
http://www.linuxquestions.org/questi...-a-4175574823/

bassmadrigal 03-18-2016 02:37 PM

It all comes down to personal preference, but for ease of use, it is probably easiest to use Network Manager (Pat has expressed that it might be getting close to consider letting SBo take over wicd and not have it included in extra/ anymore). If you use Network Manager, you don't edit /etc/rc.d/rc.inet1.conf. Network Manager handles the connection, so you should just leave the rc.inet1.conf file alone. Also, using /etc/rc.d/rc.wireless.conf for any settings is deprecated, and you should use one of the other methods (which, as I stated above, Network Manager is the easiest).

As for ifconfig, it will only show the interfaces that are "up". If you run, ifconfig wlan0 up, it should then show wlan0 when you run ifconfig by itself.

genss 03-18-2016 02:58 PM

run
wpa_passphrase ssid password > /somewhere/network.conf
then
wpa_supplicant -i wlan0 -c /somewhere/network.conf

so a .conf somewhere and that command somewhere in a rc.mynetworkscriptname or in rc.local

since wpa_supplicant is practically a network manager, it'l work good and such
it will bring the interface up, connect and reconnect

otherwise wicd and NM are fine for average users, with their GUIs
(they also use wpa_supplicant to connect to WPA)

PS
ifconfig -a shows all interfaces, ifconfig shows just the ones brought up by the admin

there is also a third state (actual down, turned off more or less), but we can't control that directly

Didier Spaier 03-18-2016 03:09 PM

Always try the simplest way first. As root run "netconfig" and when asked, choose NetworkManager. And do not edit any config file. That's all you should have to do.

deleted_03 03-18-2016 03:58 PM

Many thanks indeed for the four replies, it's really great. I've got quite a lot to go from in your replies, so I don't want to unnecessarily complicate matters by posing further questions, before I've tried your advice.

I suppose what I'd expected is that it would be possible without the GUI. I don't have a problem with that however - but I just don't know where to find the Network Manager in KDE. Any chance of pointing me in the right direction with that?

@GENSS, is your method designed to just work at command level without the need for using the GUI? Sorry I haven't tried it yet, but it's way past bedtime here in and I need to leave it until the morning.

I suppose it all begs the question however, based on the advice to leave the config files alone and use Network Manager - should there be a re-write the documentation?

Many thanks again, James

bassmadrigal 03-18-2016 04:12 PM

Quote:

Originally Posted by James Bangrak (Post 5517875)
I suppose what I'd expected is that it would be possible without the GUI. I don't have a problem with that however - but I just don't know where to find the Network Manager in KDE. Any chance of pointing me in the right direction with that?

By default, there should be a network icon in your taskbar. That is the nm-applet, which will launch Network Manager.

allend 03-18-2016 06:09 PM

Quote:

Wireless card (a Broadcom BCMM4313 802.11 b/g/n)
That device has appropriate firmware and driver in Slackware, but I note this:
Quote:

Please note: at least BCM4313 is not fully supported. Some models appears to work (users reported success), but some don't, and there's no indication that this is going to change.
https://wireless.wiki.kernel.org/en/...vers/brcm80211

genss 03-18-2016 06:51 PM

Quote:

Originally Posted by James Bangrak (Post 5517875)
@GENSS, is your method designed to just work at command level without the need for using the GUI? Sorry I haven't tried it yet, but it's way past bedtime here in and I need to leave it until the morning.

I suppose it all begs the question however, based on the advice to leave the config files alone and use Network Manager - should there be a re-write the documentation?

Many thanks again, James

yes, using NM or wicd is the easiest way
you get a gui, notifications and the ease of changing things

editing rc.inet1.conf will give you more or less the same as wpa_supplicant that i suggested
so it might be a better option to use the slackware way
(though i haven't read through the script to be sure)

for the way i suggested, with wpa_supplicant, you would also need to run
dhcpcd -t 0 wlan0

so the rc.wifi would be
Code:

#!/bin/sh
# stolen from rc.ntpd

# Start
wifi_start() {
  echo -n "Starting wpa_supplicant"
  wpa_supplicant -B -i wlan0 -c /etc/mywifinet.conf
  dhcpcd -t 0 wlan0
  echo "Connected to wlan"
  echo
}

# Stop wifi:
wifi_stop() {
  echo -n "Stopping wpa_supplicant"
  killall -HUP -q wpa_supplicant
  killall -HUP -q dhcpcd
  echo
}

# Restart wifi:
wifi_restart() {
  wifi_stop
  sleep 5
  wifi_start
}

case "$1" in
'start')
  wifi_start
  ;;
'stop')
  wifi_stop
  ;;
'restart')
  wifi_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac

and at the end of rc.M
Code:

# Start wifi
if [ -x /etc/rc.d/rc.wifi ]; then
  . /etc/rc.d/rc.wifi start
fi

note that i didn't test this, so if there's a typo or something..

ReaperX7 03-18-2016 08:25 PM

If you're using Broadcom, you may want to try the Broadcom-STA proprietary driver if the free driver and firmware aren't working. A lot of times this driver works better for some people. Test and see for yourself.

CTM 03-18-2016 08:51 PM

Quote:

Originally Posted by James Bangrak (Post 5517875)
I suppose what I'd expected is that it would be possible without the GUI.

NetworkManager separates the act of maintaining network connectivity and the act of displaying the connection status and configuring connections into different processes. It has a (relatively) little-known command-line frontend, nmcli, that does (almost) everything that the GTK and Qt GUI frontends can.

kikinovak 03-19-2016 02:48 AM

I don't understand why folks would go through the hassle of configuring a wireless connection in console mode. Having no GUI means you're on a server, and nobody in their right mind would use a wireless connection for a server. On a desktop client or a laptop, all you have to do is make sure there's no hardcoded configuration in rc.inet1.conf, and then:

Code:

# chmod +x /etc/rc.d/rc.networkmanager
Cheers,

Niki

ReaperX7 03-19-2016 03:22 AM

Netwrk Manager as an ncurses interface ntmui that can be accessed from console.

bassplayer69 03-19-2016 07:10 AM

Quote:

Originally Posted by kikinovak (Post 5518042)
I don't understand why folks would go through the hassle of configuring a wireless connection in console mode. Having no GUI means you're on a server, and nobody in their right mind would use a wireless connection for a server. On a desktop client or a laptop, all you have to do is make sure there's no hardcoded configuration in rc.inet1.conf, and then:

Code:

# chmod +x /etc/rc.d/rc.networkmanager
Cheers,

Niki

Not necessarily. I configure my wireless connection in console mode on my raspberry pi 2 running Slackware arm. No way am I running a gui on that slow piece of pc board. :) Besides why would I run a gui to monitor my sump water levels. :)

genss 03-19-2016 07:10 AM

Quote:

Originally Posted by kikinovak (Post 5518042)
I don't understand why folks would go through the hassle of configuring a wireless connection in console mode.

to me, it is not a hassle in the slightest

a reason not to use NM would be that the code is complete shit and the author is one of those with the "NM should be the only network manager and anybody doing anything else is wrong and should contribute to NM instead" attitude


All times are GMT -5. The time now is 12:38 PM.