Useful grpcurl commands - sparky8512/starlink-grpc-tools GitHub Wiki

This page lists a few grpcurl commands that may be of interest to users of this project.

Dish Control

The following commands perform equivalent operations to those in the dish_control.py script.

Reboot the dish:

grpcurl -plaintext -d {\"reboot\":{}} 192.168.100.1:9200 SpaceX.API.Device.Device/Handle

Stow the dish:

grpcurl -plaintext -d {\"dish_stow\":{}} 192.168.100.1:9200 SpaceX.API.Device.Device/Handle

Unstow the dish:

grpcurl -plaintext -d {\"dish_stow\":{\"unstow\":true}} 192.168.100.1:9200 SpaceX.API.Device.Device/Handle

Get GPS (Lat/Lon/Alt) data from the dish:

grpcurl -plaintext -emit-defaults -d '{"getLocation":{}}' 192.168.100.1:9200 SpaceX.API.Device.Device/Handle

Inspecting the Protocol

If you want to poke around in the gRPC protocol the dish uses, you can list out what is available using the following commands.

To start at the top, you can list available services:

grpcurl -plaintext 192.168.100.1:9200 list

then list methods in the relevant service:

grpcurl -plaintext 192.168.100.1:9200 describe SpaceX.API.Device.Device

The relevant method is Handle, which takes a single request message and returns a specific response message depending on which request was issued.

To list possible requests:

grpcurl -plaintext 192.168.100.1:9200 describe SpaceX.API.Device.Request

and the respective responses:

grpcurl -plaintext 192.168.100.1:9200 describe SpaceX.API.Device.Response

and then you can go on to describe the individual requests or responses, for example:

grpcurl -plaintext 192.168.100.1:9200 describe SpaceX.API.Device.DishGetStatusResponse

Note that not all of the requests are implemented on the dish. Some are specific to the router, some are just not implemented, and some fail with a "not authorized" error. Note also that even requests that are implemented may have individual fields that are not implemented, and thus will always return the default for the field's data type.