mckorr
Posts: 12
Joined: Fri Oct 05, 2012 5:01 pm

Problems configuring wireless

Wed Oct 10, 2012 3:52 pm

I can't get wireless networking to work. I'm afraid I'm going to make a lot of people angry by saying this, but the vast majority of the help on the web is cryptic or downright useless. 95% of all Arch documentation refers to pre-systemd configurations, and while I've managed to cross reference a lot of it to at least get my wireless up and running, I can not figure out for the life of me how to get it to connect.

What I've managed to do:
- compile and install kernel modules for the Edimax EW-7811Un USB-Wifi adapter.
- replace network with networkmanager: this causes all the interfaces, eth0 and wlan0, to come up.

From here, I can't get it to connect to anything, nor can I figure out where to put the configuration files to do so. There are lots of references to /etc/rc.conf (doesn't exist), /etc/network.d (doesn't exist), and so on.

I've tried manually using iwconfig, but nothing connects.

I'm using X, but not a window manager (multiple xterms, it actually looks pretty cool). Again, ArchWiki assumes you will use a window manager and tools such as nm-applet or wifi-radar (wifi-radar didn't work btw). I need to configure from the command line. And there are two different wireless networks I'll need to connect to (home and work). Both use dhcp for addressing. One uses wpa, one uses wep. Dynamically choosing whichever network is in range would be ideal, but I'll manually switch if I have to.

So... how do I do it? Can someone either talk me through it, or point me to a decent website that actually has up to date instructions, without referring me to another website that, ta dah, doesn't?

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: Problems configuring wireless

Wed Oct 10, 2012 3:55 pm

Perhaps not what you wanted to hear but I would switch to Raspbian. The 7811 works out the box with 60 seconds of config in the wireless config utility.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

mckorr
Posts: 12
Joined: Fri Oct 05, 2012 5:01 pm

Re: Problems configuring wireless

Wed Oct 10, 2012 4:17 pm

Nope, not what I want to hear :lol:

I'm using Arch because there is no stripped down version of Raspian. I only want a base install to start from, and build up from there. I don't want LXDE, I don't want all the other stuff. And I don't want to have to spend hours stripping it down.

Plus I learn more using Arch.

I've removed NetworkManager. The only problem with doing that is wlan0 does not come up automatically now, I had to start it after logging in. Again, I'm supposed to do that in rc.conf, which doesn't exist.

Installed wicd, which sees the networks but doesn't connect. Admittedly I'm at work, and they've been screwing with the wireless security to the point where even Windows and OS X machines have troubles connecting sometimes. Unfortunately it also uses WEP for some reason, and that seems harder to get a handle on than WPA.

Alright, first problem. How do I get wlan0 to come up at boot?

User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: Problems configuring wireless

Wed Oct 10, 2012 4:20 pm

Hi!

iwconfig is totally useless, if you have an encrypted wifi. (OK, it can handle WEP encryption, but thats not much better then unencrypted.)

What you want to use is netcfg (which uses wpa_supplicant instead of iwconfig). A short guide:

$ sudo pacman -Sy netcfg

$ sudo cp /etc/network.d/examples/wireless-wpa-configsection /etc/network.d/MyNewWifi

$ sudo nano /etc/network.d/MyNewWifi

Edit SSID and passwort to your need, than:

$sudo netcfg MyNewWifi

For more info look here:
https://wiki.archlinux.org/index.php/Netcfg

Regards,
Maribu

mckorr
Posts: 12
Joined: Fri Oct 05, 2012 5:01 pm

Re: Problems configuring wireless

Wed Oct 10, 2012 4:41 pm

Thanks Maribu, that worked. I get a couple error messages:

Code: Select all

nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
ioctl[SIOCSIWAP]: Operation not permitted
but it still connects. Now to tackle automatic connections....

EDIT: btw, again there is only one brief reference to systemd in the wiki, but maybe I can sort it out from the hints there.

mckorr
Posts: 12
Joined: Fri Oct 05, 2012 5:01 pm

Re: Problems configuring wireless

Wed Oct 10, 2012 7:05 pm

netcfg worked. I'm not sure what combination of services I eventually ended up with, it looks like net-auto-wired.service and netcfg.service. I also had to install wpa_actiond and ifplugd. Was able to remove wicd.

Now I get to backtrack, figure out exactly what I did, and add it to my notebook (wiki) so I can do it again later.

Thanks for the help.

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Problems configuring wireless

Wed Oct 10, 2012 8:56 pm

Basically, with systemd, where you put (example) wicd in DAEMONS brackets of rc.conf, you do this
systemctl enable wicd.service
Disable takes it out, or you can start or stop or restart or status
I would recommend wicd, start and enable service, then I think wicd-cli to configure.

With netcfg as the service, the file neme of the file created or copied from examples in /etc/network.d/ is referenced where you see last in brackets in /etc/conf.d/netcfg
A reboot to start, or systemctl restart netcfg
You have to disable the dhcp eth0 service, can't remember name, but it's a symlink file in /etc/systemd/system/multisomething if you have netcfg also do wired (you have 2 filenames in the brackets of where it said last)
It's just nice to know how these bits fit together and relate, rather than copy instructions

mckorr
Posts: 12
Joined: Fri Oct 05, 2012 5:01 pm

Re: Problems configuring wireless

Sat Oct 13, 2012 4:23 pm

Which is what I'm trying to learn. Learned a lot using Arch under the old system, just now almost all the tutorials are out of date.

I'm slowly piecing together an understanding of the systemd architecture, just takes some time to work out new locations, files, etc. Now that I've got a handle on systemctl it's coming along much easier.

Thanks for all the help.

lunchbox
Posts: 16
Joined: Tue Oct 23, 2012 4:03 am
Location: Jincheng, Shanxi, China

Re: Problems configuring wireless

Tue Oct 23, 2012 5:48 am

I am experiencing a very similar situation. I am using netcfg and net-auto-wireless. I have some test info that might be useful. The problem appears to be related to time. If I have my raspberry pi connected to the internet via ethernet and set-up with netcfg and auto wireless daemon as startup services pretty much as described in arch wiki, the whole thing startups up fine and connects to the wireless network automatically. I check systemctl status for both and there are no complaints. If I am not connected to ethernet I get the ioctl error message described above about some operation not being permitted. With ethernet plugged in my raspberry pi sets its time correctly before it starts worrying about wireless, and everything works. If I turn off openntp, I can reproduce this problem.

So to summarize. If my pi sets the system clock correctly before wireless services starts up it works, if it can't set the time, it doesn't work. I have no idea how to get around this problem since the machine doesn't have a hardware clock and I don't understand where the time is causing thing to break. Any tips/ideas?

Ironically, my project requires wireless almost exclusively for the purpose of setting the time.

jwatte
Posts: 203
Joined: Sat Aug 13, 2011 7:28 pm

Re: Problems configuring wireless

Sat Nov 10, 2012 11:55 pm

I'm running into similar problems. So far, I've had to install:

wpa_supplicant
iw
wpa_actiond
netcfg
dialog
ifplugd

I've also enabled services wpa_supplicant and net-auto-wireless, and created a profile in /etc/network.d (the directory was created when I installed netcfg, I think.)

I'm still not at the point where dhcpcd goes out to auto-assign an IP address, although the network does connect when started manually.

Part of the problem is that most tutorials end up with a "nl80211 not found' error, because I use a Realtek 8188su based USB WiFi card (a Belkin something-or-other.) While that driver supports wext, it does not support nl80211, and it seems as if the Linux crowd decided to upgrade all the tools to require nl80211 without providing a backwards compatible path, nor updating all the drivers to go with it. Very frustrating!


liaonet
Posts: 9
Joined: Thu Jan 03, 2013 11:01 am

Re: Problems configuring wireless

Thu Jan 03, 2013 11:34 am

mckorr wrote:Thanks Maribu, that worked. I get a couple error messages:

Code: Select all

nl80211: 'nl80211' generic netlink not found
Failed to initialize driver 'nl80211'
ioctl[SIOCSIWAP]: Operation not permitted
but it still connects. Now to tackle automatic connections....

EDIT: btw, again there is only one brief reference to systemd in the wiki, but maybe I can sort it out from the hints there.
Hi,
The above error is exactly where I am right now!

Could you tell me that next steps you took to fix the issue?

Thanks :-)

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Problems configuring wireless

Thu Jan 03, 2013 4:14 pm

If the wireless is up, ignore these messages

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Problems configuring wireless

Thu Jan 03, 2013 5:04 pm

I have seen in dmesg that a lot of times, the system will say it cannot find something because it has not found it yet. A few seconds later, it finds it. So study dmesg carefully as well as whether you get the end result you want. A log is a log of goings on, not a final report of the end result.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

liaonet
Posts: 9
Joined: Thu Jan 03, 2013 11:01 am

Re: Problems configuring wireless

Fri Jan 04, 2013 11:10 am

Excellent thanks for that and the wireless is not up so I am at a loss if this is not a clue :-)

Return to “Arch”