Documentation ¶
Overview ¶
utils.go: Convert to human readable format
Index ¶
- Constants
- func GetModem(huawei *HUAWEI) goat.Modem
- func MustInt(s string) (i int)
- func RemoveCrCL(str string) string
- func RemoveQuote(str string) string
- func Result2Array(str, prefix, sep string) []string
- type HCSQs
- type HUAWEI
- func (h *HUAWEI) ATI() (devices.Product, error)
- func (h *HUAWEI) C5GREG() (n NrRegStatus, err error)
- func (h *HUAWEI) CGPADDR() (ip net.IP, err error)
- func (h *HUAWEI) COPS() (result Plmn, err error)
- func (h *HUAWEI) CPIN() (ok bool, err error)
- func (h *HUAWEI) EONS() (str string, err error)
- func (h *HUAWEI) HCSQ() ([]HCSQs, error)
- func (h *HUAWEI) IMEI() (str string, err error)
- func (h *HUAWEI) Init(portName string, opt ...serial.Option)
- func (h *HUAWEI) LENDC() (L LenDc, err error)
- func (h *HUAWEI) NDISDUP(config int, on int) (ok bool, err error)
- func (h *HUAWEI) Result(str string) (bool, error)
- func (h *HUAWEI) SYSINFO() (d devices.SysInfoEx, err error)
- type LenDc
- type Lte
- type Modem
- func (m *Modem) CurrentNetwork() (string, error)
- func (m *Modem) DeviceInfo() (goat.Product, error)
- func (m *Modem) Dial() error
- func (m *Modem) IsNSA() bool
- func (m *Modem) IsRegistered() bool
- func (m *Modem) PDPAddr() (net.IP, error)
- func (m *Modem) PinLockStatus() bool
- func (m *Modem) SignalStrength() (data []goat.HCSQs, err error)
- type Nr
- type NrRegStatus
- type Plmn
- type Wcdma
Constants ¶
View Source
const ( //IMEI IMEI :) IMEI = "AT+GSN" //ATI ask minor information of devices. ATI = "ATI" //HCSQ ask what type of signal is using , and it's strength HCSQ = "AT^HCSQ?" //EONS Query network operator name and sim card EFSPN info EONS = "AT^EONS" //SYSINFOEX ask system(Network) Info SYSINFOEX = "AT^SYSINFOEX" //COPS Query is it register to operator. COPS = "AT+COPS?" //CPIN Query and management Pin code. CPIN = "AT+CPIN" //LENDC? Query it is NSA Signal LENDC = "AT^LENDC?" //C5GREG 5g register status C5GREG = "AT+C5GREG" //CGPADDR Get addr after dial CGPADDR = "AT+CGPADDR" NDISDUP = "AT^NDISDUP" )
View Source
const ( //No service NoService = "NOSERVICE" //GSM GSM/GRPS/EDGE mode GSM = "GSM" //WCDMA WCDMA/HSDPA/HSPA mode WCDMA = "WCDMA" //LTE <-mode LTE = "LTE" //NR : 5G!!!!! NR = "NR" )
Network mode status
Variables ¶
This section is empty.
Functions ¶
func Result2Array ¶
Types ¶
type HCSQs ¶
func (*HCSQs) Serialization ¶
type HUAWEI ¶
func (*HUAWEI) C5GREG ¶
func (h *HUAWEI) C5GREG() (n NrRegStatus, err error)
C5GREG: AT+C5GREG Only use it when it using 5g networking.
type LenDc ¶
type LenDc struct { //Enable Enable bool `json:"enable"` //Is it support endc(NR)? Available bool `json:"endc_available"` // false : not support , true , support. PlmnAvailable bool `json:"endc_plmn_available"` // false mean restricted , true means note restricted Restricted bool `json:"endc_restricted"` //Is is NR ENDC now Pscell bool `json:"nr_pscell"` }
type Modem ¶
type Modem struct {
// contains filtered or unexported fields
}
func (*Modem) CurrentNetwork ¶
What Network provider now?
func (*Modem) PinLockStatus ¶
Pin management PinLockStatus Query pin lock status
type NrRegStatus ¶
Only use it when it using 5g status
Click to show internal directories.
Click to hide internal directories.