[Solved] Help Cross Compile speedtest-cli.c

can anyone help provide an example Makefile to cross compile single files in this repo https://github.com/linnway/speedtest-cli, to support mips/mipsel architecture

I followed this guide

There is a speedtest-cli package in OpenWrt already.. At least, in the main branch.

1 Like

Previously I used speedtest cli with python, it's just that my router's ROM is too small, so I'm looking for a simpler alternative speed tool that doesn't take up storage

The python version is used to be very 'slow' , I've never managed to get it anywhere near my 1/1 gbit.
While it works with the other versions.

1 Like

You're only going to get as fast as your slowest connection between your device and the end point. High-Bandwidth is only guaranteed on your link to the ISP, after that, it's anyone's guess. Could be congestion, a slow interconnect, or anything else.

You might want to try iperf3 package as an alternative for real-world experience if the python suite is too large @jekseparo You can find public iperf3 servers to test against.

Thank you
I have also installed and used iperf3 and netperf
but there is an obstacle from my ISP which prioritizes local connections (BW IIX) so that the results of Iperf3 and Netperf are not optimal

Then how is speedtest from Ookla going to get around this? If your ISP selectively restricts non-local traffic, then unless Ookla has a server on your ISPs network, then it's going to be subjected to the same issues.. And if they have a server on your ISPs network, it won't be indicative of real-world

It is true,
here I just want to know in real how much BW is given by my ISP, with all the limitations that exist. both from the ISP side and my router device.

I just want to get a lightweight app/tool ​​that fits my router's ROM.
Even if the results are not optimal

and for the time being the results of Speedtest Python with those in the repo in my first post, have similarities in terms of final results

You're wanting to measure two different things then..

  1. Your connection to your ISP - This will be dependent on your ISP having a Speedtest/iperf server inside their network for their clients to test against.

  2. Your connection THROUGH your ISP to the wider Internet - For this, you should just use standard bandwidth measuring tools like iperf3 or even speedtest through your browser. This is reflective of your REAL-WORLD performance. You then use tools like traceroute to figure out where the slow down is.

You can't have both unless your ISP is a Tier 1 backbone provider.

1 Like

Thank you for the advice

1 Like

My ISP maintains an in-network Speedtest server (through Ookla, actually).. GoogleFiber also maintains a speedtest server. Here are my traceroutes.. Notice that each hop will increase latency and lag.. And keep in mind, I'm in the US going to Google.. You don't get more backbone than that..

grommish@DESKTOP-N35LRJ4:~/openwrt$ traceroute speedtest.googlefiber.net
traceroute to speedtest.googlefiber.net (, 30 hops max, 60 byte packets
 1  DESKTOP-N35LRJ4.mshome.net (  0.451 ms  0.418 ms  0.434 ms
 2  OpenWrt.lan (  1.658 ms  1.637 ms  1.167 ms
 3 (  2.667 ms  2.641 ms  2.515 ms
 4  dsl-74-83-125-1.fuse.net (  2.452 ms  2.434 ms  2.609 ms
 5  * * *
 6 (  3.096 ms  2.329 ms  2.193 ms
 7 (  12.028 ms  14.431 ms  14.345 ms
 8  as6939.10gigabitethernet4-1.core1.chi1.he.net (  15.251 ms  14.415 ms  14.365 ms
 9  100ge2-2.core1.mci3.he.net (  44.341 ms 100ge8-2.core1.mci3.he.net (  23.525 ms  23.497 ms
10  port-channel4.core2.mci3.he.net (  24.012 ms  23.210 ms  23.975 ms
11 (  23.842 ms  23.901 ms  23.869 ms
12  23-255-224-202.mci.googlefiber.net (  24.494 ms  24.163 ms  24.143 ms
13  23-255-224-195.mci.googlefiber.net (  24.647 ms  24.088 ms  26.257 ms
14  23-255-224-201.mci.googlefiber.net (  24.591 ms  24.579 ms  24.183 ms
grommish@DESKTOP-N35LRJ4:~/openwrt$ traceroute speedtest.cincinnatibell.com
traceroute to speedtest.cincinnatibell.com (, 30 hops max, 60 byte packets
 1  DESKTOP-N35LRJ4.mshome.net (  0.346 ms  0.315 ms  0.230 ms
 2  OpenWrt.lan (  6.861 ms  6.849 ms  6.782 ms
 3 (  6.673 ms  6.634 ms  6.572 ms
 4  dsl-74-83-125-1.fuse.net (  6.622 ms  6.602 ms  6.589 ms
 5 (  6.623 ms  6.582 ms  6.567 ms
 6  cn01plv-spdtst01.zoomtown.com (  6.509 ms !X  5.150 ms !X  5.126 ms !X

You're missing the point.

The python version would never go as fast as the binary or web dito.

It had nothing to do with the ISP nor the connection.

It was reported as a bug on github, but I can't find it in the repo, assuming I'm actually looking in the right one.

It's also mentioned on the official github page.

1 Like

I managed to cross compile with 2 repositories. both work fine on my router (mipsle 24kc)

  1. Cross-Compile C# (small file 25 KB)

  2. Cross-Compile GO (medium file 2 MB)

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.