AT消息 ================= 从 BK7238 命令端口返回的消息有两种类型:被动响应和主动报告。 ------------------- BK7238被动响应 ------------------- 每个输入每条命令都会返回响应,告诉发送者命令的执行结果。 +---------------------+------------------------------------+ |AT被动响应 |说明 | +=====================+====================================+ |OK |AT 命令处理完毕,返回 OK | +---------------------+------------------------------------+ |ERROR |AT 命令错误或执行过程中发生错误 | +---------------------+------------------------------------+ |SEND OK |数据已发送到协议栈 | +---------------------+------------------------------------+ |SEND FAIL |向协议栈发送数据时发生错误 | +---------------------+------------------------------------+ |+<Command Name>:... |详细描述 AT 命令处理结果 | +---------------------+------------------------------------+ ------------------- BK7238主动报告 ------------------- BK7238在执行过程中会报告系统中重要的状态变化或消息。 +-------------------------------------------+----------------------------------------------------------+ |AT消息报告 |说明 | +===========================================+==========================================================+ |ready |上电初始化完成AT指令已经准备就绪 | +-------------------------------------------+----------------------------------------------------------+ |bk_reboot |立即重启模块 | +-------------------------------------------+----------------------------------------------------------+ |WIFI CONNECTED |Wi-Fi station 接口已连接到 AP | +-------------------------------------------+----------------------------------------------------------+ |WIFI GOT IP |Wi-Fi station 接口已获取 IPv4 地址 | +-------------------------------------------+----------------------------------------------------------+ |[<conn_id>,]CONNECT |ID 为 <conn_id> 的网络连接已建立(默认情况下,ID 为 0) | +-------------------------------------------+----------------------------------------------------------+ |[<conn_id>,]CLOSED |ID 为 <conn_id> 的网络连接已断开(默认情况下,ID 为 0) | +-------------------------------------------+----------------------------------------------------------+ |+STA_CONNECTED:<sta_mac> |station 已连接到Wi-Fi softAP 接口 | +-------------------------------------------+----------------------------------------------------------+ |+DIST_STA_IP:<sta_mac>,<sta_ip> |Wi-Fi softAP 接口给 station 分配IP 地址 | +-------------------------------------------+----------------------------------------------------------+ |+STA DISCONNECTED: <sta_mac> |station 与 BK-AT 的 Wi-Fi softAP 接口的连接断开 | +-------------------------------------------+----------------------------------------------------------+ |> |正在等待用户输入数据 | +-------------------------------------------+----------------------------------------------------------+ |+IPD |已收到来自网络的数据 | +-------------------------------------------+----------------------------------------------------------+ |+QUIT |退出 Wi-Fi 透传模式 | +-------------------------------------------+----------------------------------------------------------+ |+MQTTCONNECTED |MQTT 已连接到 broker | +-------------------------------------------+----------------------------------------------------------+ |+MQTTDISCONNECTED |MQTT 与 broker 已断开连接 | +-------------------------------------------+----------------------------------------------------------+ |+MQTTSUBRECV |MQTT 已从 broker 收到数据 | +-------------------------------------------+----------------------------------------------------------+ |+MQTTPUB:FAIL |MQTT 发布数据失败 | +-------------------------------------------+----------------------------------------------------------+ |+MQTTPUB:OK |MQTT 发布数据完成 | +-------------------------------------------+----------------------------------------------------------+ |+BLECONN |Bluetooth LE 连接已建立 | +-------------------------------------------+----------------------------------------------------------+ |+BLEDISCONN |Bluetooth LE 连接已断开 | +-------------------------------------------+----------------------------------------------------------+ |+READ |通过 Bluetooth LE 连接进行读取操作 | +-------------------------------------------+----------------------------------------------------------+ |+WRITE |通过 Bluetooth LE 进行写入操作 | +-------------------------------------------+----------------------------------------------------------+ |+NOTIFY |BluetoothLE 连接的 notification | +-------------------------------------------+----------------------------------------------------------+ |+INDICATE |来自 Bluetooth LE 连接的 indication | +-------------------------------------------+----------------------------------------------------------+ |+BLESECNTFYKEY |Bluetooth LE SMP 密钥 | +-------------------------------------------+----------------------------------------------------------+ |+BLESECREQ:<conn_index> |收到来自 Bluetooth LE 连接的加密配对请求 | +-------------------------------------------+----------------------------------------------------------+ |+BLEAUTHCMPL:<conn_index>,<enc_result> |Bluetooth LE SMP 配对完成 | +-------------------------------------------+----------------------------------------------------------+