⚠ Under Construction — documentation is incomplete and subject to change
Language

Auth Manager

Authentication and session management.

Login Authenticates a user and returns a session token.
Signature
func (m *AuthManager) Login(username, password string) (token string, expiresAt int64, err error)
Parameters
NameTypeNotes
usernamestring
passwordstring
Returns
NameTypeNotes
tokenstring
expiresAtint64Unix timestamp
errorerror
Example
token, expiresAt, err := client.AuthManager.Login(username, password)
Logout Invalidates a session token.
Signature
func (m *AuthManager) Logout(token string) error
Parameters
NameTypeNotes
tokenstring
Returns
NameTypeNotes
errorerror
Example
err := client.AuthManager.Logout(token)

System Manager

Device identity, hardware info, OS metadata and live metrics.

PermissionSystemService/*
GetApiVersion Returns the API version and revision running on the device.
Signature
func (s *SystemManager) GetApiVersion() (version int64, revision int64, err error)
Returns
NameTypeNotes
versionint64
revisionint64
errorerror
Example
version, revision, err := client.SystemManager.GetApiVersion()
GetApiVersionInfo Returns the API version as a formatted string.
Signature
func (s *SystemManager) GetApiVersionInfo() (string, error)
Returns
NameTypeNotes
versionstring
errorerror
Example
ver, err := client.SystemManager.GetApiVersionInfo()
GetDeviceName Returns the configured device name.
Signature
func (s *SystemManager) GetDeviceName() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
name, err := client.SystemManager.GetDeviceName()
GetSocModel Returns the SoC model identifier.
Signature
func (s *SystemManager) GetSocModel() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
model, err := client.SystemManager.GetSocModel()
GetSocVendor Returns the SoC vendor name.
Signature
func (s *SystemManager) GetSocVendor() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
vendor, err := client.SystemManager.GetSocVendor()
GetBoardModel Returns the board model identifier.
Signature
func (s *SystemManager) GetBoardModel() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
model, err := client.SystemManager.GetBoardModel()
GetBoardVendor Returns the board vendor name.
Signature
func (s *SystemManager) GetBoardVendor() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
vendor, err := client.SystemManager.GetBoardVendor()
GetHardwareVersion Returns the hardware revision string.
Signature
func (s *SystemManager) GetHardwareVersion() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
ver, err := client.SystemManager.GetHardwareVersion()
GetHardwareModel Returns the hardware model identifier.
Signature
func (s *SystemManager) GetHardwareModel() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
model, err := client.SystemManager.GetHardwareModel()
GetSystemUuid Returns the system UUID.
Signature
func (s *SystemManager) GetSystemUuid() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
uuid, err := client.SystemManager.GetSystemUuid()
GetBoardSerial Returns the board serial number.
Signature
func (s *SystemManager) GetBoardSerial() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
serial, err := client.SystemManager.GetBoardSerial()
GetCpuSerial Returns the CPU serial number.
Signature
func (s *SystemManager) GetCpuSerial() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
serial, err := client.SystemManager.GetCpuSerial()
GetMachineId Returns the machine ID.
Signature
func (s *SystemManager) GetMachineId() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
id, err := client.SystemManager.GetMachineId()
GetArchitecture Returns the CPU architecture (e.g. "arm64", "amd64").
Signature
func (s *SystemManager) GetArchitecture() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
arch, err := client.SystemManager.GetArchitecture()
GetTotalRAM Returns total RAM in bytes.
Signature
func (s *SystemManager) GetTotalRAM() (uint64, error)
Returns
NameTypeNotes
valueuint64
errorerror
Example
ram, err := client.SystemManager.GetTotalRAM()
GetCpuModel Returns the CPU model string.
Signature
func (s *SystemManager) GetCpuModel() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
model, err := client.SystemManager.GetCpuModel()
GetCpuCores Returns the number of physical CPU cores.
Signature
func (s *SystemManager) GetCpuCores() (int64, error)
Returns
NameTypeNotes
valueint64
errorerror
Example
cores, err := client.SystemManager.GetCpuCores()
GetCpuThreads Returns the number of logical CPU threads.
Signature
func (s *SystemManager) GetCpuThreads() (int64, error)
Returns
NameTypeNotes
valueint64
errorerror
Example
threads, err := client.SystemManager.GetCpuThreads()
GetCpuMinMhz Returns the minimum CPU frequency in MHz.
Signature
func (s *SystemManager) GetCpuMinMhz() (float64, error)
Returns
NameTypeNotes
valuefloat64
errorerror
Example
minMhz, err := client.SystemManager.GetCpuMinMhz()
GetCpuMaxMhz Returns the maximum CPU frequency in MHz.
Signature
func (s *SystemManager) GetCpuMaxMhz() (float64, error)
Returns
NameTypeNotes
valuefloat64
errorerror
Example
maxMhz, err := client.SystemManager.GetCpuMaxMhz()
GetOsName Returns the OS name.
Signature
func (s *SystemManager) GetOsName() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
name, err := client.SystemManager.GetOsName()
GetOsVersion Returns the OS version string.
Signature
func (s *SystemManager) GetOsVersion() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
ver, err := client.SystemManager.GetOsVersion()
GetKernelVersion Returns the kernel version string.
Signature
func (s *SystemManager) GetKernelVersion() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
ver, err := client.SystemManager.GetKernelVersion()
GetDistro Returns the Linux distribution name.
Signature
func (s *SystemManager) GetDistro() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
distro, err := client.SystemManager.GetDistro()
GetDistroVersion Returns the distribution version string.
Signature
func (s *SystemManager) GetDistroVersion() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
ver, err := client.SystemManager.GetDistroVersion()
GetRuntimeVersion Returns the Orbit runtime version.
Signature
func (s *SystemManager) GetRuntimeVersion() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
ver, err := client.SystemManager.GetRuntimeVersion()
GetOsRevision Returns the logical OS revision string.
Signature
func (s *SystemManager) GetOsRevision() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
rev, err := client.SystemManager.GetOsRevision()
GetBuildVersion Alias for GetOsRevision.
Signature
func (s *SystemManager) GetBuildVersion() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
ver, err := client.SystemManager.GetBuildVersion()
GetRuntimeBuildDate Returns the runtime image build date.
Signature
func (s *SystemManager) GetRuntimeBuildDate() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
date, err := client.SystemManager.GetRuntimeBuildDate()
GetBuildDate Alias for GetRuntimeBuildDate.
Signature
func (s *SystemManager) GetBuildDate() (string, error)
Returns
NameTypeNotes
valuestring
errorerror
Example
date, err := client.SystemManager.GetBuildDate()
GetMetrics Returns live CPU usage, RAM and storage stats.
Signature
func (s *SystemManager) GetMetrics() (*MetricsInfoResponse, error)
Returns
NameTypeNotes
*MetricsInfoResponse
errorerror
Example
metrics, err := client.SystemManager.GetMetrics()
Attach Attaches the SDK client to the running Gravity system service.
Signature
func (s *SystemManager) Attach() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.Attach()
EnableDevMode Enables developer mode on the device.
Signature
func (s *SystemManager) EnableDevMode() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.EnableDevMode()
DisableDevMode Disables developer mode on the device.
Signature
func (s *SystemManager) DisableDevMode() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.DisableDevMode()
IsDevModeEnabled Reports whether developer mode is currently enabled.
Signature
func (s *SystemManager) IsDevModeEnabled() (bool, error)
Returns
NameTypeNotes
enabledbool
errorerror
Example
ok, err := client.SystemManager.IsDevModeEnabled()
EnableSSHServer Enables the SSH server on the device.
Signature
func (s *SystemManager) EnableSSHServer() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.EnableSSHServer()
DisableSSHServer Disables the SSH server on the device.
Signature
func (s *SystemManager) DisableSSHServer() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.DisableSSHServer()
IsSSHServerEnabled Reports whether the SSH server is currently enabled.
Signature
func (s *SystemManager) IsSSHServerEnabled() (bool, error)
Returns
NameTypeNotes
enabledbool
errorerror
Example
ok, err := client.SystemManager.IsSSHServerEnabled()
EnableRebootOnFailure Enables automatic reboot when a critical failure is detected.
Signature
func (s *SystemManager) EnableRebootOnFailure() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.EnableRebootOnFailure()
DisableRebootOnFailure Disables automatic reboot on failure.
Signature
func (s *SystemManager) DisableRebootOnFailure() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.DisableRebootOnFailure()
IsRebootOnFailureEnabled Reports whether automatic reboot on failure is enabled.
Signature
func (s *SystemManager) IsRebootOnFailureEnabled() (bool, error)
Returns
NameTypeNotes
enabledbool
errorerror
Example
ok, err := client.SystemManager.IsRebootOnFailureEnabled()
AllowUntrustedApps Allows installation of apps from untrusted sources.
Signature
func (s *SystemManager) AllowUntrustedApps() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.AllowUntrustedApps()
DisallowUntrustedApps Blocks installation of apps from untrusted sources.
Signature
func (s *SystemManager) DisallowUntrustedApps() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.SystemManager.DisallowUntrustedApps()
IsUntrustedAppsAllowed Reports whether untrusted app installation is currently allowed.
Signature
func (s *SystemManager) IsUntrustedAppsAllowed() (bool, error)
Returns
NameTypeNotes
allowedbool
errorerror
Example
ok, err := client.SystemManager.IsUntrustedAppsAllowed()

Package Manager

Application package installation and management.

PermissionPackageService/*
ListInstalledPackages Returns all installed packages.
Signature
func (p *PackageManager) ListInstalledPackages() ([]*InstalledPackage, error)
Returns
NameTypeNotes
[]InstalledPackage
errorerror
Example
pkgs, err := client.PackageManager.ListInstalledPackages()
InstallPackage Uploads and installs an .orb package from a local path.
Signature
func (p *PackageManager) InstallPackage(ctx context.Context, orbPath string) error
Parameters
NameTypeNotes
ctxContext
orbPathstring
Returns
NameTypeNotes
errorerror
Example
err := client.PackageManager.InstallPackage(ctx, "/path/to/app.orb")
RemovePackage Uninstalls a package by ID.
Signature
func (p *PackageManager) RemovePackage(ctx context.Context, packageID string) error
Parameters
NameTypeNotes
ctxContext
packageIDstring
Returns
NameTypeNotes
errorerror
Example
err := client.PackageManager.RemovePackage(ctx, packageID)

Ethernet Manager

Ethernet interface configuration and status.

PermissionEthernetService/*
ListEthernetInterfaces Returns all Ethernet interfaces available on the device.
Signature
func (e *EthernetManager) ListEthernetInterfaces() ([]*EthernetLinkProperties, error)
Returns
NameTypeNotes
[]*EthernetLinkProperties
errorerror
Example
ifaces, err := client.EthernetManager.ListEthernetInterfaces()
IsEthernetConnected Reports whether the given interface has link.
Signature
func (e *EthernetManager) IsEthernetConnected(interfaceName string) (bool, error)
Parameters
NameTypeNotes
interfaceNamestring
Returns
NameTypeNotes
connectedbool
errorerror
Example
ok, err := client.EthernetManager.IsEthernetConnected("eth0")
GetEthernetLinkProperties Returns link properties (MAC, state, MTU, IP config) for an interface.
Signature
func (e *EthernetManager) GetEthernetLinkProperties(interfaceName string) (*EthernetLinkProperties, error)
Parameters
NameTypeNotes
interfaceNamestring
Returns
NameTypeNotes
*EthernetLinkProperties
errorerror
Example
props, err := client.EthernetManager.GetEthernetLinkProperties("eth0")
SetEthernetConfig Applies static IP or DHCP settings to an interface.
Signature
func (e *EthernetManager) SetEthernetConfig(
    interfaceName string, enable, dhcpEnable bool,
    ipv4Address, ipv4Gateway string, ipv4Dns []string,
) (bool, error)
Parameters
NameTypeNotes
interfaceNamestring
enablebool
dhcpEnablebool
ipv4AddressstringCIDR notation — ignored when dhcpEnable is true
ipv4Gatewaystring
ipv4Dns[]string
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.EthernetManager.SetEthernetConfig(
    "eth0", true, false,
    "192.168.1.10/24", "192.168.1.1", []string{"8.8.8.8"},
)
EnableEthernet Brings an Ethernet interface up.
Signature
func (e *EthernetManager) EnableEthernet(interfaceName string) (bool, error)
Parameters
NameTypeNotes
interfaceNamestring
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.EthernetManager.EnableEthernet("eth0")
DisableEthernet Brings an Ethernet interface down.
Signature
func (e *EthernetManager) DisableEthernet(interfaceName string) (bool, error)
Parameters
NameTypeNotes
interfaceNamestring
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.EthernetManager.DisableEthernet("eth0")

WiFi Manager

Wi-Fi interface management — client mode and access point.

PermissionWiFiService/*
ListInterfaces Returns all Wi-Fi interfaces on the device.
Signature
func (w *WiFiManager) ListInterfaces() ([]*WiFiLinkProperties, error)
Returns
NameTypeNotes
[]WiFiLinkProperties
errorerror
Example
ifaces, err := client.WiFiManager.ListInterfaces()
IsConnected Returns true if the interface has an active Wi-Fi connection.
Signature
func (w *WiFiManager) IsConnected(ifname string) (bool, error)
Parameters
NameTypeNotes
ifnamestring
Returns
NameTypeNotes
connectedbool
errorerror
Example
ok, err := client.WiFiManager.IsConnected(ifname)
SetClientConfig Configures the interface for client (station) mode.
Signature
func (w *WiFiManager) SetClientConfig(
    ifname, ssid, password, security string,
    dhcpEnable bool,
    ipv4Address, ipv4Gateway string,
    ipv4Dns []string,
) (bool, error)
Parameters
NameTypeNotes
ifnamestring
ssidstring
passwordstring
securitystring"none" | "wpa2" | "wpa3" | "wpa2-wpa3"
dhcpEnablebool
ipv4AddressstringCIDR — ignored when dhcpEnable is true
ipv4Gatewaystring
ipv4Dns[]string
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.WiFiManager.SetClientConfig(
    ifname, ssid, password, "wpa2",
    true, "", "", nil,
)
Connect Brings up the Wi-Fi connection on the interface.
Signature
func (w *WiFiManager) Connect(ifname string) (bool, error)
Parameters
NameTypeNotes
ifnamestring
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.WiFiManager.Connect(ifname)
Scan Scans for nearby Wi-Fi networks.
Signature
func (w *WiFiManager) Scan(ifname string, forceRescan bool) ([]*ScannedNetwork, error)
Parameters
NameTypeNotes
ifnamestring
forceRescanbool
Returns
NameTypeNotes
[]ScannedNetwork
errorerror
Example
nets, err := client.WiFiManager.Scan(ifname, true)
StartHotspot Starts an access point on the given interface.
Signature
func (w *WiFiManager) StartHotspot(ifname, ssid, password, band string, channel int32) (bool, error)
Parameters
NameTypeNotes
ifnamestring
ssidstring
passwordstring
bandstring"2.4GHz" or "5GHz"
channelint32
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.WiFiManager.StartHotspot(ifname, ssid, password, "5GHz", 6)

Bluetooth Manager

Bluetooth Classic and BLE device management.

PermissionBluetoothService/*
GetAdapterInfo Returns information about the local Bluetooth adapter.
Signature
func (m *BluetoothManager) GetAdapterInfo(ctx context.Context) (*AdapterInfo, error)
Parameters
NameTypeNotes
ctxContext
Returns
NameTypeNotes
*AdapterInfo{ Address, Name, Powered, Discoverable, Discovering }
errorerror
Example
info, err := client.BluetoothManager.GetAdapterInfo(ctx)
ScanClassic Scans for Classic Bluetooth devices. Calls onResult for each discovery. Blocks until context is cancelled.
Signature
func (m *BluetoothManager) ScanClassic(ctx context.Context, onResult func(BtDevice)) error
Parameters
NameTypeNotes
ctxContext
onResultfunc(BtDevice)
Returns
NameTypeNotes
errorerror
Example
err := client.BluetoothManager.ScanClassic(ctx, func(d BtDevice) {
    fmt.Println(d.Address, d.Name)
})
ScanBLE Scans for BLE devices with optional filters. Blocks until context is cancelled (~30 s).
Signature
func (m *BluetoothManager) ScanBLE(ctx context.Context, filters []BLEScanFilter, onResult func(BLEScanResult)) error
Parameters
NameTypeNotes
ctxContext
filters[]BLEScanFilter{ NamePrefix, Address, ServiceUUID }
onResultfunc(BLEScanResult)
Returns
NameTypeNotes
errorerror
Example
err := client.BluetoothManager.ScanBLE(ctx, nil, func(r BLEScanResult) {
    fmt.Println(r.Address, r.RSSI)
})

GPIO Manager

General-purpose I/O pin control.

PermissionGpioService/*
ListPins Returns all GPIO pins available on the device.
Signature
func (m *GpioManager) ListPins() ([]*GpioPin, error)
Returns
NameTypeNotes
[]GpioPin
errorerror
Example
pins, err := client.GpioManager.ListPins()
GetDirection Reads the current direction of a pin.
Signature
func (m *GpioManager) GetDirection(pin *GpioPin) (GpioDirection, error)
Parameters
NameTypeNotes
pin*GpioPin
Returns
NameTypeNotes
dirGpioDirection
errorerror
Example
dir, err := client.GpioManager.GetDirection(pin)
SetDirection Configures a pin as input or output.
Signature
func (m *GpioManager) SetDirection(pin *GpioPin, dir GpioDirection) error
Parameters
NameTypeNotes
pin*GpioPin
dirGpioDirectionGPIO_DIR_IN | GPIO_DIR_OUT
Returns
NameTypeNotes
errorerror
Example
err := client.GpioManager.SetDirection(pin, GPIO_DIR_OUT)
GetLevel Reads the current logic level of a pin.
Signature
func (m *GpioManager) GetLevel(pin *GpioPin) (GpioLevel, error)
Parameters
NameTypeNotes
pin*GpioPin
Returns
NameTypeNotes
levelGpioLevel
errorerror
Example
level, err := client.GpioManager.GetLevel(pin)
SetLevel Sets the logic level of an output pin.
Signature
func (m *GpioManager) SetLevel(pin *GpioPin, level GpioLevel) error
Parameters
NameTypeNotes
pin*GpioPin
levelGpioLevelGPIO_LEVEL_LOW | GPIO_LEVEL_HIGH
Returns
NameTypeNotes
errorerror
Example
err := client.GpioManager.SetLevel(pin, GPIO_LEVEL_HIGH)

PWM Manager

PWM channel configuration and control.

PermissionPwmService/*
ListChannels Returns all available PWM channels.
Signature
func (m *PwmManager) ListChannels() ([]*PwmChannel, error)
Returns
NameTypeNotes
[]PwmChannel{ Channel, Name }
errorerror
Example
channels, err := client.PwmManager.ListChannels()
GetProperties Reads the current configuration of a PWM channel.
Signature
func (m *PwmManager) GetProperties(ch *PwmChannel) (*PwmProperties, error)
Parameters
NameTypeNotes
ch*PwmChannel
Returns
NameTypeNotes
props*PwmProperties{ Channel, Enabled, DutyCycle, FrequencyHz }
errorerror
Example
props, err := client.PwmManager.GetProperties(ch)
SetPwm Configures and starts a PWM output on the given channel.
Signature
func (m *PwmManager) SetPwm(ch *PwmChannel, dutyCycle, frequencyHz float64) error
Parameters
NameTypeNotes
ch*PwmChannel
dutyCyclefloat640.0–1.0
frequencyHzfloat64
Returns
NameTypeNotes
errorerror
Example
err := client.PwmManager.SetPwm(ch, 0.5, 1000.0)
StopPwm Disables PWM output on the given channel.
Signature
func (m *PwmManager) StopPwm(ch *PwmChannel) error
Parameters
NameTypeNotes
ch*PwmChannel
Returns
NameTypeNotes
errorerror
Example
err := client.PwmManager.StopPwm(ch)

UART Manager

Serial port (UART) communication.

PermissionUartService/*
ListPorts Returns the names of all available UART ports.
Signature
func (m *UartManager) ListPorts() ([]string, error)
Returns
NameTypeNotes
[]string
errorerror
Example
ports, err := client.UartManager.ListPorts()
Open Opens and configures a UART port.
Signature
func (m *UartManager) Open(cfg UartConfig) error
Parameters
NameTypeNotes
cfgUartConfig{ Port, Baudrate, DataBits, Parity, StopBits, FlowControl }
Returns
NameTypeNotes
errorerror
Example
err := client.UartManager.Open(UartConfig{
    Port:     "ttyS0",
    Baudrate: 115200,
    DataBits: 8,
    Parity:   UartParityNone,
    StopBits: UartStopBits1,
})
Write Writes raw bytes to an open UART port.
Signature
func (m *UartManager) Write(port string, data []byte) (int, error)
Parameters
NameTypeNotes
portstring
databytes
Returns
NameTypeNotes
bytesWrittenint
errorerror
Example
n, err := client.UartManager.Write("ttyS0", data)
Listen Streams incoming bytes from a UART port. Calls onChunk for each received chunk. Blocks until context is cancelled.
Signature
func (m *UartManager) Listen(ctx context.Context, port string, maxChunkSize int, onChunk func([]byte)) error
Parameters
NameTypeNotes
ctxContext
portstring
maxChunkSizeint
onChunkfunc([]byte)
Returns
NameTypeNotes
errorerror
Example
err := client.UartManager.Listen(ctx, "ttyS0", 256, func(chunk []byte) {
    // handle received data
})

I2C Manager

I²C bus discovery and data transfer.

PermissionI2cService/*
ListBuses Returns the indices of available I²C buses.
Signature
func (m *I2CManager) ListBuses() ([]uint32, error)
Returns
NameTypeNotes
[]uint32
errorerror
Example
buses, err := client.I2CManager.ListBuses()
ScanBus Probes all 7-bit addresses on a bus and returns those that respond.
Signature
func (m *I2CManager) ScanBus(bus uint32) ([]uint32, error)
Parameters
NameTypeNotes
busuint32
Returns
NameTypeNotes
[]uint32responding addresses
errorerror
Example
addrs, err := client.I2CManager.ScanBus(1)
GetConfig Returns the current configuration of an I²C bus.
Signature
func (m *I2CManager) GetConfig(bus uint32) (I2CConfig, error)
Parameters
NameTypeNotes
busuint32
Returns
NameTypeNotes
cfgI2CConfig{ Bus, ClockHz, TenBitAddr, ClockStretching }
errorerror
Example
cfg, err := client.I2CManager.GetConfig(1)
SetConfig Applies configuration changes to an I²C bus.
Signature
func (m *I2CManager) SetConfig(cfg I2CConfig) error
Parameters
NameTypeNotes
cfgI2CConfig{ Bus, ClockHz, TenBitAddr, ClockStretching }
Returns
NameTypeNotes
errorerror
Example
err := client.I2CManager.SetConfig(I2CConfig{Bus: 1, ClockHz: 400000})
Transfer Performs a write, read, or write-then-read I²C transaction. Operation is inferred from the fields set in the request.
Signature
func (m *I2CManager) Transfer(req I2CTransferRequest) ([]byte, error)
Parameters
NameTypeNotes
reqI2CTransferRequest{ Bus, Address, Data, ReadLength, Flags }
Returns
NameTypeNotes
[]byte
errorerror
Example
data, err := client.I2CManager.Transfer(I2CTransferRequest{
    Bus: 1, Address: 0x48,
    Data: []byte{0x00}, ReadLength: 2,
})

SPI Manager

SPI bus configuration and full-duplex transfer.

PermissionSpiService/*
ListDevices Returns available SPI device names (e.g. "spidev0.0").
Signature
func (m *SpiManager) ListDevices() ([]string, error)
Returns
NameTypeNotes
[]string
errorerror
Example
devices, err := client.SpiManager.ListDevices()
Transfer Performs a full-duplex SPI transfer.
Signature
func (m *SpiManager) Transfer(bus, cs uint32, dataOut []byte, readLength uint32) ([]byte, error)
Parameters
NameTypeNotes
busuint32
csuint32Chip select index
dataOutbytes
readLengthuint320 = write-only
Returns
NameTypeNotes
[]byte
errorerror
Example
rx, err := client.SpiManager.Transfer(0, 0, txData, uint32(len(txData)))

Camera Manager

V4L2 camera capture and streaming.

PermissionCameraService/*
ListDevices Returns all V4L2 video devices available on the system.
Signature
func (m *CameraManager) ListDevices(ctx context.Context) ([]*CameraDeviceInfo, error)
Parameters
NameTypeNotes
ctxContext
Returns
NameTypeNotes
[]CameraDeviceInfo
errorerror
Example
devices, err := client.CameraManager.ListDevices(ctx)
CaptureImage Captures a single frame from a camera device.
Signature
func (m *CameraManager) CaptureImage(ctx context.Context, deviceID string, width, height int32, format string) (*CaptureImageResult, error)
Parameters
NameTypeNotes
ctxContext
deviceIDstring
widthint32
heightint32
formatstring"mjpeg" or "yuyv"
Returns
NameTypeNotes
*CaptureImageResult{ ImageData, Format, Timestamp }
errorerror
Example
img, err := client.CameraManager.CaptureImage(ctx, "/dev/video0", 1280, 720, "mjpeg")

AI Manager

On-device AI model management and inference.

PermissionAiService/*
LoadModel Loads a model already present on the device filesystem.
Signature
func (m *AI Manager) LoadModel(modelID, modelPath string, backend ModelBackend, execution ExecutionMode) (*LoadModelResponse, error)
Parameters
NameTypeNotes
modelIDstring
modelPathstring
backendModelBackendONNX | TFLITE
executionExecutionModeCPU | GPU | NPU
Returns
NameTypeNotes
*LoadModelResponse
errorerror
Example
resp, err := client.AI Manager.LoadModel(
    "detector", "/models/yolo.onnx",
    ModelBackend_ONNX, ExecutionMode_NPU,
)
Infer Runs synchronous inference on a loaded model.
Signature
func (m *AI Manager) Infer(ctx context.Context, modelID string, inputData []byte, inputShape []int32, dtype TensorDataType) (*InferResponse, error)
Parameters
NameTypeNotes
ctxContext
modelIDstring
inputDatabytes
inputShape[]int32
dtypeTensorDataType
Returns
NameTypeNotes
*InferResponse
errorerror
Example
resp, err := client.AI Manager.Infer(
    ctx, "detector", inputData,
    []int32{1, 3, 640, 640}, TensorDataType_FLOAT32,
)

Firewall Manager

Network firewall zone and rule management.

PermissionFirewallService/*
ListZones Returns all configured firewall zones.
Signature
func (f *FirewallManager) ListZones() ([]*ZoneRequest, error)
Returns
NameTypeNotes
[]ZoneRequest
errorerror
Example
zones, err := client.FirewallManager.ListZones()
AddRule Adds a firewall rule between two zones.
Signature
func (f *FirewallManager) AddRule(
    srcZone, dstZone string, protocol FirewallProtocol,
    srcIP string, destPort int32, action ZonePolicy, comment string,
) (bool, error)
Parameters
NameTypeNotes
srcZonestring
dstZonestring
protocolFirewallProtocol
srcIPstringCIDR or empty for any
destPortint320 for any
actionZonePolicy
commentstring
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.FirewallManager.AddRule(
    "lan", "wan", FirewallProtocol_TCP,
    "", 443, ZonePolicy_ACCEPT, "allow HTTPS",
)

VPN Manager

VPN profile management and connection control.

PermissionVpnService/*
ApplyWireGuard Creates or updates a WireGuard VPN profile from a raw .conf file.
Signature
func (v *VPNManager) ApplyWireGuard(displayName string, configData []byte, autoConnect bool) (string, error)
Parameters
NameTypeNotes
displayNamestring
configDatabytesRaw WireGuard .conf content
autoConnectbool
Returns
NameTypeNotes
profileIDstring
errorerror
Example
profileID, err := client.VPNManager.ApplyWireGuard("office", confBytes, true)
Connect Starts a VPN session for the given profile.
Signature
func (v *VPNManager) Connect(profileID string) (string, error)
Parameters
NameTypeNotes
profileIDstring
Returns
NameTypeNotes
sessionIDstring
errorerror
Example
sessionID, err := client.VPNManager.Connect(profileID)
Disconnect Terminates the VPN session for the given profile.
Signature
func (v *VPNManager) Disconnect(profileID string) (bool, error)
Parameters
NameTypeNotes
profileIDstring
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.VPNManager.Disconnect(profileID)

App Hub Manager

Service registration and HTTP routing via the Orbit app hub.

PermissionAppHubService/*
RegisterWebUI Registers a local HTTP server as the app web UI.
Signature
func (m *AppHubManager) RegisterWebUI(addr, route string) error
Parameters
NameTypeNotes
addrstringe.g. "localhost:8080"
routestringe.g. "/ui"
Returns
NameTypeNotes
errorerror
Example
err := client.AppHubManager.RegisterWebUI("localhost:8080", "/ui")
AddRoute Adds an HTTP route to the routing table.
Signature
func (m *AppHubManager) AddRoute(path string) error
Parameters
NameTypeNotes
pathstring
Returns
NameTypeNotes
errorerror
Example
err := client.AppHubManager.AddRoute("/api/v1")

Event Manager

System-wide event bus.

PermissionEventService/*
Subscribe Subscribes to system events. Calls handler for each event. Blocks until context is cancelled.
Signature
func (e *EventManager) Subscribe(ctx context.Context, handler func(*Event), types ...EventType) error
Parameters
NameTypeNotes
ctxContext
handlerfunc(*Event)
types...EventTypeOmit to receive all events
Returns
NameTypeNotes
errorerror
Example
err := client.EventManager.Subscribe(ctx, func(e *Event) {
    fmt.Println(e.Type, e.Payload)
}, EventType_WIFI_CONNECTED)

Development Manager

Live log streaming from running applications.

PermissionDevelopmentService/*
SubscribeLogs Streams log entries matching the given filter. Blocks until context is cancelled.
Signature
func (d *DevelopmentManager) SubscribeLogs(ctx context.Context, filter LogFilter, onEntry func(LogEntry)) error
Parameters
NameTypeNotes
ctxContext
filterLogFilter{ App, Tag, MinLevel }
onEntryfunc(LogEntry)
Returns
NameTypeNotes
errorerror
Example
err := client.DevelopmentManager.SubscribeLogs(ctx, LogFilter{App: "myapp"}, func(e LogEntry) {
    fmt.Println(e.Timestamp, e.Message)
})

Update Manager

OTA firmware update and factory reset.

PermissionUpdateService/*
Update Sends a .orbit system image to the device to perform an OS update.
Signature
func (u *UpdateManager) Update(ctx context.Context, orbitPath string) error
Parameters
NameTypeNotes
ctxContext
orbitPathstring
Returns
NameTypeNotes
errorerror
Example
err := client.UpdateManager.Update(ctx, "/path/to/update.orbit")
FactoryReset Performs a factory reset, erasing all user data.
Signature
func (u *UpdateManager) FactoryReset() (bool, error)
Returns
NameTypeNotes
okbool
errorerror
Example
ok, err := client.UpdateManager.FactoryReset()

Power Manager

Device power control.

PermissionPowerService/*
Reboot Reboots the device.
Signature
func (p *PowerManager) Reboot(force bool, reason string) (*PowerResult, error)
Parameters
NameTypeNotes
forcebool
reasonstring
Returns
NameTypeNotes
*PowerResult{ Success, Message }
errorerror
Example
res, err := client.PowerManager.Reboot(false, "update")
Shutdown Shuts down the device.
Signature
func (p *PowerManager) Shutdown(force bool, reason string) (*PowerResult, error)
Parameters
NameTypeNotes
forcebool
reasonstring
Returns
NameTypeNotes
*PowerResult{ Success, Message }
errorerror
Example
res, err := client.PowerManager.Shutdown(false, "maintenance")

Types

Complex objects returned or accepted by the SDK methods.

GpioPin Identifies a GPIO line by chip index and line offset.
Fields
FieldTypeDescription
NamestringHuman-readable pin name (e.g. "GPIO17", "PWM0_OUT")
Numberint32Line offset within the chip
ChipNumberint32Chip index (0 = /dev/gpiochip0)
MetricsInfoResponse Response returned by SystemManager.GetMetrics.
Fields
FieldTypeDescription
Metrics*MetricsInfoSystem metrics snapshot
Error*ErrorInfoNon-nil when the request failed
MetricsInfo Full snapshot of system metrics at the time of the call.
Fields
FieldTypeDescription
SysUptime*MetricsInfo_SysUptimeSystem uptime and load
CpuUsagefloat64Overall CPU usage (0–100 %)
CpuCorePercent[]float64Per-core CPU usage (0–100 %)
MemoryUsagefloat64Memory usage percentage
SocThermalfloat64SoC temperature (°C)
CpuStats*MetricsInfo_CpuStatsCPU context-switch and interrupt counters
CpuFreq*MetricsInfo_CpuFreqCPU frequency info (MHz)
VirtualMemory*MetricsInfo_VirtualMemoryDetailed memory breakdown
DiskUsagemap[string]*MetricsInfo_DiskUsageDisk usage per mount point
DiskIoCounters*MetricsInfo_DiskIoCountersDisk I/O counters
Network*MetricsInfo_NetworkNetwork I/O counters
SensorsTemperaturesint32Sensor temperature reading
MetricsInfo_SysUptime System uptime and load average.
Fields
FieldTypeDescription
TimestringCurrent system time string
Uptimeint64Uptime in seconds
Usersint32Number of logged-in users
LoadAverage[]float641-min, 5-min, 15-min load averages
MetricsInfo_CpuStats CPU context-switch and interrupt counters since boot.
Fields
FieldTypeDescription
CtxSwitchesint64Total context switches
Interruptsint64Total hardware interrupts
SoftInterruptsint64Total software interrupts
Syscallsint64Total system calls
MetricsInfo_CpuFreq CPU frequency information in MHz.
Fields
FieldTypeDescription
Currentfloat64Current CPU frequency (MHz)
Minfloat64Minimum CPU frequency (MHz)
Maxfloat64Maximum CPU frequency (MHz)
MetricsInfo_VirtualMemory Detailed virtual memory breakdown (all sizes in bytes).
Fields
FieldTypeDescription
Totalint64Total installed RAM (bytes)
Availableint64Available memory (bytes)
Percentfloat64Usage percentage
Usedint64Used memory (bytes)
Freeint64Free memory (bytes)
Activeint64Active memory (bytes)
Inactiveint64Inactive memory (bytes)
Buffersint64Buffer cache (bytes)
Cachedint64Page cache (bytes)
Sharedint64Shared memory (bytes)
Slabint64Kernel slab cache (bytes)
MetricsInfo_DiskUsage Disk usage for a single mount point (all sizes in bytes).
Fields
FieldTypeDescription
Totalint64Total disk size (bytes)
Usedint64Used space (bytes)
Freeint64Free space (bytes)
Percentfloat64Usage percentage
MetricsInfo_DiskIoCounters Disk I/O counters since boot.
Fields
FieldTypeDescription
ReadCountint64Number of reads
WriteCountint64Number of writes
ReadBytesint64Bytes read
WriteBytesint64Bytes written
ReadTimeint64Time spent reading (ms)
WriteTimeint64Time spent writing (ms)
ReadMergedCountint64Merged read operations
WriteMergedCountint64Merged write operations
BusyTimeint64Time disk was busy (ms)
MetricsInfo_Network Aggregated network I/O counters across all interfaces.
Fields
FieldTypeDescription
BytesSentint64Total bytes sent
BytesRecvint64Total bytes received
PacketsSentint64Total packets sent
PacketsRecvint64Total packets received
Errinint64Total input errors
Erroutint64Total output errors
Dropinint64Total inbound packets dropped
Dropoutint64Total outbound packets dropped
EthernetLinkProperties Link-layer and IP properties of an Ethernet interface.
Fields
FieldTypeDescription
InterfaceNamestringInterface name (e.g. "eth0")
MacAddressstringMAC address
StateEthernetStateCurrent link state
Mtuint32Maximum transmission unit
DhcpEnableboolTrue when DHCP is active
ZoneRequest Firewall zone definition (as returned by ListZones).
Fields
FieldTypeDescription
NamestringZone name (e.g. "lan", "wan")
Interfaces[]stringNetwork interfaces assigned to this zone
InputPolicyZonePolicyPOLICY_ACCEPT | POLICY_DROP | POLICY_REJECT
OutputPolicyZonePolicyPOLICY_ACCEPT | POLICY_DROP | POLICY_REJECT
MasqueradeboolEnable NAT masquerade (typically wan only)
FirewallRule A firewall traffic rule as returned by ListRules.
Fields
FieldTypeDescription
IdstringServer-generated rule ID
SrcZonestringSource zone (empty = any)
DstZonestringDestination zone (empty = any)
ProtocolFirewallProtocolPROTO_ANY | PROTO_TCP | PROTO_UDP | PROTO_ICMP
SrcIpstringSource IP/CIDR (empty = any)
DestPortint32Destination port (0 = any)
ActionZonePolicyPOLICY_ACCEPT | POLICY_DROP | POLICY_REJECT
CommentstringOptional description