Introduction: How to Measure Arduino Network Performance
When I prepare a IoT project with Arduino & Ethernet shield.
I want to know a network performance data of Aruidno to check a bandwidth budget for new IoT Project.
And, I discoverd Arduino site, google and so on to get a data.
But there was no cool, nice answer for me.
So... I decide to check arduino network performance by myself.
and I think that there are many who want to check network performance by oneself.
Just follow me, then you can check your arduino network performance.
We will use a "Iperf" tool to measure network performance. Refer below link to know about "Iperf" and "how to install ipert"
Step 1: Materials & Connections
1. Arduino & Ethernet shield
* Arduino Uno & WIZ550io (available direct from WIZnet)
It will be a Iperf Server.
* My PC (which is installed any Windows)
It will be a a Iperf Client and check network performance.
3. Network switch
* 3Com Gigabit Switch
It connects Computer and Arduino together on a network.
Picture show the meterials and environment for network performance test.
Step 2: Update Arduino Ethernet Shield for Wiz550io
We will use a Arduino and ethernet shield as a "Iperf server"
There are many arduino eithernet shield and I have several ethernet shield. I decide to use a wiz550io as a Arduino ethernet shield because it is a newest ethernet shield of Wiznet and have a more good network performance than original one.
Most of all, we have to update Ethernet Library to use a wiz550io for Arduino ethernet shield.
1. Download the WIZnet Ethernet Library
There is a "Download ZIP" which downloads everything in one neat little file.
2. Copy the Ethernet folder into the Arduino Libraries folder. (Override built-in ethernet library)
[note] There are two versions of the Ethernet folder, depending on the version of your Arduino IDE.
3. Verify Code
In the libraries/Ethernet/utility folder, open w5100.h and verify that only the 1 correct #define line is uncommented. For Wiz550io it looks like below and as a picture.
//#define W5100_ETHERNET_SHIELD // Arduino Ethernet Shield and Compatibles ...
//#define W5200_ETHERNET_SHIELD // WIZ820io, W5200 Ethernet Shield
#define W5500_ETHERNET_SHIELD // WIZ550io, ioShield series of WIZnet
Step 3: Setup Arduino As a Iperf Server
Most of all, we have to setup Arduino as a iperf server.
Then we need to prepare Arduino sketch code.
As you see the picture. it is very simple.
Arduino will just read data from buffer of ethernet shield.
That's all. Then arduino can be a iperf server for performance test.
(Refer bottom of this step reference arduino sketch code)
And there are something need to explain.
Refer picture and below text.
 Setup for arduino ethernet shield information for network.
For iperf, use 5001 port which is a default port for iperf client.
 Ethernet begin like this. It is differ from original ethernet library.
 To increase SPI clock for performance (default : SPI_CLOCK_DIV4)
 Ethernet shield have 2048 buffer, so we can read 2048 buffer at once.
But Arduino will be abnormal if we allocation 2048 buffer , so use 1024 buffer.
(If we can use 2048 buffer, it will be more good for performance.)
Step 4: Setup Computer As a Iperf Client and RUN
Next we will set a PC as a client mode.
It is very simple
Just open "Command prompt window" and
go to "iperf" installed directory using "cd", "dir" command as a first picture of this step.
Refer below link to know about "Iperf" https://www.instructables.com/id/How-to-measure-network-performance-1/
And Type "iperf -c 192.168.1.177 -w 300k -t 100 -i 10" and Enter on command line as a picture.
Then you can see the result of network performance between Arduino and Computer.
In my case, network performance is 3.34Mbps.
Step 5: Final : See Demo Video
Now, I/we can measure network performance.
Here is a demo video which test network performance.
Please enjoy it.
We have a be nice policy.
Please be positive and constructive.