type BaseArgs struct {
IMEI string
}
返回的lat, lng为原始坐标
GetGPSInfo
请求参数:
type BaseArgs struct {
IMEI string
}
type GPSInfoReply struct {
Lat float64
Lng float64
}
GetIMEI
请求参数:
type BaseArgs struct {
IMEI string
}
*string
GetICCID
go
type BaseArgs struct {
IMEI string
}
返回参数: *string
第一个参数 0 不启用该通道; 1 TCP/UDP 透传; 2 MQTT 透传; 3 塔石 DTU 云连接; 4 塔石 IOT 云连接; 5 HTTP 传输模式; 6 阿里云直连 B 取值范围 1~4,代表 4 个不同的 SOCKET 通道,省略时仅配置通道 1 默认值:+DTUMODE:1,0,0,0 默认第一路为 TCP/UDP 透传,其他几路为默认关闭
SetDTUMode
请求参数:
type SetDTUModeArgs struct {
BaseArgs
Mode int // 模式
Channel int // 通道
}
*string
A 取值范围 1-4,代表 4 个不同的 SOCKET 通道 B 为 TCP 或者 UDP C 为服务器地址,可填域名或 IP,长度最大 255 D 为端口号,范围 1~65535
SetServerAddr
go
type ServerAddrArgs struct {
BaseArgs
Channel int // 通道
LinkType string // 连接类型
Ip string // Ip或域名
Port int // 端口
}
返回参数: EmptyResult
GetServerAddr
BaseArgs
type Addr struct { Channel int // 通道 LinkType string // 连接类型 Addr string // IP或域名 Port int // 端口 }
#### 1.7 设置串口参数
> 格式:AT+UARTCFG=A,B,C,D
A 串口波特率,支持的波特率为 115200、57600、38400、19200、14400、9600、4800、 2400、1200
B 数据位,取值范围 0~1 0 7 位数据位 1 8 位数据位
C 校验位,取值范围 0~2 0 无校验 NONE 1 奇校验 ODD 2 偶校验 EVEN
D 停止位,取值范围 0~1 0 1 位停止位 1 2 位停止位
默认值:+UARTCFG:9600,1,0,0(9600,8,N,1)
* 方法名: `SetUARTParam`
* 请求参数:
```go
type UARTArgs struct {
BaseArgs
Rate int // 波特率
DBit int // 数据位
CBit int // 校验位
SBit int // 停止位
}
EmptyResult
返回值含义参考1.7说明
GetUARTParam
BaseArgs
返回参数:
type UARTReply struct {
Rate int // 波特率
DBit int // 数据位
CBit int // 校验位
SBit int // 停止位
}
SetDTUID
go
type DTUIDArgs struct {
BaseArgs
Mode int
IdType int
Format int
Content string
Channel int
}
返回参数: EmptyResult
GetDTUID
BaseArgs
type DTUID struct { Mode int IdType int Format int Content string Channel int } ```