you're reading...
Connecting robots, leJOS Features

PAN Performance


In this article we will take a look at how well connections made via the PAN work and see how Bluetooth, USB and WiFi compare. The test setup makes use of 4 EV3s (thanks to the LEGO folks for making this possible), plus a PC. One of the EV3s is configured as an access point, the remaining three EV3s and the PC are clients. The actual network tests make use of the same program I used to compare a number of WiFi adapters in an earlier post (see: Comparing WiFi Adapters). This basically simulates a number of connection types, both simple send/ack type protocols and streaming data with different buffer sizes. One difference with these tests is that we need to also check the impact on performance that the topology of the network has. To understand this take a look at the following diagram.


This diagram shows a number of EV3s some connected using Bluetooth, some with USB. Let’s take a closer look at how the data actually travels around the PAN. For the device labelled as EV5 to talk to the access point there is a single Bluetooth “hop”, similarly for EV3 to the access point a single USB hop is used. However for EV4 to talk to EV5 requires 2 Bluetooth hops and for EV1 to talk to the access point requires 3 USB hops. If the PC is connected via USB then a PC to EV1 connection requires 4 USB hops.

Note that for Bluetooth connections the data will always travel via the access point and the maximum hop count will be 2, however USB data does not need to travel via the access point (so EV1 to EV2 is just one hop). All of the routing required is performed automatically by the Linux networking stack (assuming things are configured correctly), the application programs do not need to get involved. One of the things the following tests do is to examine what impact on performance these extra hops require.

WiFi  RPC  1024+Ack  1024  64K
PC to EV3 4.11 93.05 685.80 687.25
PC to AP 1.14 30.12 102.13 105.75
PC to EV3 (2 hops) 0.34 9.45 63.28 67.15
EV3 to AP (1 hop) 0.79 21.39 111.45 111.54
EV3 to EV3 (2 hops) 0.33 10.26 79.83 80.32
PC to AP (1 hop) 16.12 535.35 1457.15 2047.97
EV3 to AP (1 hop) 8.59 206.12 664.19 676.36
EV3 to AP (2 hops) 5.40 113.40 494.18 498.00
EV3 to AP (3 hops) 4.25 86.23 491.59 489.36
PC to EV3 (4 hops) 4.43 90.22 465.01 448.65

As we can see Bluetooth is not very fast, particularly when using small packets and a send/ack type of protocol with two hops. As the packet size increases things get better and if we can avoid having to send a reply then the data rates become pretty usable. USB can be very fast. The additional hops slow things down, but perhaps not as much as expect, with a USB connection comparing well to WiFi even with 3 hops. The downside of USB is the wiring, take a look at the picture at the start of this article, building robots is often an exercise in cable management and with USB things step up a level! Still we have lots of options, remember that with the Access Point+ mode we can mix all three modes of operation, perhaps using USB and Bluetooth within a robot and WiFi to talk back to a PC used for debugging and monitoring.

During all of this testing my favourite sight was this one:


Four EV3s all connected together and waiting to be used! In the next article in this series I’ll take a look at starting to get these devices to work together!

Articles in this series:
New communication modes allow your EV3s to talk
PAN Configuration
PAN Performance



2 thoughts on “PAN Performance

  1. Hi, the diagram would be more readable, if there would exist a legend about the meaning of the numbers. Beside that, great article

    Posted by Chris | 2015/04/06, 10:33
    • Hi, I’m not sure which numbers you think need more explanation? If it is the actual tests then as noted in the article the tests are the same as used in the previous WiFi aticle (a link to that article is provided), that article provides details of the individual tests.

      Posted by gloomyandy | 2015/04/06, 10:39

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

About leJOS News

leJOS News keeps you up-to-date with leJOS. It features latest news, explains cool features, shows advanced techniques and highlights amazing projects. Be sure to subscribe to leJOS News and never miss an article again. Best of all, subscription is free!
Follow leJOS News on WordPress.com
%d bloggers like this: