WiFi mysteries resolved once and for all — Power saving is clearly the culprit!


Maybe the Pandora WiFi chip is the "weak child in the neighborhood", which cannot establish itself with too much nearby traffic, copes badly with collisions?


Can I read the number of packet collisions anywhere, to see wether that theory holds, wether there is a correlation?
I don't think so - I've successfully used my Pandora's Wifi on the last Chaos Communication Congress in a room with 2000 people (probably at least a third of them with some active wireless gadget) and maybe a dozen managed access points in range. Also had no problem downloading the new Libreoffice PND recently, for example - although I didn't really look at the transmission rate.
 
ED is right. It is just enabling the usb host. No other action required.


The Pandora will automatically connect to wifi then. No need for another toggle or anything.
 
So I quickly built iperf on the Pandora and ran it as server with a client on a Windows box for 10 minutes (both on the same WLAN), getting this:

> iperf -c 192.168.0.108 -p 10000 -t 600 -P 4

[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-601.0 sec  32.0 MBytes   447 Kbits/sec
[  5]  0.0-601.7 sec  31.2 MBytes   436 Kbits/sec
[  6]  0.0-601.7 sec  35.5 MBytes   495 Kbits/sec
[  3]  0.0-605.5 sec  31.0 MBytes   429 Kbits/sec
[sUM]  0.0-605.5 sec   130 MBytes  1.80 Mbits/sec


That's worse than I thought, I have to say... Doesn't feel all that slow when working with the machine.

With my wired USB LAN adapter on the Pandora, I get around 67 Mbits/sec, so it's not the OS or IP stack as such...
 
Ok, traced an iperf run with tcpdump on both sides - a cursory look at the data suggests that there is some corruption going on while receiving data on the Pandora - I see lots of packets with a wrong tcp checksum and some packet loss - and consequently retransmits, which slow down tcp significantly.

[edit] see below, wrong conclusion
 
Last edited by a moderator:
2) a ) Thanks for clarifying that USB-WiFi is fully automatic plug'n'play. Even more promising now. Already ordered the dongle.

b ) Does unplugging cause any freezes/crashes or is it simply a loss of the network connection. On re-entering the USB WiFi adapter, do apps automatically resume their internet connection? (As reported, if Chrome is started with the internal WiFi off, and you later activate it, Chrome cannot see that new gained conection. You need to restart Chrome, for it to realize its new gained connection.)

1) Nevertheless, I still want to help finding out why internal WiFi is troublesome on quite many Pandoras.

@Galaxis: If it is not the OS or IP stack, then it must be the specific link, must be WiFi, this is what you suggest, right?

What could I do to test for transfer data corruption? I installed iperf via fink on my Mac OS X machine. Is it installed on the Pandora?

@WizardStan: How could I test for antenna issues on my Pandora? Must I hold it in a certain position, relative angle to the router's antenna? Or do you speak about the metal tape issue, as some reported. 
 
I never had a crash when removing and reconnecting the wifidongle.


I think the behaviour of apps depends on the app and not on the connection, but I could be wrong.


If you replug the dongle, the connection should get picked up again.
 
If I remember well (I should try again) I had a crash while disabling the USB HOST while the connection was still on, but I had no problems removing the dongle (even with active connection) from the USB host while stil enabled
 
Last edited by a moderator:
@Galaxis: If it is not the OS or IP stack, then it must be the specific link, must be WiFi, this is what you suggest, right?


What could I do to test for transfer data corruption? I installed iperf via fink on my Mac OS X machine. Is it installed on the Pandora?
Don't know if it's in Angstrom, but I can upload an iperf binary when I'm back home tonight.

The Wireshark package from the repo can be used to trace and analyze traffic, and it also contains a tshark binary to capture traffic from the command line - but that probably needs some basic tcp/ip knowhow. (Also, there are some minor roadblocks like tcp checksum verification being disabled by default in Wireshark, and the configuration dialogs are really made for a bigger screen - plus I didn't have the time to look at my data properly last evening, so there may be other reasons why I've seen those errors, for example because I didn't capture complete frames and Wireshark couldn't compute checksums.)


Anyways, I have a couple of ideas for further tests that might help to pin down if the problem is actually on the wireless side, or if it's maybe something between wireless controller, firmware, and the Linux driver.
 
Last edited by a moderator:
@ PowerGod & McObit: Thanks for sharing your experiences with USB WiFi.

@ Galaxis: Looking forward to read your final findings here.
 
plus I didn't have the time to look at my data properly last evening, so there may be other reasons why I've seen those errors, for example because I didn't capture complete frames and Wireshark couldn't compute checksums.)
And yay, I fully borked that one: All the checksum errors in my capture file from the Pandora are on *sent* packets - so it seems the driver actually does tcp checksum offloading?

Another failed attempt at nailing down the problem to add to the list...
 
Last edited by a moderator:
iperf for the Pandora is here: http://web.gxis.de/temp/filepile/iperf.pandora - you'll have to trust me it's not a keylogging trojan that deletes all your Super Geometry Dust scores...

Just drop somewhere, open a Terminal, go to download directory, mv iperf.pandora iperf ; chmod a+rx iperf ; ./iperf -h

That's good old iperf2, so binaries for other systems and documentation can be found at http://iperf.fr/
 
Last edited by a moderator:
@WizardStan: How could I test for antenna issues on my Pandora? Must I hold it in a certain position, relative angle to the router's antenna? Or do you speak about the metal tape issue, as some reported.
Remove the back plate, disconnect the antenna cable, connect a different antenna. It's a standard connector type, you should be able to find something.I have absolutely no solid evidence to back this idea up, keep in mind, just a hypothesis I have no way of testing. The antenna is the first point of failure and seems to me the most likely place for variation to occur, which would explain why some people never have any trouble while others get regular massive dropped packets.

If ED says he's tried some bad ones with a professional antenna though, then I guess my hypothesis doesn't really carry any weight.
 
Was not really in a mood to do something useful tonight - so went hunting wl1251 firmware files. I actually found just four versions:

6.0.4.235 (Pandora)

6.0.4.40 (OpenMoko)

4.0.4.3.7 (MeeGo)

4.0.4.3.5 (G1)

Of those, the MeeGo version seemed to work best (relatively spoken) - iperf test over 10 minutes averaged about 2.7Mbit/s instead of 1.8Mbit/s with the Pandora firmware.

Downloaded from: https://build.pub.meego.com/package/files?package=ti-wl1251-firmware&project=CE%3AAdaptation%3AN900

Also stumbled over this on the Maemo wiki, rough pseudocode for what wl1251-cal seems to be doing - maybe some useful info for notaz (although I think all that just describes some fiddling around to set the regulatory domain for the firmware)
 
Last edited by a moderator:
@ED & @Askarus: Today I tested my Pandora with the router FRITZ!Box Fon WLAN 7113 Annex A, as you said you had tested my 3rd shipped Pandora with a Fritzbox router and it worked fine.

Test result: It worked as bad as usual :(  . I tried both with the normal driver and the special driver mode with neelix's calibration profile both results were disappointing. Starting at around 50 KB/sec, dropping to NULL within ~30sec. One more interesting thing: I attempted to disable powersaving in the special driver mode (NVS profile from file), but it failed with an error message. Thus I unloaded the driver, and loaded the driver normally again. I disabled powersaving. And also without powersaving I had the same bad results on the Fritzbox. Which is strange, as without powersaving I could always reliably reproduce 500-600 KB on my router at home. (Just tried now

Really really confusing all of this. Maybe the driver un/re-loaded with some side effects and I should have rebooted inbetween. From my tests from January 2013 I also remember that the command "…power off" did not take effect immediately, but only after about 5-20secs. Connections before that timeframe seem to have used "power on", until the change took effect. So in retrospect this test was not thoroughly enough for this sensitive matter. I may not get that chance all too soon again, as this my friend leaves his home for a few weeks now. But however, it nevertheless shows one thing clearly: Pandora WiFi is not trouble-free even on your forementioned FritzBox.

Just tried power on|off at home (D-Link DI-524)

@WizardStan: Maybe your antenna suspicions are true after all. (loose contact…?)

But again. In the past the connection between powersaving on|off and the speed was statistically too significant to be not causally connected.

But it could be a mix of both, with powersaving off maybe overcoming the antenna problem ("just little bit above the critical treshold").

Maybe the unit worked fine at OpenPandora Gmbh, and a possibly shaky post transport loosened the antenna???

@ED: If I check my antenna as WizardStan describes, do I violate my warranty?

(I am not in the mood, sending in my Pandora a 3rd time, waiting for it a 4th time, and the post transport possibly causing another "loose contact")

@All: I had put so much effort into troubleshooting this WiFi beast.

If it was for my own good only, I'd simply have bought that USB WiFi adapter for 10 EUR after one day of failing and have my peace.

But it was my hacker pride at stake, my tinkering curiosity, which drove me so far… ;)   … the hope to become the community's hero for solving the WiFi issue.

I really think I have reached a dead end software-wise:

  • my initial attempts with various systematic trial and error and observations,
  • various routers & network configurations (channels, encryptions, etc),
  • powersaving on/off,
  • loading various alternative calibration files (this is really very low level stuff already…)
My last attempt would be to dismantle my Pandora and check wether the antenna is properly connected & positioned and for the metal tape issue. But I need clarification concerning warranty first. (ED: You can also contact my via PM/email).

I have run out of ideas. Any other ideas, what I could test for or try?
 
Hey, I hope you will find the light at the end of the tunnel, I also tested my Pandora for many hours months ago, but you have a lot of patience more than me about the argument, and I started working to other projects (maybe too much)...

I found my working solution disabling wifi in my PC and using an ethernet cable instead, in this way I have no problems at all using the Pandora wifi, and the situation became better after adding the power off command where notaz pointed out http://boards.openpandora.org/index.php/topic/11416-wifi-mysteries-resolved-once-and-for-all-—-power-saving-is-clearly-the-culprit/?view=findpost&p=235463... but my PC is a notebook, and it's very sad not to be able to move it freely around the house...
 
Last edited by a moderator:
Ah mean you that the Cable is gone from the Wlan Connector from the Board?

PandoraWlanPort.jpg


That can be,by the way,maybe another Wlan Antenna work fine?

One of my Ideas was to make a external Wlan Antenna Connector on the Case

for using bigger external Antennas on this Port.

I think you dont lost your Warranty when open the Device,but thinking is not knowing ;)
 
Last edited by a moderator:
I found my working solution disabling wifi in my PC and using an ethernet cable instead, in this way I have no problems at all using the Pandora wifi, and the situation became better after adding the power off command where notaz pointed out but my PC is a notebook, and it's very sad not to be able to move it freely around the house...
1) In my tests, I had no other clients connected to my networks (my family's laptops switched off), nevertheless ran into problems. Maybe the smartphones were tuned in. Will try this! Maybe a source for troubles.

2) But what I cannot change is, that I am in a very urban place, with loads of neighboring WiFi networks.
 
Back
Top