Wireless strength investigations

Everything relating to hacking, expanding and modifying the Joggler hardware.
Post Reply
caliston
Posts: 4
Joined: Wed Jan 04, 2012 8:11 pm

Wireless strength investigations

Post by caliston »

I've been doing some investigation into the issues many people have been having with wifi strength on the Joggler, so thought others might be interested in a report of progress...

First, a bit of background. I have a standard Joggler and, like many people, the Joggler is the only device that has difficulty getting sufficient wifi signal. I'm using it running Android (Froyo) release 1.2.3

My router is a homemade affair, being an ancient Pentium 75MHz PC with a 3G dongle for WAN connection, and an old Netgear MA311 Prism2.5 PCI wifi card to do wifi. The Netgear card only does 802.11b and I'm not sure the motherboard would support a newer card (PCI voltage issues). The router runs WEP (not sure if this hardware can do WPA).

Anyway, the Joggler is several rooms away and at first attempt resolutely failed to find any signal at all. It would work in the same room as the router just fine.

The standard advice for Joggler wifi problems is to change wifi channels. I tried 1, 6 and 13 (most of the neighbours being on 11) but this had no noticeable effect. I also tried a foil-covered sieve as a 'woktenna' at the router's antenna to try to focus the wifi... it could detect the signal, but always failed to connect.

I then tried to get iwconfig onto the joggler, but couldn't manage to build enough of Android to build it (a few apps in the Market have it included, but those are ARM not x86 versions). Eventually I managed to build a Debian chroot and install the Debian wireless-tools package into there.

When I finally got Debian's iwconfig running in Android, it told me that the SNR was pretty good (at least 10dB) but signal quality was poor (eg 55/100). Then I tried dropping the wifi rate on the router from 11Mbps to 1Mbps (not a problem as upstream is barely more than 1Mbps anyway). The signal quality jumped up to about 94/100. And now I can get connections some of the time... wifi will connect, work for a few minutes, then disappear for a while, then come back.

Android uses the rt2870sta driver... iwpriv suggests there are no private settings that the driver will allow me to change (despite the documentation saying otherwise). When I built the router, I found that setting txpower to 20dBm (ie 100mW) made a big difference... but no such settings here.

So I started a little detective work. From the MAC address I figured out that the wifi card in the Joggler is a SparkLAN WUBR-125GN (datasheet here)

The datasheet is very interesting, because it answers some questions. First, there's a 4 pin header next to the USB connector... this is also USB, but simply an alternative connection instead of the USB plug in an embedded system. So not useful for much. Also, there's a header for what looks like a switch for Wifi Protected Setup (WPS)... but this may be simply a GPIO input to signal to the driver so it may not do WPS without extra software.

But more interesting are the radio stats... the receiver sensitivity is -64 dBm in 802.11n mode, -75 dBm in 802.11g mode and -87 dBm in 802.11b mode. That means the device can cope with a signal 200x weaker in B mode than in N mode. So dropping to an older standard should improve the reception. Also the transmit power is fractionally more in B mode.

The RF chip is an RT2720... which I've failed to find out much about. The main wifi chip is an RT2770. One possible replacement wifi card is the Linksys WUSB100-RM, which uses the same chip.

The card has two wifi antenna sockets in IPX otherwise known as UFL format. These go to two Airgain N2420 antennas. These are surprisingly good... gain of 3.8dBi. From what I can gather, a conventional antenna on the back of a router has a gain of about 2dBi.

One option I'm considering is fitting some external antennas. There are some on eBay which are carrier boards for mini PCI or PCIe wifi cards and include pigtails for UFL to reverse-SMA (ie PC backplate) connectors, plus router-style antennas to screw onto the reverse-SMA connector. It could be that proximity to other hardware is causing poor reception so moving the antennas could help. From pictures (I haven't opened my Joggler) it appears there's some space on the back panel where holes could be drilled for antenna connectors.

I also explored wireless drivers in Android. The Android driver is Ralink's rt2870sta, which uses a firmware file in /lib/firmware/rt2870sta.bin. This appears to be the latest firmware listed on Ralink's website. I tried copying over a different firmware file from Debian sid (package firmware-ralink): didn't seem to make much difference.

I also grabbed the 2.6.35 Android kernel source code and compiled up kernel modules for the rt2x00 driver, which is a newer replacement for the rt2870sta. I managed to get it to load the kernel modules (rt2x00lib.ko, rt2x00usb.ko, rt2800lib.ko, rt2800usb.ko), and got a connection through these, but didn't seem to make any difference to the wifi performance. This driver does provide some more iwpriv settings (txpower, etc), but they're at the optimal settings by default so nothing useful here. It seems to be misreporting signal strength - always says quality of 70/70 and signal strength of about +54dBm (ie 250W, the power of a TV transmitter for a small town) so it's difficult to compare RF performance.

One experience I've had with Android's 3G on my phone is that Android's signal bars are a lot more pessimistic than the Nokia phone I was comparing with. Same network, same SIM card, and the radio on each phone reports the same signal strength (in dBm), but the Android phone would show something like 40% while Nokia showed 60%. So that might be a contributory effect to poor wireless performance (but clearly not the whole story).

So I still don't have a solution for the poor wifi performance, and I've explored quite a few options. I won't be able to experiment with external antennas for some months, but hopefully someone else can give it a go.
User avatar
lamb.chop
Posts: 24
Joined: Tue Nov 29, 2011 9:11 pm
Location: Warwick UK

Re: Wireless strength investigations

Post by lamb.chop »

I mounted an external PC style antenna on the Left Hand Side of my Joggler, there used to be instructions on this in the old Wiki.info site.

Good work tracking down the datasheet btw! Top Job.
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: Wireless strength investigations

Post by gegs »

Is it possible to force the Joggler to connect using B or G mode if the router is set to hybrid b+g+n mode? Or is the only possible solution to change the router mode to B or G only?
caliston
Posts: 4
Joined: Wed Jan 04, 2012 8:11 pm

Re: Wireless strength investigations

Post by caliston »

You can turn down the rate if you have iwconfig on whatever OS you're using:
iwconfig wlan0 rate 22M
to set to 22Mbps, for example. If you run 'iwlist wlan0 scanning' it'll show you all the rates supported on your router. (your OS might call the network device something other than wlan0). Since B has a different signalling format from G/N, I think you'd have to set the router to B mode explicitly to get that (and everything else would also use B too).
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: Wireless strength investigations

Post by gegs »

caliston wrote:... I think you'd have to set the router to B mode explicitly to get that (and everything else would also use B too) ...
Thanks for the reply; that's what I was worried about.

My router has a hybrid b+g+n setting. I was hoping that it could connect to devices that identify themselves as B or G using those protocols but continue to connect to N devices using the N protocol. My router is a TP-Link TD-W8961NB http://bit.ly/zlFwC6

N appears to be better for streaming video to my Apple TV2 and Xbox 360 so I wouldn't like to disable it. However, Joggler stability improvements would be very welcome due to increasing family usage of Squeezeplay (serving from the kitchen Joggler to another connected to my sitting room AV amp).

Would you suggest dropping to G as a compromise?
caliston
Posts: 4
Joined: Wed Jan 04, 2012 8:11 pm

Re: Wireless strength investigations

Post by caliston »

If the router is clever enough to do B+G+N at the same time (which it might, especially if it has two radios or does some cunning fast mode switching -- I'm completely guessing how that might work) you might just need to reduce the rate on the Joggler. 11dBm extra (ie 12.6 times more gain) to drop from N to G is certainly worth having, so I'd suggest giving that a try too.
gegs
Posts: 1146
Joined: Fri Mar 04, 2011 3:22 pm
Location: Edinburgh

Re: Wireless strength investigations

Post by gegs »

Thanks very much for your help. My router also has a B+G setting so I'll try that first.

I have to say that N is proving troublesome in certain areas. Any gain I've had in range has been offset by less stability across devices and complete incompatibility with others (Nintendo Wii for example). My advice to anybody running a satisfactory system using a G router is to think twice before "upgrading" to N.
caliston
Posts: 4
Joined: Wed Jan 04, 2012 8:11 pm

Re: Wireless strength investigations

Post by caliston »

I've been playing a bit more... seemingly I've improved my connection by increasing the router sensitivity:
iwconfig wlan0 sens 3
(it was 1 previously). '3' is a value that depends on the particular wifi card you have - mine accepts 1, 2 and 3 only. Other cards may take other settings - the man page also says that negative numbers are settings in dBm. I haven't tried adjusting this at the Joggler end.

This agrees with my experiences that the Joggler could see the router fine, but the router never heard the Joggler trying to get an IP address. The Joggler would display that there was a valid network to connect to, but never succeed.
User avatar
Mevi
Posts: 774
Joined: Tue Oct 25, 2011 4:39 pm

Re: Wireless strength investigations

Post by Mevi »

I've had different behaviour out of different Jogglers, some showing no wifi sources found at all (under windows), neither our router nor the neighbours'.

I've considered a pair of eBay antennas. Case mount ones that terminate with the same connectors as the Airgain ones. I wondered whether the 4 plate through holes were for USB. That gives me a few more options for relocating the WLAN. I found a netgear router amongst my IT graveyard in the garage, to give me room for a few more active WIFI devices at home.
I've Got The Moves Like Joggler

Windows XP Professional SP3 plus Tablet PC for O2 Joggler
http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=305

How to build your own Windows XP for the Joggler
http://www.jogglerwiki.com/wiki/WindowsXP
LokisSword
Posts: 7
Joined: Sat Sep 24, 2011 10:07 pm

Re: Wireless strength investigations

Post by LokisSword »

If you have a supported Netgear router you could load DD-WRT or one of the other custom firmwares that enable you to run the router as a bridge to your existing router. You could then run the Joggler off one of the wired ports. I've had to do this to get a decent signal for the kids PC due to the seemingly inpenetrable walls in this house.
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Wireless strength investigations

Post by pete »

I'm currently utilizing one of these in the attic of my home:

http://ubnt.com/nanostationm

I also have a Linksys and a Buffalo AP with DDWRT on them.

I had very similiar issues with the integrated wireless NIC / antenna in the Chumby (ch rooted).

When I tested the wireless connectivity to the Joggler (Linux Ubuntu / XP builds) I found occassional odd drops to the wireless network depending on where the Joggler was sitting.

I just related these drops to just RF propagation in the house (that's full of all kinds wireless this and that).

I would be interested with your suggestions of an external antenna or new USB WLAN dongle. I went to using a USB to NIC device on the Chumbys and am testing a couple of different ones now for the Joggler.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
Mevi
Posts: 774
Joined: Tue Oct 25, 2011 4:39 pm

Re: Wireless strength investigations

Post by Mevi »

I hadn't thought of changing the firmware, I'll check if it's compatible. My main problem is that we have 8 or more wifi devices in use most of the time and getting a connection is often a case of first come first served. I may just have a second wifi network just for the kids.
I've Got The Moves Like Joggler

Windows XP Professional SP3 plus Tablet PC for O2 Joggler
http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=305

How to build your own Windows XP for the Joggler
http://www.jogglerwiki.com/wiki/WindowsXP
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: Wireless strength investigations

Post by pete »

The DD-WRT firmware / OS is very flexible. If you get a dual radio AP then you can define what you want to utilize and how. QOS is part of the OS. You can push the RF power on the DD-WRT enabled hardware to its limits. Typically an over the counter AP generates about 30 Mw. The default for DD-WRT is 70 Mw and I would keep mine at 100Mw. Over the 100 Mw point then you can overheat and just mostly generate noise. Best is a combination of a high gain omni-directional antenna combination with DD-WRT.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
Post Reply