Documentation ¶
Index ¶
- Constants
- Variables
- func AuthRobot(client *ble.VectorBLE) (bool, error)
- func BluetoothSetupAPI(w http.ResponseWriter, r *http.Request)
- func ConnectVector(client *ble.VectorBLE, device int) error
- func CreateCertCombo() error
- func CreateServerConfig()
- func FixBLEDriver()
- func InitBle() (*ble.VectorBLE, error)
- func IsDevRobot(esn, firmware string) bool
- func RegisterBLEAPI()
- func RegisterSSHAPI()
- func RobotStatus(client *ble.VectorBLE) string
- func SSHSetup(w http.ResponseWriter, r *http.Request)
- func SendPin(pin string, client *ble.VectorBLE) error
- func SetupBotViaSSH(ip string, key []byte) error
- type ClientServerConfig
- type VectorsBle
- type WifiNetwork
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 BluetoothSetupAPI ¶ added in v1.2.7
func BluetoothSetupAPI(w http.ResponseWriter, r *http.Request)
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 IsDevRobot ¶ added in v1.2.7
func RegisterBLEAPI ¶ added in v1.2.7
func RegisterBLEAPI()
func RegisterSSHAPI ¶
func RegisterSSHAPI()
func RobotStatus ¶ added in v1.2.7
func SetupBotViaSSH ¶
Types ¶
type ClientServerConfig ¶
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
Click to show internal directories.
Click to hide internal directories.