Example Code for AT command
Last revision 2026/06/08
This article compiles AT command example codes and UART AT communication, covering AT+INVOKE inference calls, model switching AT+MODEL, TSCORE/TIOU/TSIMILARITY threshold configuration, and gesture/posture learning instructions.
AT Command Tutorial
Common AT commands are listed below. For more, please refer to the additional documentation: SEN0670_UART_Communication_Protocol_V.10.pdf.
| AT Command | Description | Response |
|---|---|---|
AT+ID? |
Query device ID | {"type":0,"name":"ID?","code":0,"code_text":"EL_OK","ok":1,"data":"3343029e"} |
AT+NAME? |
Query device name | {"type":0,"name":"NAME?","code":0,"code_text":"EL_OK","ok":1,"data":"DFRobot Human Pose"} |
AT+VER? |
Query firmware version | {"type": 0, "name": "VER?", "code": 0, "code_text": "EL_OK", "ok": 1, "data": {"at_api": "v0", "software": "2026.04.14", "hardware": "v1.0.0"}} |
AT+RST |
Restart device | The device resets immediately; usually no complete success packet is received. |
AT+MODELS? |
Query model list | {"type": 0, "name": "MODELS?", "code": 0, "code_text": "EL_OK", "ok": 1, "data": [{"id": 4, "type": 0, "address": 11669504, "size": 3010560}, {"id": 3, "type": 0, "address": 9322496, "size": 2347008}, {"id": 2, "type": 0, "address": 6963200, "size": 2359296}, {"id": 1, "type": 0, "address": 4194304, "size": 2768896}]} |
AT+MODEL? |
Query current model | {"type": 0, "name": "MODEL?", "code": 0, "code_text": "EL_OK", "ok": 1, "data": {"id": 3, "type": 0, "address": 9322496, "size": 2347008}} |
AT+MODEL=1 |
Switch to hand model (custom gesture) | {"type": 0, "name": "MODEL", "code": 0, "code_text": "EL_OK", "ok": 1, "data": {"model": {"id": 1, "type": 0, "address": 4194304, "size": 2768896}}} |
AT+MODEL=3 |
Switch to posture model (custom posture) | {"type": 0, "name": "MODEL", "code": 0, "code_text": "EL_OK", "ok": 1, "data": {"model": {"id": 3, "type": 0, "address": 9322496, "size": 2347008}}} |
AT+MODEL=4 |
Switch to gesture model (fixed gestures) | {"type": 0, "name": "MODEL", "code": 0, "code_text": "EL_OK", "ok": 1, "data": {"model": {"id": 4, "type": 0, "address": 11669504, "size": 3010560}}} |
AT+INVOKE=<n_times>,<differed>,<result_only> |
Perform inference, e.g., one inference only result: AT+INVOKE=1,0,1 |
{"type": 0, "name": "INVOKE", "code": 0, "data": {"timestamp_ms": 1248979, "model": {"id": 4, "type": 0, "address": 11669504, "size": 3010560}, "algorithm": {"type": 6, "categroy": 1, "input_from": 1, "config": {"tscore": 60, "tiou": 45}}, "sensor": {"id": 1, "type": 1, "state": 1, "opt_id": 0, "opt_detail": "240x240 Auto"}}} {"type": 1, "name": "INVOKE", "code": 0, "data": {"count": 1, "seq": 1, "timestamp_ms": 1249074, "image_base64_len": 0, "perf": [9, 85, 0], "boxes": [], "resolution": [240, 240]}} |
AT+BREAK |
Stop current task | {"type": 0, "name": "BREAK", "code": 0, "code_text": "EL_OK", "ok": 1, "data": 1346635} |
AT+TPROTO=0 |
Switch to JSON output | {"type": 0, "name": "TPROTO", "code": 0, "data": 0, "message": "TPROTO updated"} |
AT+TPROTO? |
Query output protocol | {"type":0,"name":"TPROTO?","code":0,"data":0} |
AT+TKPTS=0 |
Disable keypoint output | {"type": 0, "name": "TKPTS", "code": 0, "data": 0, "message": "TKPTS updated"} |
AT+TKPTS=1 |
Enable keypoint output | {"type": 0, "name": "TKPTS", "code": 0, "data": 1, "message": "TKPTS updated"} |
AT+TKPTS? |
Query keypoint output configuration | {"type": 0, "name": "TKPTS?", "code": 0, "data": 1} |
AT+TSCORE? |
Query confidence threshold | {"type": 0, "name": "TSCORE?", "code": 0, "code_text": "EL_OK", "ok": 1, "data": 60} |
AT+TSCORE=60 |
Set confidence threshold to 60 | {"type":0,"name":"TSCORE","code":0,"code_text":"EL_OK","ok":1,"data":60} |
AT+TIOU? |
Query IoU threshold | {"type": 0, "name": "TIOU?", "code": 0, "code_text": "EL_OK", "ok": 1, "data": 45} |
AT+TIOU=45 |
Set IoU threshold to 45 | {"type": 0, "name": "TIOU", "code": 0, "code_text": "EL_OK", "ok": 1, "data": 45} |
AT+TSIMILARITY? |
Query learning similarity threshold | {"type": 0, "name": "TSIMILARITY?", "code": 0, "code_text": "EL_OK", "ok": 1, "data": 60} |
AT+TSIMILARITY=80 |
Set learning similarity threshold to 80 | {"type": 0, "name": "TSIMILARITY", "code": 0, "code_text": "EL_OK", "ok": 1, "data": 80} |
AT+HANDAUTOLEARN |
Automatically name and start gesture learning | {"type": 0, "name": "HANDAUTOLEARN", "code": 0, "data": {"hand_name": "Gesture_1"}} |
AT+HANDLIST? |
Query learned gestures | {"type": 0, "name": "HANDLIST?", "code": 0, "data": []} |
AT+HANDCLEAR |
Clear all gestures | {"type": 0, "name": "HANDCLEAR", "code": 0} |
AT+POSEAUTOLEARN |
Automatically name and start posture learning | {"type": 0, "name": "POSEAUTOLEARN", "code": 0, "data": {"pose_name": "Posture_1"}} |
AT+POSELIST? |
Query learned postures | {"type": 0, "name": "POSELIST?", "code": 0, "data": []} |
AT+POSECLEAR |
Clear all postures | {"type": 0, "name": "POSECLEAR", "code": 0} |
AT Communication Example
Preparation: Connect the sensor to the PC via USB and open a serial terminal software such as sscom.

NOTE:
If there are garbled or invisible characters in the content returned by the serial port, but some valid fields can be seen, it indicates that the module may not currently be in JSON text output mode. Please send the following command to switch the output protocol first:
AT+TPROTO=0
After successful switching, send again:
AT+ID?
Normally, JSON format data will be returned, for example:
{"type":0,"name":"ID?","code":0,"code_text":"EL_OK","ok":1,"data":"3343029e"}
Was this article helpful?
