leJOS has always allowed you to use WiFi adapters other then the original Lego supported Netgear device. In the post 0.9.0 release of leJOS we have improved things further updating drivers and adding new ones. This means there is now an even wider choice of devices. In this article I compare 5 nano adapters against the original device. First let’s take a look at each device.
This is the officially support WiFi device. It uses the Atheros AR9271 chipset. The cost is approximately £10. Works well, but is much larger than the other devices shown here. Only choice if you want to use the unmodified LEGO firmware.
DIGITAZZ 150MBPS WIRELESS ADAPTOR
This is a low cost “nano” adapter (though not as small as the others). It uses the Ralink RT 5370 chipset and the cost is approximately £5.
The Pi Hut USB Wi-Fi Adapter for Raspberry Pi
A “nano” adaptor sold specifically for use with the rPi. Cost is approximately £6. It uses the Ralink RT5370 chipset.
CSL – USB Wlan (WiFi) for PC / Raspberry Pi
Another “nano” adaptor aimed at the rPi market. This uses the Realtek 8188cu chipset. Cost is approximately £6.
TP-LINK TL-WN725N 150Mbps Wireless-N Nano USB Adapter
This “nano” adapter comes in two revisions, but rather unhelpfully they both have the same model number despite using different chip sets. The version 2 device tested here uses the Realtek 8188eu chipset. Cost is approximately £6.
Edimax EW-7811UN 150Mbps Wireless Nano
This was the first additional device support by leJOS. It uses the Realtek 8188cus chipset and costs approximately £7.
To compare the various devices I ran a couple of tests on each one. The first was a simple continuous ping test from my PC. With the ping running I moved the EV3 (complete with dongle) around to various different locations. For most of the dongles the location made virtually no difference to the ping results. However the DIGITAZZ, Pi Hut and TP-Link devices all suffered from a number of dead spots in certain locations. These locations where only a few metres from my WiFi Router (A D-Link DIR-665). I ran this test a number of times with all of the dongles and it was easily repeatable. I’m not sure why the three had problems, perhaps this indicates an issue with the antenna design used, or some incompatibility with my router, whatever the problem it did not seem to trouble the other four devices.
The second test used a small Java program to simulate various different types of network I/O. The program ran four tests:
- A simple command response test, sending a 16 byte command packet and waiting for a 4 byte response.
- A larger data/response test sending 1024 bytes of data and again waiting for 4 byte response.
- A simple streaming data test with a write size of 1024 bytes.
- A streaming test using larger 64Kb packets
In each case the test was run for a period of 30 seconds and the data rate for the test computed. Each test was repeated 3 times and the median result used. The four tests were run in both directions (from PC to EV3, from EV3 to PC). Finally as a comparison I ran the tests using my PC and Ultrabook. The results are presented below, all figures are in Kb/S:
|From PC to EV3||From EV3 to PC|
So which is best?
None of the dongles tested is perfect. The good news is that none of them is expensive and offer remarkable value compared to just a few years ago. The Netgear while providing good performance is just too big to realistically use on a mobile robot. The TP-Link device is fast, but the dead spot issues just make it too inconsistent. The Pi Hut is just too slow for the typical usage of command/response. The Digitazz is slow and has similar deadspot issues to the TP-Link. This leaves the Edimax and CSL devices which both offer a similar level of performance. TheEdimax device is slightly smaller, but it also seems to be rather fragile, on both of my devices, part of the plastic cover has broken away.
If the deadspot issue could be resolved the TP-Link device would be my first choice, it is small, performs well and seems well made, but in my usage it has just been too inconsistent. Choosing between CSL and Edimax dongles is not easy. But overall the Edimax device has been very stable over many, many months of use so I think at this stage this would be the one I would pick.
These results are based on using an as yet unreleased version of leJOS (post 0.9.0), although many of these devices may work with 0.9.0 I have used updated (and in the case of the TP-Link a totally new) driver. My tests are based upon using the WiFi router detailed above. With other routers the results may vary. As mentioned above the TP-Link device comes in two versions which use different chipsets but which have identical names/model numbers. This is not at all uncommon, so if you buy one of the above devices and it does not work, then it could be that the manufacturer has changed the chips it uses. If you see problems with any of these devices (or you have different results to share), please post on the leJOS forum.