What's new

New Addon for Starlink users - now using Entware grpcurl

  • 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!

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.

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-Merlin

It 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 menu

image

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:

image

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:

image

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:
Wow, excellent work @JGrana!! Love your interface choice! :)
 
Last edited:
Wow, excellent work @JGrana!!
Thanks @Viktor Jaep ! It's the first release - hopefully I get some good feedback from users.
BTW, you should check out "dialog". Its a fun tool for simple terminal/GUI kinds of things.

I'm thinking I might adapt your PWRMON to work with SunPower based solar systems.
I'm starting to research how to "talk" to the SunPower server.
Good winter project ;-)
 
Thanks @Viktor Jaep ! It's the first release - hopefully I get some good feedback from users.
BTW, you should check out "dialog". Its a fun tool for simple terminal/GUI kinds of things.

I'm thinking I might adapt your PWRMON to work with SunPower based solar systems.
I'm starting to research how to "talk" to the SunPower server.
Good winter project ;-)
Could you please point me to a good resource on how to work with "dialog"? Sounds super interesting! Heck yeah, I'm all for seeing you adapt PWRMON for your system! I'm looking forward to seeing your efforts over this winter! :)
 
Could you please point me to a good resource on how to work with "dialog"? Sounds super interesting! Heck yeah, I'm all for seeing you adapt PWRMON for your system! I'm looking forward to seeing your efforts over this winter! :)
Its quite an old terminal/GUI system, 1999 or so. Its used by many companies as part of the boot->install since it's simple and helpful with it's mini widgets. Some of the original Linux early distributions like Slakware used it.

Here are a few links:



@ColinTaylor - is this ok? ;-) or too many colors
 
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.sh" -o "/jffs/scripts/starlnk.sh" && chmod 0755 /jffs/scripts/starlnk.sh && /jffs/scripts/starlnk.sh install

Here is the Readme. 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-Merlin

It can display information about the Satellite Dish and router and also can be used to stow or reboot Starlink.

Prerequsites

For now, starlnk can only run on Asuswrt-Merlin aarch64 based routers. It will check during install.Starlnk assumes you are running the Starlink router in bypass mode (no WiFi) and using it as a WAN modem for the Asus Router.

This addon requires an additional program called grpcurl which will be downloaded from the grpcurl project page on github(https://github.com/fullstorydev/grpcurl/releases/download/).A request has been made to the Entware team to include grpcurl in the Entware repository.starlnk will download grpcurl and install it in /opt/sbin.

Entware will also be required since starlnk uses dialog for the menu/GUI system and numfmt for formatting various speeds.

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.sh" -o "/jffs/scripts/starlnk.sh" && chmod 0755 /jffs/scripts/starlnk.sh && /jffs/scripts/starlnk.sh install

Install will first check for the correct router architecture (aarch64 - needed for grpcurl) then Entware being installed. If either are a problem, starlnk will let you know and not install.

If both are met, it will create a directory in /jffs/addons (starlnk), create a config file there and setup a link in /opt/bin (starlnk) to /jffs/scripts/starlnk.sh

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.sh

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 menu

image

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:

image

Keep in mind, this is the Satellite to dish rates and NOT the actual download or upload speeds. For those, use somehting like spdMerlin.

Another example of one of the screens (Show Present Status) shows various details about the dish and router:

image

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.
very nice! I knew you were up to something!
 
New version, now using Entwares grpcurl. See OP :)
 

Latest threads

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