What's new

spdMerlin spdMerlin - v4.x - speedtest and bandwidth monitoring

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Hi! @JackYaz,

Here is my contribution for adding support of RT-AC3200 (arch=armv7l) on your excellent spdmerlin addon
for asuswrt-merlin 384.13_10

within spdmerlin-4.4.3.zip

within spdmerlin.sh
--- spdmerlin.sh.ori
+++ spdmerlin.sh
@@ -49,7 +49,9 @@
[ -z "$(nvram get odmpid)" ] && ROUTER_MODEL=$(nvram get productid) || ROUTER_MODEL=$(nvram get odmpid)
[ -f /opt/bin/sqlite3 ] && SQLITE3_PATH=/opt/bin/sqlite3 || SQLITE3_PATH=/usr/sbin/sqlite3

-[ "$(uname -m)" = "aarch64" ] && ARCH="aarch64" || ARCH="arm"
+ARCH="armrh"
+[ "$(uname -m)" = "aarch64" ] && ARCH="aarch64"
+[ "$(uname -m)" = "armv7l" ] && ARCH="armel"

### End of script variables ###

### Start of output format variables ###

I didn't know the correct way to add this code proposal to your GitHub repository
 
Last edited:
Here you go:
Code:
PREFERREDSERVER_WAN=0|None configured
USEPREFERRED_WAN=false
AUTOMATED=true
OUTPUTTIMEMODE=unix
STORAGELOCATION=usb
PREFERREDSERVER_VPNC1=0|None configured
USEPREFERRED_VPNC1=false
PREFERREDSERVER_VPNC2=0|None configured
USEPREFERRED_VPNC2=false
PREFERREDSERVER_VPNC3=0|None configured
USEPREFERRED_VPNC3=false
PREFERREDSERVER_VPNC4=0|None configured
USEPREFERRED_VPNC4=false
PREFERREDSERVER_VPNC5=0|None configured
USEPREFERRED_VPNC5=false
AUTOBW_ENABLED=false
AUTOBW_SF_DOWN=95
AUTOBW_SF_UP=95
AUTOBW_ULIMIT_DOWN=0
AUTOBW_LLIMIT_DOWN=0
AUTOBW_ULIMIT_UP=0
AUTOBW_LLIMIT_UP=0
STORERESULTURL=true
EXCLUDEFROMQOS=true
AUTOBW_THRESHOLD_UP=10
AUTOBW_THRESHOLD_DOWN=10
SCHDAYS=*
SCHHOURS=*
SCHMINS=11,41
AUTOBW_AVERAGE_CALC=10
DAYSTOKEEP=60
LASTXRESULTS=25
SPEEDTESTBINARY=builtin
 
OK, hold horses, skynet has now stopped displaying statistics in the webgui as well. Obviously something more sinister is going on - let me play around for a bit.
 
can you send me a copy of your config please? it should be in either /jffs/addons/spdmerlin.d or /opt/share/spdmerlin.d
Got it - seems like a dodgy usb stick causing some issues, or maybe a lesson not to forget to reboot after updating firmware (which I forgot with 386.4). Anyway, I set all addons to run from / report to jffs, replaced the usb stick, rebooted the router a couple of times and behold - clickable URLs in the spdmerlin webgui and .csv files!

Apologies for wasting your time Jack...
 
Got it - seems like a dodgy usb stick causing some issues, or maybe a lesson not to forget to reboot after updating firmware (which I forgot with 386.4). Anyway, I set all addons to run from / report to jffs, replaced the usb stick, rebooted the router a couple of times and behold - clickable URLs in the spdmerlin webgui and .csv files!

Apologies for wasting your time Jack...
i'm glad you found the cause, i was scratching my head a bit!
 
Ah f**k that's a rookie error on my part. When I cleaned up swallowing of any errors i deleted a vital part of some of the commands. I'll ship a fix first thing in the morning. 1am here, not a good time to start coding!
Hello again! Well, found 4.4.4, installed it. We've made progress. The first error about permissions has cleared both in Merlin 386.4 and in John's fork 374.43.
SpdMerlin works fine in Merlin, initial and scheduled speedtests run, and the web page is properly set.
With John's fork is more complicated. There I installed SpdMerlin from scratch (with that I mean, the USB drive was freshly formatted, JFFS formatted as well, used AMTM script to create 2GB swap and to install Entware).
Initial installation goes past the permissions error. Then I get the missing PrintF messages again, and the initial speedtest fails. I tried both builtin and external... Here's the script output:

Code:
New version of spdstats_www.asp downloaded

Mounting WebUI tab for spdMerlin

Mounted spdMerlin WebUI page as user1.asp

New version of shared-jy.tar.gz downloaded

Upgrading database...

Error: near line 4: no such function: printf
(Repeats 180 times total)
Error: near line 4: no such function: printf
Database ready, continuing...

Starting speedtest using auto-selected server for WAN interface

Error running speedtest for WAN

Retrieving data for WebUI charts

Error: near line 4: no such function: printf
(Repeats 180 times total)
Error: near line 4: no such function: printf

A couple observations. I did various tests:
Force reinstall, no change.
Swapped built-in with external speed test, no change.
The SpdMerlin webui page kinda works, at least it did when I performed an initial dirty install where I had Conmon and SCMerlin. Then it didn't properly install again.
The PrintF error didn't appear when reinstalling. I always get Error running speedtest for WAN

Why the difference with John's fork, it's unclear to me I guess some functions or commands are not there or are slightly different. It's a pain to support different levels of code, I know.

Thanks for the help Jack. It's around midnight or one AM for you I guess.... So you have a good night!
 
Last edited:
Hello again! Well, found 4.4.4, installed it. We've made progress. The first error about permissions has cleared both in Merlin 386.4 and in John's fork 374.43.
SpdMerlin works fine in Merlin, initial and scheduled speedtests run, and the web page is properly set.
With John's fork is more complicated. There I installed SpdMerlin from scratch (with that I mean, the USB drive was freshly formatted, JFFS formatted as well, used AMTM script to create 2GB swap and to install Entware).
Initial installation goes past the permissions error. Then I get the missing PrintF messages again, and the initial speedtest fails. I tried both builtin and external... Here's the script output:

Code:
New version of spdstats_www.asp downloaded

Mounting WebUI tab for spdMerlin

Mounted spdMerlin WebUI page as user1.asp

New version of shared-jy.tar.gz downloaded

Upgrading database...

Error: near line 4: no such function: printf
(Repeats 180 times total)
Error: near line 4: no such function: printf
Database ready, continuing...

Starting speedtest using auto-selected server for WAN interface

Error running speedtest for WAN

Retrieving data for WebUI charts

Error: near line 4: no such function: printf
(Repeats 180 times total)
Error: near line 4: no such function: printf

A couple observations. I did various tests:
Force reinstall, no change.
Swapped built-in with external speed test, no change.
The SpdMerlin webui page kinda works, at least it did when I performed an initial dirty install where I had Conmon and SCMerlin. Then it didn't properly install again.
The PrintF error didn't appear when reinstalling. I always get Error running speedtest for WAN

Why the difference with John's fork, it's unclear to me I guess some functions or commands are not there or are slightly different. It's a pain to support different levels of code, I know.

Thanks for the help Jack. It's around midnight or one AM for you I guess.... So you have a good night!
i suppose i should flash my 68U with john's fork - which version are you on?
 
i suppose i should flash my 68U with john's fork - which version are you on?
Thanks Jack! Latest I believe. 374.43
Router says 374.43_52E7j9527
If you install it, you might want to check ConMon's webui page as well, it goes into a never ending "processing" screen...
Take care!
P.S. I can certainly reinstall it with debugging options set to get a trace, if that would help.
 
Last edited:
I can not seem to get the test to run with speedtest-cli. I have reset the add-on and restarted the router multiple times and still nothing. Am I missing a step?
 
@businessmonkey09: What is your router model ?
What is your asuswrt-merlin version ?
 
Last edited:
I don't know which architecture RT-AC88U is using!
Can you try the 'uname -m' command ? Mine said armv7l for RT-AC3200

Maybe, armel is compatible with your modem.
 
Last edited:
Your next 'spdmerlin update' command will revert this workaround patch

[ -z "$(nvram get odmpid)" ] && ROUTER_MODEL=$(nvram get productid) || ROUTER_MODEL=$(nvram get odmpid)
echo $ROUTER_MODEL
uname -m
cd /tmp
for ARCH in armel armhf aarch64 i386 x86_64
do
echo Testing $ARCH
wget -q https://install.speedtest.net/app/cli/ookla-speedtest-1.1.1-linux-$ARCH.tgz
tar -xzf ookla-speedtest-1.1.1-linux-$ARCH.tgz
if /tmp/speedtest; then
echo
echo Your modem is using $ARCH version of speedtest-cli
echo Patch is applied NOW. will be active UNTIL NEXT spdmerlin update
cp -v /tmp/speedtest /jffs/addons/spdmerlin.d/ookla
exit
fi
done
echo sorry, NO compatible speedtest-cli for your architecture
 
Last edited:
@Jack Yaz - Do you think you could add an option for spdMerlin to test all active connections? The use case is that I'm now using VPNMON, and it is going to select a VPN client randomly. spdMerlin won't let me select inactive connections so won't test all of my active connections if the VPN client changes.
 
@Jack Yaz - Do you think you could add an option for spdMerlin to test all active connections? The use case is that I'm now using VPNMON, and it is going to select a VPN client randomly. spdMerlin won't let me select inactive connections so won't test all of my active connections if the VPN client changes.
That's a great suggestion, @iTyPsIDg ... I ran into that same issue, and decided to just be satisfied with testing the main WAN connection on a regular interval. But it would sure be nice ... I'm wondering if there's another integration opportunity here to update spdMerlin with the latest VPN slot. I'll look into it! :)
 
Hello! I setup spdMerlin yesterday and now I want to change some settings but as I try to do anything I get these error messages. What should I do? I have a Kingston 32 gig USB-stick mounted to USB 3.0 port and its running swap file which is 10 gigabytes. I have 18 gigs of free space left, but its still saying I dont have space on device.

sed: can't create temp file '/jffs/addons/spdmerlin.d/configyXCk2P': No space left on device
sed: can't create temp file '/jffs/addons/spdmerlin.d/configXYXw9N': No space left on device
sed: can't create temp file '/jffs/addons/spdmerlin.d/configQgbo2Q': No space left on device
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top