Skip to content

WIFI定位

本文档介绍了用于WIFI定位的指令,详细参数取值及取值说明参考域格Cat.1模组(移芯EC716平台系列)AT指令手册 V2.4手册

指令介绍

AT+WIFILOC

语法规则:

命令类型 语法 返回
设置命令 AT+WIFILOC=<type>,<cid>[,<wifi_scan_type>][,] if <type>=1:
+WIFILOC:<locationcode>[,<latitude>,<longitude>,<date>,<time>]
OK
if <type>=2:
+WIFILOC: <locationcode>[,<date>,<time> ok

参数定义:

参数 定义 取值 说明
<type> 操作类型 0 查看精度、纬度和时间
1 只查看时间
<cid> As <cid> defined in +SAPBR 1-3
<wifi_scan_type> 扫描类型 0 WIFI SCAN时:数据优先
1 WIFI SCAN时:扫描优先
<key> 访问服务器的秘钥 可选参数, 不设置使用默认的key
<latitude> 当前经度(以度为单位) 经度(小数点后保留 7 位)
<longitude> 当前纬度(以度为单位) 纬度(小数点后保留 7 位)
<data> 格式为 yy/mm/dd 例如 2024/12/27
<time> 格式为 hh/mm/ss 例如 10:11:30
<locationcode> 错误码 详细取值参考AT指令手册

举例演示

» AT+SAPBR=3,1,"Contype","GPRS"//设置 GPRS 承载类型
OK

» AT+SAPBR=3,1,"APN",""//配置 APN 参数
OK

» AT+SAPBR=1,1//激活 GPRS PDP 上下文
OK

»AT+WIFILOC=1,1//获取经纬度 + 时间
+WIFILOC: 0,31.833186,117.134892,2024/12/27,10:04:00
OK

»AT+WIFILOC=2,1//仅获取时间
+WIFILOC: 0,2024/12/27,10:04:09
OK