且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

GSM AT命令|如何上传.amr音频文件

更新时间:2023-01-07 15:27:15

我没有任何支持AT+FSWRITE命令的调制解调器. 但是根据SIMCOM AT指令手册,AT+FSWRITE=命令以提示符>响应. 手册没有明确说明如何使用该命令.

I don't have any modem that supports AT+FSWRITE command. But based on SIMcom AT-command manual, AT+FSWRITE= command responds with prompt: >. Manual does not clearly tell how to use the command.

但是它的工作方式可能与AT+CMGS=命令类似:

But it might work similar way than AT+CMGS= command:

  1. 发送AT+FSWRITE=1.arm,0,512,10命令到调制解调器.
  2. 从调制解调器中等待>.
  3. 将文件内容(512字节)写入调制解调器.
  4. 将Ctrl-Z字符(十六进制0x1A)发送到调制解调器.
  5. 从调制解调器中等待OK/ERROR.
  1. Send AT+FSWRITE=1.arm,0,512,10 command to modem.
  2. Wait > from the modem.
  3. Write content of the file (512 bytes) to the modem.
  4. Send Ctrl-Z char (0x1A hex) to the modem.
  5. Wait OK/ERROR from the modem.

步骤4可能不需要,因为文件的大小在命令中.

Step 4. may not be needed, because size of the file is in the command.