Skip to content

Wireless

To get rid of the NetworkManager at last, use this setup to get the wireless interface running in the normal interface methods.

First :

apt-get remove Network-Manager

And good riddance... except !, note that this is not enough often :

changetitle
apt-get remove --purge network-manager

Is better.

Now you can list the networks with :

changetitle
iwlist wlan0 scan | grep ESSID

The grep is needed because of the vast amount of lines that are displayed. In my case it gave :

changetitle
1
2
3
4
5
6
7
ESSID:"ZyXEL_yvon"
ESSID:"HPB110a.AEE09A"
ESSID:"H368N76A691"
ESSID:"HOME SWEET HOME"
ESSID:"UPC0044248"
ESSID:"Ziggo"
ESSID:"Home SWEET HOME 5"

We use wpa_supplicant, so i picked the right one, and used a command like this:

changetitle
1
2
3
4
5
6
7
8
wpa_passphrase ZyXEL_yvon password


network={
        ssid="ZyXEL_yvon"
        #psk="password"
        psk=15e2f643db7fec61a075216148d1f80af546f2bb20718fc4993869df351be415
}

Of course use another password, and put the output into :

changetitle
wpa_passphrase ZyXEL_yvon password > /etc/wpa_supplicant.conf

Now you only have a config file, you activate it with :

changetitle
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf

But of course we want it to survive reboots and usable with the normal network services. so Add this to /etc/network/interfaces :

changetitle
1
2
3
4
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

crda regulatory domain problem

Symptom, in syslog :

changetitle
1
2
3
4
Apr 25 19:36:44 toplap kernel: [ 4558.887348] wlan0: deauthenticating from a8:d3:f7:63:35:f7 by local choice (Reason: 3=DEAUTH_LEAVING)
Apr 25 19:36:44 toplap kernel: [ 4558.900244] cfg80211: Calling CRDA to update world regulatory domain

iw reg get

If you don't wee deauthenticating but only the regulatory domain message it could just be that your signals is low and it keeps disconnecting.

wicd

I like this one, but please note that you have to remove network-manager completely with :

changetitle
apt-get remove --purge network-manager

I had a problem on my laptop where the network would disconnect after some times, the log in /var/log/wicd/wicd.log would say :

changetitle
1
2
3
4
5
6
2016/04/25 21:56:48 :: Autoconnecting...
2016/04/25 21:56:48 :: No wired connection present, attempting to autoconnect to wireless network
2016/04/25 21:56:48 :: Unable to autoconnect, you'll have to manually connect
2016/04/25 21:56:48 :: attempting to set hostname with dhclient
2016/04/25 21:56:48 :: using dhcpcd or another supported client may work better
2016/04/25 21:56:49 :: attempting to set hostname with dhclient

2016/04/25 21:56:49 :: using dhcpcd or another supported client may work better

Purging network-manager fixed this !!

wavemon

Nice tool to show the connection. It presents a curses-bases level meter. Search words wireless wifi level signal.

changetitle
wavemon

You will need to sudo for the scan list (F3) that shows all networks though !.

wifi repeater

The wifi repeater from action seems to work, here is how to reinstall it if needed.

I needed to get back into the web interface which is at visit but that does not ping at all. So here is a couple of steps to take to get it back on line.

  • Plug it into power and if possible connect a lan cable to your laptop.
  • reset to factory settings by pushing a paper clip into the small side hole for 10 seconds.
  • setup /etc/wpa_supplicant.conf to accept the unprotected network with this setting
changetitle
1
2
3
4
5
network={
ssid="Wireless-N"
key_mgmt=NONE
priority=-999 # if you know which one you want this will speed things up
}
  • restart the network, Now after this i had both an ip address for eth0 as wlan0 so i presume either may work, at least the web interface works.
  • this guide is for at home where i have plenty of RJ45 network connections so i chose for the AP option, and created a new WPA2-PSK AP.
  • note that wpa-supplicant does not know WPA2-PSK, you should do it like this :
changetitle
1
2
3
4
5
network={
ssid="motjenogjus-N"
key_mgmt=WPA-PSK
protocol=WPA2
}

Of course the password is omitted here.

wifi setup

The latest setup seems to finally work without disconnections so let's first do a screendump of wavemon with the 'working' settings.

changetitle
┌─Interface────────────────────────────────────────────────────────────────────┐
│wlan0 (IEEE 802.11abg, WPA/WPA2),  ESSID: "motjenogjus"                       │
├─Levels───────────────────────────────────────────────────────────────────────┤
│                                                                              │
│link quality: 64%  (45/70)                                                    │
│==================================================                            │
│                                                                              │
│signal level: -65 dBm (0.32 nW)                                               │
│=========================                                                     │
│                                                                              │
│                                                                              │
├─Statistics───────────────────────────────────────────────────────────────────┤
│RX: 82,289 (28.63 MiB), invalid: 0 nwid, 0 crypt, 0 frag, 486 misc            │
│TX: 64,549 (8.10 MiB), mac retries: 560, missed beacons: 0                    │
├─Info─────────────────────────────────────────────────────────────────────────┤
│mode: Managed,  access point: 9C:C7:A6:C7:CC:FB                               │
│freq: 2.432 GHz, channel: 5,  bitrate: 48 Mbit/s                              │
│power mgt: on,  tx-power: 20 dBm (100.00 mW)                                  │
│retry: short limit 7,  rts/cts: off,  frag: off                               │
│encryption: n/a (requires CAP_NET_ADMIN permissions)                          │
├─Network──────────────────────────────────────────────────────────────────────┤
│mac: 60:57:18:17:12:95, ip: 192.168.2.33/24                                   │
 └──────────────────────────────────────────────────────────────────────────────┘

also.. here is an overview of actions taken :

  • first the site with info i used was howtouse
  • i tried connman, which never really worked, but this does block the wifi interface
  • stopped connman, and unblocked wifi with 'rfkill unblock 0'
  • tried to disable wpa_supplicant and tried the section under WPA-PSK WPA2-PSK
  • wpa_passphrase myssid my_very_secret_passphrase used to generate a direct entry in network/interfaces
  • added wireless-mode Ad-Hoc
  • added wireless-power off
  • as seen in the screen dump both of these don't have any effect

free wireless

More and more hotels provide wifi with this method. You get a free wifi connection but then have to go via the hotel portal to get to the web.

Normally you have to provide your email address, answer some questions or you have to login to the portal with a password you get from the hotel.

The procedure to get things running is :

changetitle
1
2
3
4
5
6
sudo su 
wavemon # use F3 to get the SSID
# if it contains multiple words, use ""
iwconfig wlan0 essid "Appart City" && dhclient wlan0
tail -f /var/log/syslog # IF needed 
ifconfig

If you have an interface with ip, you are almost in. Now browse to an http ! address , NOT https !! You will be redirected to the portal which is always different. So you are on your own now