botsetup

package
v1.2.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 28 Imported by: 2

Documentation

Index

Constants

View Source
const BotSetupPath = "/data/pod-bot-install.sh"

path to copy to

Variables

View Source
var BleClient *ble.VectorBLE
View Source
var BleInited bool
View Source
var BleStatusChan chan ble.StatusChannel
View Source
var LogStatus string
View Source
var OtaStatus string
View Source
var SSHSettingUp bool = false
View Source
var SetupSSHStatus string = "not running"
View Source
var SetupScriptPath = "../vector-cloud/pod-bot-install.sh"

this file will be copied to the bot

Functions

func AuthRobot added in v1.2.7

func AuthRobot(client *ble.VectorBLE) (bool, error)

func BluetoothSetupAPI added in v1.2.7

func BluetoothSetupAPI(w http.ResponseWriter, r *http.Request)

func ConnectVector added in v1.2.7

func ConnectVector(client *ble.VectorBLE, device int) error

func CreateCertCombo

func CreateCertCombo() error

creates and exports a priv/pub key combo generated with IP address

func CreateServerConfig

func CreateServerConfig()

outputs a server config to ../certs/server_config.json

func FixBLEDriver added in v1.2.8

func FixBLEDriver()

func InitBle added in v1.2.7

func InitBle() (*ble.VectorBLE, error)

func IsDevRobot added in v1.2.7

func IsDevRobot(esn, firmware string) bool

func RegisterBLEAPI added in v1.2.7

func RegisterBLEAPI()

func RegisterSSHAPI

func RegisterSSHAPI()

func RobotStatus added in v1.2.7

func RobotStatus(client *ble.VectorBLE) string

func SSHSetup

func SSHSetup(w http.ResponseWriter, r *http.Request)

func SendPin added in v1.2.7

func SendPin(pin string, client *ble.VectorBLE) error

func SetupBotViaSSH

func SetupBotViaSSH(ip string, key []byte) error

Types

type ClientServerConfig

type ClientServerConfig struct {
	Jdocs    string `json:"jdocs"`
	Token    string `json:"tms"`
	Chipper  string `json:"chipper"`
	Check    string `json:"check"`
	Logfiles string `json:"logfiles"`
	Appkey   string `json:"appkey"`
}

type VectorsBle added in v1.2.7

type VectorsBle struct {
	ID      int    `json:"id"`
	Name    string `json:"name"`
	Address string `json:"address"`
}

need JSONable type

func ScanForVectors added in v1.2.7

func ScanForVectors(client *ble.VectorBLE) ([]VectorsBle, error)

type WifiNetwork added in v1.2.7

type WifiNetwork struct {
	SSID     string `json:"ssid"`
	AuthType int    `json:"authtype"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL