1

So I just got the A+ and had a wifi dongle laying around here. It's the official wifi dongle from ThePiHut.

I tried editing my /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf as suggested by official sources and online websites. No luck yet. Using wpa-gui is not really an option as I only have one USB port and can't use both the dongle and the mouse.
All this is tried on a fresh install of latest Rasbian (trough latest NOOBS)

Anyone here got any clue on what I'm doing wrong? Is this a power issue? I'm powering it with a Sony GreenHeart charger which is supported for the pi and that one goes into a surge protector (which is in turn connected to another surge protector and that one is plugged into the wall)

My interfaces file looks like:

auto wlan0

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual # Tried dhcp here too
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

# Also tried static ip by dropping below code block in
iface wlan0 inet static # edit that line above to this
address 192.168.0.222
netmask 255.255.255.0
gateway 192.168.0.1

And my wpa_supplicant looks like:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="Disperse" # network name
psk="networkpasshere"
proto=RSN
key_mgmt=WPA-PSK
pairwise="CCMP"
auth_alg=OPEN
}

And if I reboot with these settings I get the following errors:

usbcore: registered new interface driver rt2800usb # dongle I think?
Configuring network interfaces…wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Kernel lacks cgroups or memory controller not available, not starting cgroups (warning)

If I don't get this working I'm just gonna sell the damn thing, since I've been trying wifi with my B+ too also without any luck.

EDIT: I think from the following logs it's my network's fault…

I edited /etc/network/interfaces with wpa_ssid "Disperse" and wpa-psk "passhere" added in there and commented the last two lines out (found this in a tutorial for the PiHut dongle). I got the following errors

Configuring network interfaces… Internet Systems Consortium DHCP Client 4.2.2

Listening on LPF/wlan0/00:87:40:4f:01:19
Sending on LPF/wlan0/00:87:40:4f:01:19
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping
done.

And after that it hangs while trying to start sshd and I have to manually cut the power.

  • Try what I've suggested here: raspberrypi.stackexchange.com/a/26782/5538 (But you can ignore the first paragraph). – goldilocks Jan 16 '15 at 13:20
  • Please set a better title for your question. – jotadepicas Jan 16 '15 at 13:43
  • @goldilocks will try to connect it directly to wall socket and then will try your solution (since it requires a hub for both the dongle and keyboard to be connected). Thanks in advance. – thibmaek Jan 16 '15 at 17:47
  • You could try wpa_supplicant without the -B switch (which is in that example). This will leave it in the foreground so you'll have to use another terminal/console for what comes next, but it will also make it easier to see what's going on. It usually spits a few errors/warnings; the real test is if 1) it stays running, 2) dhclient then works. – goldilocks Jan 16 '15 at 18:02
  • @goldilocks will try yours now since I tried another method and that didn't get me any further (see edits above) – thibmaek Jan 18 '15 at 11:24
2

It seems possible that if you have been having problems with the B+ as well that the problem is related. From my own experiences, I have found that the key to a reliable WiFi connection is using a dongle that 'just works'. Since you are using one from ThePiHut, then I will assume that it should be ok. To test this, include the dmesg command at the end of the /etc/rc.local file and with luck you will see a list of drivers that are loaded to support discovered hardware when your Pi boots up.

Towards the end of the list (it shouldn't have scrolled off the window) will be a series of messages that describe the USB connector and what is connected to it. In particular we should see a group that looks a little like the following;

[3.382731] usb 1-1.1: new high-speed USB device number 4 using dwc_otg
[3.494250] usb 1-1.1: New USB device found, idVendor=7392, idProduct=7811
[3.507749] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[3.520230] usb 1-1.1: Product: 802.11n WLAN Adapter
[3.542690] usb 1-1.1: Manufacturer: Realtek
[3.560641] usb 1-1.1: SerialNumber: 00345767831a5e

That is the USB adapter which is plugged into the USB slot (which is the ‘.1’ in usb 1-1.1:). The manufacturer in this case is listed as ‘Realtek’ as this is the manufacturer of the chip-set in the adapter that Edimax uses.

Using that configuration above, your interfaces file should look like;

auto lo

iface lo inet loopback

allow-hotplug wlan0
auto wlan

iface wlan0 inet static
    address 192.168.0.222
    netmask 255.255.255.0
    gateway 192.168.0.1
    wpa-ssid "Dispurse"
    wpa-psk "networkpasshere"

Once the changes have been made you should reboot the Pi to make them operative.

So long as the dongle is recognized and you're using the latest version of Raspbian you shouldn't need to configure the wpa_supplicant file (from my limited experience).

Details on the set-up above can be found here or I would recommend downloading the whole book for free and just working through the steps with your B+ model.

0

You can set up WiFi this way, if you know what you are doing, but what you have posted seems confused.

If you have a B+ set it up on that, then just copy the files to the A+.

Why not try the simple way. 3 solutions are suggested in the link. Using the GUI is the simplest.

http://www.raspberrypi.org/documentation/configuration/wireless/README.md

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.