企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
&emsp;&emsp;打开 atcmd_proxy.h 文件,该文件基于atcmd实现了对NBIoT模块(型号为BC260Y)的互操作,并抽象出一系列的接口给上层应用进行集成,接口列表如下: * AT 指令测试: ``` ATCMD_TEST(on_message, on_timeout, arg) ``` * 获取IMEI: ``` ATCMD_GET_IMEI(on_message, on_timeout, arg) ``` * 检查SIM卡是否正常: ``` ATCMD_CHECK_SIMCARD(on_message, on_timeout, arg) ``` * 获取SIM卡 CIME 码: ``` ATCMD_GET_SIMCARD_CIME(on_message, on_timeout, arg) ``` * 获取SIM卡ICCID码: ``` ATCMD_GET_SIMCARD_ICCID(on_message, on_timeout, arg) ``` * 设置 Band: ``` ATCMD_SET_BAND(n, on_message, on_timeout, arg) ``` * 设置 PSM: ``` ATCMD_SET_PSM(enable, T3412_Step, T3412_Value, T3324_Step, T3324_Value, on_message, on_timeout, arg) ``` * 使能休眠功能: ``` ATCMD_SLEEP_ENABLE(on_message, on_timeout, arg) ``` * 关闭休眠功能: ``` ATCMD_SLEEP_DISABLE(on_message, on_timeout, arg) ``` * 获取 PDP 类型: ``` ATCMD_GET_PDP_TYPE(on_message, on_timeout, arg) ``` * 设置 PDP 类型: ``` ATCMD_SET_PDP_TYPE(type, on_message, on_timeout, arg) ``` * 尝试获取 IP 地址: ``` ATCMD_GET_IP(on_message, on_timeout, arg) ``` * 获取型号强度: ``` ATCMD_GET_LQI(on_message, on_timeout, arg) ``` * 获取网络状态: ``` ATCMD_GET_NWK_STATUS(on_message, on_timeout, arg) ``` * 获取注册状态: ``` ATCMD_GET_REG_STATUS(on_message, on_timeout, arg) ``` * 获取时间: ``` ATCMD_GET_TIME(on_message, on_timeout, arg) ``` * 获取 DNS 地址: ``` ATCMD_GET_DNS_ADDR(on_message, on_timeout, arg) ``` * DNS 解析: ``` ATCMD_DNS_PARSER(domain, on_message, on_timeout, arg) ``` * 创建 UDP 连接: ``` ATCMD_UDP_CONNECT(host, port, on_message, on_timeout, arg) ``` * UDP 发送数据: ``` ATCMD_UDP_PRESEND(len, on_message, on_timeout, arg) ATCMD_UDP_SEND(data, len, on_message, on_timeout, arg) ``` * 关闭 UDP 连接: ``` ATCMD_UDP_CLOSE(on_message, on_timeout, arg) ``` * MQTT 相关接口: ``` ATCMD_MQTT_OPEN(host, port, on_message, on_timeout, arg) ATCMD_MQTT_CONNECT(clientId, username, passwd, on_message, on_timeout, arg) ATCMD_MQTT_SUB(topic, qos, on_message, on_timeout, arg) ATCMD_MQTT_PRE_SEND(topic, len, on_message, on_timeout, arg) ATCMD_MQTT_PUB(msg, len, on_message, on_timeout, arg) ATCMD_MQTT_CONFIG_VERSION(ver, on_message, on_timeout, arg) ATCMD_MQTT_CLOSE(on_message, on_timeout, arg) ``` * 发送重启命令: ``` ATCMD_RESTART(on_message, on_timeout, arg) ``` <br/>