gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Yet another wifi problem: D-Link DWA-131

Thu Oct 18, 2012 4:08 pm

Hello everybody!

I bought the wifi dongle mentioned, D-Link DWA-131 based on Realtek 8192su chipset, based on the list of supported devices. WPA supplicant wouldn't work (it would associate then immediately disassociate with the ap) so I installed wicd that, according to the list of supported devices, would work. Well it did... Sort of.

The problem is that wifi association is very very flakey. Wicd can find the network without problem, tries to connect, gets through validation but then it's a real mystery what will happen next. In a few occasions it will connect just fine, maintaining connection for as long as I leave pi turned on, sometimes it will connect then immediately disconnect after 2-3 seconds. Most of the time though, it won't even connect for a second. I've tried a couple of solutions mentioned here, like putting my info straight into the interfaces file, but without result. I'm convinced it's not a problem with power, as I've already tried powered hub, not mentioning that it sometimes works no matter how much I stress the Pi.

DHCP also does not work. All the times that the dongle had connected I had used static ip. Ifup complains about no dhcp offers.

Could please somebody help fix this? I'm willing to provide any info needed. It's really frustrating, because I chose the adapter specifically for its compatibility, I didn't just have it around as a spare. Thank you very much in advance and sorry for the long post.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 6:26 pm

Bump. Sorry for bringing this post up again, but does nobody have a problem similar to mine? Could it be a problem with the r8712u driver? My dmesg log is filled with "r8712u_got_addbareq_event_callback" entries. Each entry comes up exactly after a failure to associate with wicd utility. Anyone willing to help?

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 7:19 pm

I have the same wifi device and it works.it takes a lot of power so you need a good power supply. What is your os and firmware version? What does lsusb say?

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 8:29 pm

Thank you for replying! I'm running Raspbian Wheezy, with 3.2.27 #160 kernel as uname reports. lsusb recognizes my Wifi dongle correctly. I have tried many power supplies, a samsung 700mA, a sony erricsson 850mA, an apple iPad 2.1A, and currently an htc 1A. Wifi is flakey with all of them. I have the 0 ohm resistors revision, so at least I shouldn't have the 140mA per USB limitation.

Do you run your raspberry pi with a powered hub? Or does the wifi run straight from the USB port? I really hope for the latter, as I chose this dongle because it is mentioned as compatible without a powered USB hub :-/

I read in the Rpi troubleshooting wiki, that there used to be a known conflict of some wifi dongles when there is also a keyboard/mouse connected. Could it be this case? I tried powering on the raspberry pi without keyboard, and wifi works! Maybe it's not a power issue, but a conflict, since I can connect a new speedy (and I guess at least as power hungry as a keyboard, if not more) USB flash drive without wifi losing connection.

Any suggestions?

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 8:50 pm

Yes, it is connected directly to the USB on RPi, but I have the same problem, wifi only works when my wireless keyboard. Is not connected!
So basically we are in the same situation and I have ordered a powered hub to get it working with the keyboard.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 9:16 pm

I see... problem is I ordered this dongle specifically to avoid having to use a powered hub. I'm not irrational, I don't expect little raspi to be able to support an army of devices, but I hoped a wifi dongle that is mentioned in the Rpi Wiki as compatible without a powered hub would work, and play nicely with a keyboard. I mean, even a simple keyboard, not a power-sucking hard disk drive!

Could it be possible that there might be a conflict which is not power-related? I'm really curious how this wifi dongle got into the compatibility list (mentioning that no powered hub is needed, as well!). I mean, if the user that tried it out was using it without even a keyboard connected, that's not an adequate test to be in the list. :-/

Could you please inform me what kind of problems your wifi used to present with the keyboard attached? Did it find your network but failed to associate and take ip?

User avatar
Vindicator
Posts: 314
Joined: Sat Sep 17, 2011 11:10 pm
Location: Susanville Ca USA
Contact: Website

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 9:41 pm

I would try it with a powered hub and see if the problem goes away and try a different keyboards like wired ones and see if it helps then try a direct hook up again till you get a combo that works.

What components you want to use together may not necessarily be what is going to work, the power supply is only one part of the equation, the other part is the poly-fuses that are on the boards depending on the board version you have.

Many companies are saying their components work with a Raspberrypi and may not always be true as to attaching directly to your Raspi as they assume you are using the "recommended" powered USB hub to attach their device to your Raspi.
If you are more worried about ,spelling, punctuation or grammar you have probably already missed the point so please just move on.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Sun Oct 21, 2012 9:48 pm

Vindicator wrote:I would try it with a powered hub and see if the problem goes away and try a different keyboards like wired ones and see if it helps then try a direct hook up again till you get a combo that works.

What components you want to use together may not necessarily be what is going to work, the power supply is only one part of the equation, the other part is the poly-fuses that are on the boards depending on the board version you have.

Many companies are saying their components work with a Raspberrypi and may not always be true as to attaching directly to your Raspi as they assume you are using the "recommended" powered USB hub to attach their device to your Raspi.
I understand what you are saying, but still, in the Raspberry Pi wiki
http://elinux.org/RPi_VerifiedPeriphera ... i_Adapters
D-Link DWA-131 is mentioned as compatible and in fact, to quote: "Verified with direct USB : no powered USB hub needed."

This wiki post therefore definitely does not assume a powered hub is needed.
Also, I mentioned in an earlier post that I have the board revision without the polyfuses, but with the 0 ohm resistors, so this shouldn't - hopefully - be a problem.

I'm now updating to latest firmware and crossing fingers - who knows? :-/

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 2:30 am

Yes, I bought mine also based o nthe wiki comments. My raspi reboots when I put both the wifi and wireless keyboard in.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 3:06 am

shuckle wrote:Yes, I bought mine also based o nthe wiki comments. My raspi reboots when I put both the wifi and wireless keyboard in.
Need a powered hub

I think a huge post needs to go in there "The Raspberry Pi's USB ports are intended for low power keyboards and mice anything beyond that may work but a powered hub is needed for peripherals." ;)
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 8:11 am

OK, I now tried this with my other RPi, which is /proc/cpuinfo revision 0004. It is turbo overclocked and works now without any issues with both the wireless keyboard and the DWA-131 Realtek RTL8192SU wifi card directly connected to the RPi USBs.
Another big difference is that this new one is connected to quality 5V power source capable of 3 A current and power is connected directly to GPIO (pin 2 and 6).

I will try to switch the older RPi to the same power source to double check if this really is just a power issue. But I can now confirm that this wifi dongle works directly from RPi USB without issues!

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 10:35 am

Well, I don't want to jinx it, but after upgrading to the latest firmware revision #250, raspi is able to connect to the wifi network while having a keyboard/mouse combo connected as well!

I obviously realize that the pi is not able to power the majority of usb devices, but I honestly don't think this was the case with this particular wifi dongle. It was recognized at all times, never "vanishing" or reappearing like in other cases, was able to scan with all wirelless tools (either gui or terminal - wicd, wpa-gui and wlist come to mind). It was able to connect, authenticate, take IP for 4-5 seconds (in which time I was able to eg ping normally) but then disconnected. Also, signal was fairly good at about 55-60%, so it's not like it was losing signal.

I really think there was a conflict and/or incompatibilty with the attached keyboard via usb, like the one mentioned in the Rpi-wiki Troubleshooting section:
http://elinux.org/R-Pi_Troubleshooting# ... iFi_device

So there used to be a recognised problem with some keyboard/wifi dongle combos. Reports on solving it across the board were mixed, so maybe the latest firmware solved something at a lower level?

In any case, wifi and keyboard seem to be fine now, even after quite a few test-reboots (just to see if the problem would appear again) and stressing the pi! Maybe there is hope after all! :)

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 10:49 am

Just to inform that my older (revision 0003) RPi works also flawlessly when using the good power supply.
$ vcgencmd version
Sep 18 2012 01:45:27
Copyright (c) 2012 Broadcom
version 337601 (release)
$ uname -a
Linux raspberrypi2 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l GNU/Linux


so my problems were strictly power issues and the wiki is correct when it says DWA-131 works. It just needs a good power supply.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 11:03 am

That's very good news! :)

The strange thing is that I haven't changed my power supply. Hmm...

One last thing (sorry for being a pain, I realise I may have tired you :oops: )
What kind of psu do you have? I mean, how can I be sure that I get a good quality power adapter, if I can't really trust neither the brand, nor the specifications written on them?

A big thanks to all of you for your time! :)

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 11:32 am

I took the good one form a broken fat old Sone PS3. It delivers 3 A 5V (and 32A 12V).
I do not think you want to use that...it is kind of big. :D

I am trying to find a working portable power source now when I know that the wifi dongle works....

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 12:08 pm

Heh, yeah that would be bigger than the pi in the case itself :lol:

Although it seems better quality power adapters are a little bigger and heavier.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Mon Oct 22, 2012 12:48 pm

Ok that is very weird. Something might be wrong with the dhcp client/configuration in raspbian. My router's log seems to have given my Raspi both 192.168.1.14 after a dhcp request AND 192.168.1.15 that is the static one I have chosen via wicd.

Here is a system log with some disconnections. BTW this system log is from Raspcontrol, which responds via BOTH 192.168.1.14 AND 192.168.1.15.
Could it be dhcp-specific problem after all? Any ideas?

Code: Select all

Oct 22 15:44:01 raspberrypi dhclient: All rights reserved.
Oct 22 15:44:01 raspberrypi dhclient: For info, please visit https://www.isc.org/software/dhcp/
Oct 22 15:44:01 raspberrypi dhclient: 
Oct 22 15:44:01 raspberrypi dhclient: Listening on LPF/wlan0/28:10:7b:bd:d9:27
Oct 22 15:44:01 raspberrypi dhclient: Sending on   LPF/wlan0/28:10:7b:bd:d9:27
Oct 22 15:44:01 raspberrypi dhclient: Sending on   Socket/fallback
Oct 22 15:44:03 raspberrypi dhclient: DHCPRELEASE on wlan0 to 192.168.1.1 port 67
Oct 22 15:44:03 raspberrypi dhclient: send_packet: Network is unreachable
Oct 22 15:44:03 raspberrypi dhclient: send_packet: please consult README file regarding broadcast address.
Oct 22 15:44:08 raspberrypi ifplugd(wlan0)[1604]: Link beat detected.
Oct 22 15:44:08 raspberrypi ifplugd(wlan0)[1604]: Executing '/etc/ifplugd/ifplugd.action wlan0 up'.
Oct 22 15:44:09 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.2.2
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: Internet Systems Consortium DHCP Client 4.2.2
Oct 22 15:44:09 raspberrypi dhclient: Copyright 2004-2011 Internet Systems Consortium.
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: Copyright 2004-2011 Internet Systems Consortium.
Oct 22 15:44:09 raspberrypi dhclient: All rights reserved.
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: All rights reserved.
Oct 22 15:44:09 raspberrypi dhclient: For info, please visit https://www.isc.org/software/dhcp/
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: For info, please visit https://www.isc.org/software/dhcp/
Oct 22 15:44:09 raspberrypi dhclient: 
Oct 22 15:44:09 raspberrypi dhclient: Listening on LPF/wlan0/28:10:7b:bd:d9:27
Oct 22 15:44:09 raspberrypi dhclient: Sending on   LPF/wlan0/28:10:7b:bd:d9:27
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: Listening on LPF/wlan0/28:10:7b:bd:d9:27
Oct 22 15:44:09 raspberrypi dhclient: Sending on   Socket/fallback
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: Sending on   LPF/wlan0/28:10:7b:bd:d9:27
Oct 22 15:44:09 raspberrypi dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: Sending on   Socket/fallback
Oct 22 15:44:09 raspberrypi ifplugd(wlan0)[1604]: client: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
Oct 22 15:44:15 raspberrypi dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
Oct 22 15:44:15 raspberrypi ifplugd(wlan0)[1604]: client: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
Oct 22 15:44:22 raspberrypi dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
Oct 22 15:44:22 raspberrypi ifplugd(wlan0)[1604]: client: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
Oct 22 15:44:28 raspberrypi kernel: [ 2610.158282] r8712u: [r8712_got_addbareq_event_callback] mac = 20:4e:7f:8b:49:c2, seq = 0, tid = 0
Oct 22 15:44:30 raspberrypi dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
Oct 22 15:44:30 raspberrypi ifplugd(wlan0)[1604]: client: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
Oct 22 15:44:30 raspberrypi dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Oct 22 15:44:30 raspberrypi ifplugd(wlan0)[1604]: client: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Oct 22 15:44:30 raspberrypi dhclient: DHCPOFFER from 192.168.1.1
Oct 22 15:44:30 raspberrypi ifplugd(wlan0)[1604]: client: DHCPOFFER from 192.168.1.1
Oct 22 15:44:30 raspberrypi dhclient: DHCPACK from 192.168.1.1
Oct 22 15:44:30 raspberrypi ifplugd(wlan0)[1604]: client: DHCPACK from 192.168.1.1
Oct 22 15:44:30 raspberrypi ntpd[2045]: Listen normally on 14 wlan0 192.168.1.15 UDP 123
Oct 22 15:44:31 raspberrypi ntpd[2045]: peers refreshed
Oct 22 15:44:31 raspberrypi ifplugd(wlan0)[1604]: client: Reloading /etc/samba/smb.conf: smbd only.
Oct 22 15:44:32 raspberrypi dhclient: bound to 192.168.1.14 -- renewal in 35048 seconds.
Oct 22 15:44:32 raspberrypi ifplugd(wlan0)[1604]: client: bound to 192.168.1.14 -- renewal in 35048 seconds.
Oct 22 15:44:33 raspberrypi ifplugd(wlan0)[1604]: Program executed successfully.
Oct 22 15:44:33 raspberrypi kernel: [ 2614.486839] r8712u: [r8712_got_addbareq_event_callback] mac = 20:4e:7f:8b:49:c2, seq = 0, tid = 1
Oct 22 15:44:33 raspberrypi ntpd[2045]: Listen normally on 15 wlan0 192.168.1.14 UDP 123
Oct 22 15:44:33 raspberrypi ntpd[2045]: peers refreshed

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Tue Oct 23, 2012 9:59 pm

Well after many tries, I don't seem to be getting anywhere. I've measured my TP1 and TP2 voltage, and it's about 4,50-4,65V while wifi is connected. That alone is below the minimum voltage that the pi needs for trouble-free operation.

The thing is, I have tried 2 older wifi dongles, one TP-Link TL-WN321G that worked out of the box, and a Belkin F5D7050 that worked with a little tinkering, and both of them run perfectly fine! Voltage is about 4,4-4,5 with either connected, but still, they connect to the access point immediately without any errors and without losing connection! The pi doesn't seem to have any strange behavior either.

Now, obviously 4,5V is way too low, and I'm not saying that no problems may rise at a point. Just saying that maybe r8712u driver (for RTL-8192SU chipset, among others) is still very dodgy, since both the other dongles seem very contend with what they have, whereas D-Link has disconnections. Do you know if there is a newer compiled version of the driver than the one currently shipped with Raspbian? I've downloaded the latest from Realtek here http://www.realtek.com/downloads/downlo ... loads=true but I wasn't able to compile it :-/ Has anyone already tried it out?

Thank you very much in advance

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: Yet another wifi problem: D-Link DWA-131

Wed Oct 24, 2012 7:36 am

Just to add that I failed to create an adhic connection with DWA-131. Has anybody dione that successfully.
Also iwconfig shows:
wlan0 IEEE 802.11bg ESSID:"Pi" Nickname:"rtl_wifi"
Mode:Ad-Hoc Cell: 02:11:87:CD:EC:01 Bit Rate:54 Mb/s
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Even though this is supposedot be n level wifi dongle. I think somebody should tremove the recommendation from http://elinux.org/RPi_VerifiedPeripherals as this is not workign as well as informed.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: Yet another wifi problem: D-Link DWA-131

Wed Oct 24, 2012 10:07 am

+1 here. It is a very good wifi dongle in a Windows environment, but has many problems in Raspbian/Pi. Hopefully they will get resolved as the driver matures (since the module is still a staging module, not a stable one) but until then, it's a pretty buggy dongle. :(

Return to “Troubleshooting”