JGrana
Very Senior Member
Now that Entware support grpcurl, I have update this addon to now use the Entware version.
This allows most all Asuswrt-routers to run starlnk.
I have also updated the Readme and install instructions below
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Now that I am back to using a Starlink system I decided to do some scripting to check on various stats and states of the Starlink and Router.
I am running the Starlink in bypass mode (no routing, no WiFi from its router) and using an AX88U Pro as the Router.
So far, working well.
I found a command line tool on github that lets me interact with gRPC server running on the Starklink router/modem.
I put together an addon for Asuswrt-Merlin that will let you monitor the dish/satellite link rates, some performance metrics and even allow you to reboot, stow or unstow the system. Its called "starlnk" and follows as much as possible the typical addon methods.
NOTE - right now this will ONLY work on aarch64 Asuswrt-Merlin routers. I am using a tool called grpcurl to interact with Starlink. Right now, this is only available from aarch64 arm based devices. I have made a request to the Entware folks to include grpcurl in a future Entware update. Once that happens, this addon (starlnk) should be able to run on most any router running Asuswrt-Merlin and Entware.
It does check for aarch64 and Entware before installing.
I am also using a GUI tool called "dialog". If you have installed many Linux distrubutions on PC's, dialog is often used for the intial install.
The reboot and stow commands should work but are not enabled in this version. I am using Starlink for my main Internet access and dont want to bring the system down for that amount of time it takes to get back on-line....
There is also a command line mode - details below.
To install:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/JGrana01/starlnk/master/starlnk" -o "/jffs/scripts/starlnk" && chmod 0755 /jffs/scripts/starlnk && /jffs/scripts/starlnk install
Here is the Readme from gitgub. Be sure to look at the Notes section on the bottom.
It can display information about the Satellite Dish and router and also can be used to stow or reboot Starlink.
Entware will also be required since starlnk uses dialog for the menu/GUI system and numfmt, jq and grpcurl.
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/JGrana01/starlnk/master/starlnk" -o "/jffs/scripts/starlnk" && chmod 0755 /jffs/scripts/starlnk && /jffs/scripts/starlnk install
Install will first check Entware being installed. If not installed, starlnk will point you to amtm for Entware installation and exit.
If Entware is installed, it will create a directory in /jffs/addons or $HOME/.config, create a config file there and setup a symbolic link in /opt/bin. It will also check for dialog, jq, numfmt and grpcurl and install them if missing.
$ starlnk uninstall
To run starlnk after installation, use:
starlnk
If this does not work, you will need to use the full path:
/jffs/scripts/starlnk
To run in menu mode, just type:
starlnk
In script mode, enter an argument. To see available arguments, type help:
starlnk help
You can use the keyboard arrow keys or type the menu item directly.
The first selection, "Monitor Sat. Link Statistics" will show a screen with the present uplink/downlink speeds and latency. It will refresh every 3 seconds until you press the Enter key. It looks like this:
Keep in mind, this is the Satellite to dish rates and NOT the actual download or upload speeds. For those, use something like spdMerlin.
Another example of one of the screens (Show Present Status) shows various details about the dish and router:
The list of arguments are:
menu - Run starlnk in a menu driven mode using Linux dialog. This is the defaultmode when run without a command line argument
rates - displays Downlink and Uplink throughputs continuously until a return is entered
status - displays the state of both Starlink Dish and Router
linkstate - displays detailed information on the sattelite link
maxmin - shows maximum and minimum Downlink/Uplink Throughput rates from history log
router - shows information about the Starlink router
all - displays all information on the system
gps - show gps information
reboot - will issue a reboot command to Starlink
stow - will issue a stow command to Starkink
unstow - unstow and put Starlink back into operation
help - show this help info
install - setup the script directory, copy the program, link to /opt/bin (if itsthere!) and setup a default config file
uninstall - remove starlnk and its data/directories
update - download the most recent version. Will check for existing installation.
I have NOT tested the reboot, stow and unstow commands. For now, they will not actually perform the action. They will "pretend".If you want to test them, send me a PM on www.snbforums.com - user JGrana.Keep in mind, these commands will take your Starlink system out of service for quite some time...
For any of the GPS readings, you will be required to have "Allow access on local network" enabled. You will find this setting by selecting ADVANCED at the bottom of the Android/iOS Starlink app then select DEBUG DATA and scroll down towards the bottom of that page.
This allows most all Asuswrt-routers to run starlnk.
I have also updated the Readme and install instructions below
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Now that I am back to using a Starlink system I decided to do some scripting to check on various stats and states of the Starlink and Router.
I am running the Starlink in bypass mode (no routing, no WiFi from its router) and using an AX88U Pro as the Router.
So far, working well.
I put together an addon for Asuswrt-Merlin that will let you monitor the dish/satellite link rates, some performance metrics and even allow you to reboot, stow or unstow the system. Its called "starlnk" and follows as much as possible the typical addon methods.
It does check for aarch64 and Entware before installing.
I am also using a GUI tool called "dialog". If you have installed many Linux distrubutions on PC's, dialog is often used for the intial install.
The reboot and stow commands should work but are not enabled in this version. I am using Starlink for my main Internet access and dont want to bring the system down for that amount of time it takes to get back on-line....
There is also a command line mode - details below.
To install:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/JGrana01/starlnk/master/starlnk" -o "/jffs/scripts/starlnk" && chmod 0755 /jffs/scripts/starlnk && /jffs/scripts/starlnk install
Here is the Readme from gitgub. Be sure to look at the Notes section on the bottom.
Starlnk
About
starlnk is a utility that is used to monitor and do some management of a Starlink system on an Asus Router running Asuswrt-MerlinIt can display information about the Satellite Dish and router and also can be used to stow or reboot Starlink.
Prerequsite
Starlnk assumes you are running the Starlink router in bypass mode (no WiFi) and using it as a WAN modem for a router.Entware will also be required since starlnk uses dialog for the menu/GUI system and numfmt, jq and grpcurl.
Installation
Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/JGrana01/starlnk/master/starlnk" -o "/jffs/scripts/starlnk" && chmod 0755 /jffs/scripts/starlnk && /jffs/scripts/starlnk install
Install will first check Entware being installed. If not installed, starlnk will point you to amtm for Entware installation and exit.
If Entware is installed, it will create a directory in /jffs/addons or $HOME/.config, create a config file there and setup a symbolic link in /opt/bin. It will also check for dialog, jq, numfmt and grpcurl and install them if missing.
Uninstallation
To remove starlnk and it's addon directory as well as grpcurl, run either in Menu mode, "U" uninstall or from the command line:$ starlnk uninstall
Usage
starlnk runs either a menu based system using dialog without any command linearguments or in script mode where it will return results of a command or do anaction on the command.To run starlnk after installation, use:
starlnk
If this does not work, you will need to use the full path:
/jffs/scripts/starlnk
To run in menu mode, just type:
starlnk
In script mode, enter an argument. To see available arguments, type help:
starlnk help
Menu/GUI Mode
When started without a command line argument, starlnk will display (using the fine Linux dialog utility) its main menuYou can use the keyboard arrow keys or type the menu item directly.
The first selection, "Monitor Sat. Link Statistics" will show a screen with the present uplink/downlink speeds and latency. It will refresh every 3 seconds until you press the Enter key. It looks like this:
Keep in mind, this is the Satellite to dish rates and NOT the actual download or upload speeds. For those, use something like spdMerlin.
Another example of one of the screens (Show Present Status) shows various details about the dish and router:
Script Mode
With an argument, starlnk will take a command line argument and return the requested results.The list of arguments are:
menu - Run starlnk in a menu driven mode using Linux dialog. This is the defaultmode when run without a command line argument
rates - displays Downlink and Uplink throughputs continuously until a return is entered
status - displays the state of both Starlink Dish and Router
linkstate - displays detailed information on the sattelite link
maxmin - shows maximum and minimum Downlink/Uplink Throughput rates from history log
router - shows information about the Starlink router
all - displays all information on the system
gps - show gps information
reboot - will issue a reboot command to Starlink
stow - will issue a stow command to Starkink
unstow - unstow and put Starlink back into operation
help - show this help info
install - setup the script directory, copy the program, link to /opt/bin (if itsthere!) and setup a default config file
uninstall - remove starlnk and its data/directories
update - download the most recent version. Will check for existing installation.
Important Notes
In order to allow starlnk to accces the Starlink router on the local network (192.168.100.1) you will have needed to login once using the Android/iOS Starlink app. You should only need to do this once.I have NOT tested the reboot, stow and unstow commands. For now, they will not actually perform the action. They will "pretend".If you want to test them, send me a PM on www.snbforums.com - user JGrana.Keep in mind, these commands will take your Starlink system out of service for quite some time...
For any of the GPS readings, you will be required to have "Allow access on local network" enabled. You will find this setting by selecting ADVANCED at the bottom of the Android/iOS Starlink app then select DEBUG DATA and scroll down towards the bottom of that page.
Last edited: