Wireless strength investigations
Posted: Wed Jan 04, 2012 8:59 pm
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.
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.