Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

134 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmhi-gateway

Go Reference CI FOSSA Status

Go library for interacting with T-Mobile Home Internet gateways (Nokia and Arcadyan models).

Features

  • Authenticate with Nokia and Arcadyan gateways
  • Reboot gateway devices
  • Retrieve signal strength information
  • Check gateway status
  • Make custom HTTP requests to gateway APIs

Installation

go get github.com/hugoh/tmhi-gateway/v2

Quick Start

package main

import (
    "fmt"
    "time"

    gateway "github.com/hugoh/tmhi-gateway/v2"
)

func main() {
    cfg := &gateway.GatewayConfig{
        Host:     "192.168.12.1",
        Username: "admin",
        Password: "your-password",
        Timeout:  5 * time.Second,
    }

    gw := gateway.NewArcadyanGateway(cfg)

    result, err := gw.Login()
    if err != nil {
        panic(err)
    }

    fmt.Println("Logged in:", result.Success)
}

Supported Gateways

  • Nokia (NewNokiaGateway(cfg))
  • Arcadyan (NewArcadyanGateway(cfg))

API

Gateway Interface

All gateway implementations satisfy the Gateway interface:

type Gateway interface {
    Login() (*LoginResult, error)
    Reboot() error
    Request(method, path string) (*InfoResult, error)
    Info() (*InfoResult, error)
    Status() (*StatusResult, error)
    Signal() (*SignalResult, error)
}

Response Types

  • LoginResult - Authentication result with token/session info
  • StatusResult - Gateway status check result
  • SignalResult - Signal strength information (4G/5G metrics)
  • InfoResult - Gateway information response

Development

Prerequisites

  • mise (task runner and tool manager)

Running Tests

# Run all tests
mise test

# Run CI checks (lint + test + coverage)
mise ci

License

MIT License - see LICENSE for details.

FOSSA Status

About

Go library for interacting with T-Mobile Home Internet 5G gateways (Nokia, Arcadyan) - auth, reboot, signal, status

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages