RT-Thread / RT-Thread/rt-thread
AT命令中出现数字会出现命令匹配失败的情况
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
我在使用AT组件的过程中发现一个比较有意思的问题。
举例如下:
我自己定义了一个命令:AT+SACNI2C
在运行的时候,发现输入该命令后会返回命令匹配错误的日志。
经过检查代码发现,AT SERVER的实现中关于获取AT命令名字的函数中,将数字0~9也作为了结束标志。
也就是我前面的指令的名称被解析为了AT+SACNI而不是我想要的AT+SACNI2C。
具体代码位置在这里
我想了解下是出于什么原因需要将数字0~9也作为AT名称的结束标志?
希望了解的朋友能给我指点下。
感谢。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at components/net/at/src/at_server.c around line 406 and reproduce the parsing behavior with the custom command AT+SACNI2C. Trace how the AT SERVER extracts command names and determine the intended terminator rules for digits. Done means the command-name parsing behavior is documented or corrected without breaking existing AT commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100