GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Need some help with getting WIFI working please

Wed Dec 26, 2012 6:14 pm

Hi

Sorry this is another "I cant get my Xmas pressie working and I am a linux total newbie" type question. I will try and give a few clues if I can, but like I say, my Linux experience is now about 2 hours :lol:

I have a TP-LINK Nano wireless dongle, that I cant get to work at all. I am using the recommended image that I think I have fully updated, I get this report

Code: Select all

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l GNU/Linux
lsusb gives me this

Code: Select all

pi@raspberrypi ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
My understanding is that this latest Linux image should have the right driver for that chipset already so I was expecting it to just work.

I have changed a file /etc/network/interfaces to be as follows

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

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

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
wireless-essid XXXXXX
wireless-key s:YYYYYY
iface default inet dhcp
where XXXX is my routers SSID
where YYYY is my 64 bit WEP key I am using (most of the examples I found online use wpa2 so I could have got this bit wrong)

I can get my wired ethernet working ok, so that must be getting an IP address from my router OK. Also my wireless connection to my mobile phone works OK so that proves my router is able to hand out IP addresses over wireless.

However when I boot up my PI I can see it prints out messages saying it is sending out dhcp discover packets to FF:FF:FF etc, port 67, but it never gets an DHCP offer back. :(

Any ideas what I am doing wrong please ? I can try some more debugging type experiments if you explain in detail what I need to do.

Thanks for your time

Regards Geoff

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13101
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 9:34 pm

Some wifi dongles "just work" on the PI, and some will simply never work.
I recommend researching which ones just work, and for about $5 buy that one!

you could start by reading this: http://elinux.org/RPi_VerifiedPeriphera ... i_Adapters

and this: http://elinux.org/RPi_Noob_Guide_to_the ... e#Ethernet

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 9:46 pm

Hi
thanks for the reply, but thats how I chose the one I have got now, it was reported as a working one. The drivers for that chipset are supposedly even in the latest download image.

Incidentally, I did the same thing for choosing a wireless keyboard and mouse, found one that had been reported as working. Same end result, doesnt work for me :(

Must admit I am wondering, why the RaspPi is so unpredictable, hardware and software shouldnt be just a random dice game like so many folks seem to be reporting.

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 10:42 pm

GeoffW123 wrote: However when I boot up my PI I can see it prints out messages saying it is sending out dhcp discover packets to FF:FF:FF etc, port 67, but it never gets an DHCP offer back. :(
I'd try to change

Code: Select all

allow-hotplug wlan0
into

Code: Select all

#allow-hotplug wlan0

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 10:44 pm

GeoffW123 wrote:Incidentally, I did the same thing for choosing a wireless keyboard and mouse, found one that had been reported as working. Same end result, doesnt work for me :(
Do you use a powered hub? Most wireless keyboard/mouse combos use more current than is supplied by the USB ports of the Pi.

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 11:02 pm

Hi
Thanks for the suggestion, but commenting out the hotplug line made no difference.
It still says no DHCP offers received on the wlan0 interface during boot up.

Any more ideas greatly appreciated

Regards Geoff

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 11:05 pm

You didn't say, but you did type
startx
after you logged in, waited for the desktop to come up and then used the WiFi Config utility, didn't you?
Otherwise I'm stuck.

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 11:09 pm

Hi
Its a brand new latest rev board with 512Megs Ram, so I am assuming its got the polyfuses shorted out and I only have wifi dongle and Ethernet cable connected. Also the board is running very stably, no reboots/crashes seen at all yet.
It is just the wifi and the wireless keyboard/mouse that are both refusing to work at all.

Regards Geoff

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Wed Dec 26, 2012 11:14 pm

But there's still an input fuse on the board after the USB micro connector. Could very well be a power issue, especially when using two dongles.

At the start it was very diffcult to get WiFi working until some gurus created the WiFi Config utility on the desktop. Just a few clicks and it works.

If you didn't try that I'd re-image the card (to prevent changes you made will block the WiFi), get a powered hub, connect the Pi with HDMI to a monitor and use the Config utility.

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 12:10 pm

Hi
Thanks for the assistance so far, Just to clarify a few points that I didnt make clear on what I have tried and not tried.

My wireless keyboard and mouse wont work either, so I have not even been trying to use those. That left me the only option of using putty and tightvncServer and get into the Pi, using Ethernet from my PC. That workaround worked fine, like I say the Pi itself seems stable.

So I just have the one small wireless dongle and my ethernet cable plugged in, I have disconnected hdmi too in order to lower the current drain on the power supply just in case it made any difference (it didnt)
Sorry, but I am not going to purchase a powered hub, I have already spent enough on this.I think I should be able to expect the Pi and power supply I have purchased to be able to handle 1 lowish power usb device and an Ethernet wire plugged in.

I tried the console script that folks had been using, that just told me I had got the latest OS and I should use the desktop wireless config util.
So via vnc I tried that, I dont get any adapator listed, status says "could not get status from wpa supplicant" whatever that means ?
If I try to add a network under network management it tells me "Failed to enable network WPA supplicant" configuration"
I dont know what that means, but it sounds suspicious as I was trying to change the interfaces script to enable a WEP type network

Does that give any more clues ? Thanks for any further ideas

Geoff

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 12:27 pm

The only TPLink adapter that is said to work without a hub is the "TL-WN723N (RTL8188SU)" while your dongle says:
GeoffW123 wrote:Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter[/code]
Apparently it's not the exact same one. Often manufacturers will change the inside of such a product (slightly) without changing the name, which is quite irritating. Besides, the poly fuse that is still on the board is said to be not a precision device so the actual power going through might be different between boards.
You don't have an Y-cable by any chance so you can 'backfeed' the Pi, like so (which is possible with rev2 boards as the two other poly fuses are gone). Shown here with a battery:
Image

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 1:16 pm

poing wrote:The only TPLink adapter that is said to work without a hub is the "TL-WN723N (RTL8188SU)" while your dongle says:
GeoffW123 wrote:Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter[/code]
Thanks again for trying to help, but that statement above is not correct. If you look at this site
http://www.savagehomeautomation.com/pro ... dapte.html
It proves it conclusively, there is a dump from lsub that reports the exact same chipset as I am using and multiple photographs of the wifi dongle plugged directly into the PI.

Regards Geoff

alang
Posts: 2
Joined: Sun Aug 05, 2012 9:47 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 1:16 pm

Hi
I think you should try and set your interfaces file back to the original configuration.
The gui wifi setup progam uses the /etc/wpa_supplicant/wpa_supplicant.conf to store the wifi
information even if you are using wep.
I also think you should reboot your PI after you have used the gui wifi setup program.
Is your keyboard/mouse using wifi or bluetooth ?

Hope this is of some help.

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 1:32 pm

OK, but that's about the Edimax EW-7811Un. I happen to have that dongle and can confirm that it works, although it didn't work plugged directly into the rev1 Pi for me IIRC. I didn't try it yet in the 256MB rev2 board that I also have.

Other than a power issue I wouldn't know why it doesn't work with your dongle.

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 1:38 pm

Little postscript on my last post. I have been doing some more reading on the subject

It looks like that the design of the PI hardware is so flakey that even if one manufacturer's dongle with a specific chipset works directly in the PI, then it is not "a given" that a different manufacturers design using the same chipset will also work. I wasnt really anticipating that, so we are both sort of correct.

Anyway having said that, I do have a 2nd piece of evidence that what I am doing should work. The exact part number of the dongle I am using is TL-WN725N. This post here
http://www.raspberrypi.org/phpBB3/viewt ... 29&t=25875 confirms this device works OK plugged directly into the PI.

I still think my problem is a driver/configuration/security problem not a hardware issue.

Regards Geoff

alang
Posts: 2
Joined: Sun Aug 05, 2012 9:47 pm

Re: Need some help with getting WIFI working please

Thu Dec 27, 2012 3:43 pm

Hi Geoff
Don't know if you read my post regarding your problem.
I just tried altering my interfaces file in the same way as you. It killed my wireless.
I'm convinced that you should restore you interfaces to the default.
I'm sure that you can use the wpa supplicant gui program to configure WIFI even if you using WEP.
I also fairlly sure that when you use the gui wpa program with WEP that you need to reboot the PI
to make it all work.

Regards Alan.

marvinudy
Posts: 2
Joined: Fri Dec 28, 2012 4:26 am

Re: Need some help with getting WIFI working please

Fri Dec 28, 2012 4:31 am

Geof,

I had problems getting my wifi to work because it did not accept my router's security code. Eventually, I found that the (@) key and (") key were interchanged. When I used the 'mislinked' key in the security code, the wifi connected.

Best regards,

marvinudy

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Fri Dec 28, 2012 1:25 pm

Hi

Thanks for the help folks, I tried a bunch of alternative config file tweaks, none of which fixed it. In fact seems worse now, as I cant even see it requesting an IP over wifi using DHCP.

My latest tweak is this /etc/network/interfaces

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
/etc/wpa_supplicant/wpa_supplicant.conf (apart from I filled in my real ssid and WEP key0)

Code: Select all

#ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2

#update_config=1

network={
 ssid="MY_SSID_HERE"
 scan_ssid=1
 key_mgmt=NONE
 wep_key0="XXXXXXX"
 wep_key1=0102030405
 wep_key2="1234567890123"
 wep_tx_keyidx=0
 priority=5
}
after booting if I try sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
I get

Code: Select all

rfkill: Cannot open RFKILL control device
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
wlan0: Trying to associate with SSID 'XXXXXXX'
ioctl[SIOCSIWAP]: Operation not permitted
wlan0: Association request to the driver failed
wlan0: Associated with 00:1e:2a:xx:xx:xx
wlan0: CTRL-EVENT-CONNECTED - Connection to 00:1e:2a:xx:xx:xx completed (auth) [id=0 id_str=]
I am all out of ideas here

xberlino
Posts: 4
Joined: Wed Jan 09, 2013 10:17 am

Re: Need some help with getting WIFI working please

Wed Jan 09, 2013 10:20 am

Unluckily,I come up with the same problems as yours,do you find a way out?

GeoffW123
Posts: 11
Joined: Wed Dec 26, 2012 5:50 pm

Re: Need some help with getting WIFI working please

Thu Jan 10, 2013 10:56 pm

Hi

I am an Linux newbie so I havent got the background knowledge to solve this problem. Unfortunately, none of the solution suggestions I received solved the problem.
At least yours not working either proves I wasnt doing anything too stupid. It wasnt an enjoyable first experience with Linux, so its gathering dust in a corner now !

If you ever figure it out, please post the solution here, thanks

Regards Geoff

Wikke
Posts: 7
Joined: Tue Aug 07, 2012 8:45 am

Re: Need some help with getting WIFI working please

Thu Jan 17, 2013 8:04 pm

I have the exact similar isue as GeoffW123
Except that I use the Belkin F7D2102 "N300", which is also supposed to work.

Can it be that it just fails with WEP?

kilobyte
Posts: 1
Joined: Wed Feb 20, 2013 11:23 am

Re: Need some help with getting WIFI working please

Wed Feb 20, 2013 11:25 am

I bought the same dongle, as it was supposed to work with Raspbmc w/o any problems. Unfortunately I'm not able to configure it properly. I used only GUI apps, but maybe there is a way to update a driver from console?

Wikke
Posts: 7
Joined: Tue Aug 07, 2012 8:45 am

Re: Need some help with getting WIFI working please

Mon Mar 04, 2013 8:31 pm

I got mine working now by using the Raspbian Occidentalis 0.2 version of Adafruit:
http://learn.adafruit.com/adafruit-rasp ... s-v0-dot-2

andornot
Posts: 4
Joined: Wed Mar 27, 2013 2:23 pm

Re: Need some help with getting WIFI working please

Wed Mar 27, 2013 2:42 pm

I struggled with the same problem. Searched everywhere and tried every edit to wpa_supplicant.conf and interfaces files. Nothing worked until I clued in to the fact that nobody was using WEP or a hidden SSID. So, to get wifi working with the rtl8188cus chipset dongle, set your router to WPA encryption and reveal your SSID (if it is hidden). In my experience, everything just works if you do this. You can use the wifi config utility on the raspbian desktop to set your parameters. In my case, I did so much messing around with the interfaces and wpa_supplicant.conf files that I simply burned a new raspbian SD card to be sure I hadn't broken anything. But when I started with a clean system, used WPA enryption and broadcasted my SSID, my wifi connected. Oh, one other thing ... my wifi dongle will not work when connected directly to the RPi ... I must use a powered USB hub.

I would like to hear if anyone has actually gotten wifi to work with a hidden SSID and/or WEP encryption. In my experience, it can't be done.

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: Need some help with getting WIFI working please

Wed Mar 27, 2013 4:16 pm

Here seems to be one: http://forum.stmlabs.com/showthread.php?tid=6608

That said, a hidden SSID is something like having a house but not switching on the porch light. If someone is looking the house is still easy to find. Besides there are some security problems that originate in the way devices connect to a hidden SSID. I forgot the essence, but the general idea is that hiding your SSID does not help safety but instead causes security issues.

Return to “Troubleshooting”