At Command For Mms

  • Uploaded by: kalyanmn
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View At Command For Mms as PDF for free.

More details

  • Words: 1,223
  • Pages: 13
Putal

TCP/IP MMS

AT COMMAND

Putal TCP/IP MMS AT COMMAND Revision 2.10 Nov. 1 , 2008

Putal Guangzhou Putal Communication Technology Co., Ltd

[email protected]

1/13

Putal Document Name

Putal TCP/IP MMS AT COMMAND

Version:

V2.10

Date:

2008-11-1

Doc Id:

Putal_TCP/IP_MMS_AT_V2.00

Status:

Release

TCP/IP MMS

AT COMMAND

General Notes Putal offers this information as a service to its customers, to support application and engineering efforts that use Putal products. The information provided is based upon requirements specifically provided to Putal by the customers. Putal has not undertaken any independent search for additional relevant information, including any information that may be in the customer’s possession. Furthermore, system validation of this Putal product within a larger electronic system remains the responsibility of the customer or the customer’s system integrator. All specifications supplied herein are subject to change. Copyright This document contains proprietary technical information which is the property of Putal Limited., copying of the document and giving it to others and the using or communication of the contents thereof, are forbidden without express authority. Offenders are liable to the payment of damages. All rights reserved in the events of grant of patent or the registration of a utility model or design. All specification supplied herein are subject to change without notice at any time. Copyright © Putal Limited. 2008

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

2/13

Putal

TCP/IP MMS

AT COMMAND

Contents Revision History ........................................................................................................................................................ 4 1. Overview ............................................................................................................................................................... 5 2.AT COMMAND FOR TCP/IP ............................................................................................................................ 6 2.1 AT^CIPSTART ......................................................................................................................................... 6 2.2 AT+CIPSEND .......................................................................................................................................... 6 2.3 AT^CIPCLOSE......................................................................................................................................... 7 2.4 AT+CGATT (标准 AT 指令).................................................................................................................... 7 2.5 AT^CIPSTATUS ....................................................................................................................................... 7 3 AT COMMAND for MMS .................................................................................................................................. 8 3.1 AT^UPLOADFILE................................................................................................................................... 8 3.2 AT^MMSSEND........................................................................................................................................ 8 3.3 AT+EMMSEXE (标准 MMS 指令) .................................................................................................. 9 4.Typical Application............................................................................................................................................ 10 4.1 Call.......................................................................................................................................................... 10 4.2 Send English SMS(TXT MODE)...................................................................................................... 10 4.3 Send Chinese SMS(PDU MODE)........................................................................................................ 10 4.4 Send MMS Picture.................................................................................................................................. 11 4.5 TCP/IP Application.................................................................................................................................... 13

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

3/13

Putal

TCP/IP MMS

AT COMMAND

Revision History

Revision V1.00 V2.00

Date Sep 20 , 2008 Oct 25 , 2008

Comments First release 1. add MMS AT command 2. add SMS,MMS typical application

V2.10

Nov 1,2008

1.AT^UPLOADFILE 上传图片限制为 20k

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

4/13

Putal

TCP/IP MMS

AT COMMAND

1. Overview 序号 命令 TCP/IP AT COMMAND 1 AT^CIPSTART 2 AT^CIPSEND 3 AT^CIPCLOSE 4 AT+CGATT 5 AT^CIPSTATUS MMS AT COMMAND

功能描述

6

AT^UPLOADFILE

上传 MMS 图片数据到模块

7

AT^MMSSEND

发送 MMS 图片

8

AT+EMMSEXE

清空 MMS 邮箱各文件夹内容

连接到服务器 发送数据到服务器 关闭 TCP/IP 连接 关闭移动场景 查询状态

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

5/13

Putal

TCP/IP MMS

AT COMMAND

2.AT COMMAND FOR TCP/IP 2.1

AT^CIPSTART

AT^CIPSTART 建立 TCP 连接或注册 UDP 端口号 Execute command Response AT^CIPSTART= 命令正确返回 OK (“TCP”,“UDP”),“IP Address”, 错误返回 ERROR “PORT” Parameter: 对 TCP 连接: AT^CIPSTART = “TCP”,“IP Address”,“Port” 命令正确返回 OK,错误返回 ERROR 连接成功返回 CONNECT OK 失败先返回 STATE 状态码,后再返回 CONNECT FAIL 对 UDP 连接: AT^CIPSTART = “TCP”,“IP Address”,“Port” 命令正确返回 OK,错误返回 ERROR 连接成功返回 CONNECT OK 失败先返回 STATE 状态码,后再返回 CONNECT FAIL Reference

STATE 状态说明 0 ---IP CLOSE 连接关闭 1 ---CONNECT OK 连接成功 2 ---WAITING CONNECT 等待连接 AT^CIPSTART 只有在 IP CLOSE 状态下才可以进行连接 的建立。

2.2

AT+CIPSEND

AT^CIPSEND 发送数据 Execute command AT^CIPSEND=写入需要发 送的数据,按“ENTER”键开 始发送

Response 此命令用来发送可变长度的数据 连接未建立,返回 ERROR 如果数据发送成功,返回 SEND OK 如果数据发送失败,返回 SEND FAIL

Parameter: Reference

Note: 1。每次传送的数据字节数<= 512bytes. 2.只有在 CONNECT OK 的状态下才可发送数据,否则返回 ERROR。

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

6/13

Putal 2.3

TCP/IP MMS

AT COMMAND

AT^CIPCLOSE

AT^CIPCLOSE 关闭 TCP 或 UDP 连接 Execute command Response AT^CIPCLSOE 关闭成功返回 CLOSE OK 关闭失败返回 CLOSE FAIL Reference 注:只有在 TCP/UDP CONNECT OK 状态下才能关闭连接。

2.4

AT+CGATT (标准 AT 指令)

AT+CGATT 关闭移动场景 Execute command Response AT+CGATT=0 关闭成功返回 OK 关闭失败返回 ERROR Reference

2.5

AT^CIPSTATUS

AT^CIPSTATUS 查询当前 TCP/IP 状态 Execute command Response AT^CIPSTATUS 命令正确返回当前 TCP/IP 状态。 命令错误返回 ERROR。 Reference

STATE 状态说明 0 ---IP CLOSE 连接关闭 1 ---CONNECT OK 连接成功 2 ---WAITING CONNECT 等待连接

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

7/13

Putal

3

TCP/IP MMS

AT COMMAND

AT COMMAND for MMS

3.1 AT^UPLOADFILE AT^UPLOADFILE 上传图片文件文本数据 Execute command Response AT^UPLOADFILE= picture 上传成功,返回:UPLOAD FILE OK。 text data , offset control 上传失败,返回:UPLOAD FILE FAIL。 parameter Reference 上传前,先用其它的转换工具软件将图片(bmp,jpg 等图片格 式)转成 txt 格式的文本文件,并将这个文本文件内容分成若 干段,每段长度不超过 400 个字符(200 字节) ,一次上传一 段,直到将整个文件上传完毕。模块内部会自动把这个文本 文件在图片存储区还原成相应的图片文件。 支持图片格式:bmp,jpg,jpeg,gif,wbmp,png。 最大图片大小:20k 单次上传字符数:不超过 400 个,且必须是偶数个。 picture text data:图片文本文件分割后的某一段。 (字符数范 围:0~400)。 offset control parameter: -3:表明该段数据是该图片的第一段,即重新建立一个新图 片(如果之前已存在图片,自动删除之)。 -1:表明该段数据将追加到前面图片数据的末尾, (默认方式, 即 offset control parameter 为空时,就认为是“-1”) 其它正数参数:表示将从指定参数偏移处开始改写。 这样,模块内部的图片存储区只可能存在 0 个或 1 个图片文 件。 3.2 AT^MMSSEND AT^MMSSEND 将图片存储区的的图片通过彩信发到指定的号码 Execute command Response AT^MMSSEND=phone number 发送成功,返回:SEND MMS OK。 发送失败,返回:SEND MMS FAIL:错误代码。 Reference

mobilephone number:MMS 发送的目标号码。 将模块内部图片存储区的图片发送到指令的号码。 错误代码:(-1~-10) -1---WAP/MMS 未开启

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

8/13

Putal TCP/IP MMS AT COMMAND -2---已发的彩信太多 -3 ---文件数据为空 -4 ---超过允许的最大文件大小 -5 ---不允许建立文件 -6 ---获得图片文件的长宽失败 -7 ---缩放文件失败 -8 ---没有剩余空间存放文件 -9 ---\ -10--发送彩信失败 如: AT^MMSSEND=13560384345 SEND MMS OK 或 SEND MMS FAIL:-3 3.3 AT+EMMSEXE (标准 MMS 指令) AT+EMMSEXE 删除 MMS 邮箱各文件夹的 MMS Execute command Response AT+EMMSEXE= 0 , 成功,返回: OK 失败,返回: FAIL Reference ITEM Parameter/comment folderID 1(0x01) Delete all msg in inbox 2(0x02) Delete all msg in outbox 4(0x04) Delete all msg in Sent 8(0x08) Delete all msg in Drafts 64(0x40) Delete all msg in Templates 如:删除 MMS 发件箱里所有的信息 AT+EMMSEXE=0,4 +EMMSEXE:0 OK

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

9/13

Putal

TCP/IP MMS

AT COMMAND

4.Typical Application 4.1

Call

操作内容: 1. 拨打电话 13560384345 2. 挂断通话 AT 指令实现如下: ATD13560384345; …….. ATH

呼叫 (注意事项:一定要记得加上分号“;”) 挂断通话

4.2 Send English SMS(TXT MODE) 操作内容: 1.向 13560384345 发送英文短信“abcdefg” TEXT 格式发送短信息首先将短信息格式设为 TEXT 模式 : AT+CMGF=1 发送 AT+CMGS= YYY [ENTER] ;其中 YYY 为对方手机号码 收到[>]响应后再发送 [待发送英文字符][ctrl-Z] AT 指令实现如下: AT+CMGF = 1 --------将短信息设置到 TEXT MODE。 AT+CMGS="13560384345" [ENTER] >abcdefg

4.3 Send Chinese SMS(PDU MODE) 操作内容: 1. 向 13560384345 发送中文短信“你好” PDU 格式发送短信息首先将短信息格式设为 PDU 模式 : AT+CMGF=0 发送 AT+CMGS= YYY [CR] ;其中 YYY 为 TPDU 的十进制长度 收到[>][SP]响应后再发送 [TPDU][ctrl-Z] [TPDU]:发送规约数据单元: TYPE 11 MR 00 DA 0D91683165304843F5 ; 13560384345 PID 00

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

10/13

Putal

TCP/IP MMS

AT COMMAND

DCS F4 VP 01 UDL XX ; XX 不大于 8C DD ; XX 字节的用户数据,用户数据中最后一个字节为前面 XX-1 个字节的按位累加和。 TPDU 中用户数据前的 PDU 规约头的长度是 15 字节 TPDU 前的服务中心地址[SCA]的长度是 9 字节。 用户数据最长可用到 140 字节。发中文是 pdu 格式为 80 dcs=80 以下例子 发送到 13560384345 报文是 "你好" 译码为 044F60597D 04 长度 数据 4F60597D 是“你 好”的 unicode 编码,按照内存的编码格式倒过来了 at 命令 AT+CMGS=019 {*解释:15(规约为 15)+4 你好(8 个字节)=019} 返回 > 发送 0011000D91683165304843F5000801044F60597D 发送符 {*解释: 前面两个 00 照写; 11 为 TYPE; 00 为 MR, 0D91683165304843F5 为 DA; 00 为 PID; 08 为 DCS; 01 为 VP; 08535A4E07901A4FE1 为 UDL 的内容,就是中文信息部分} AT 指令实现如下: AT+CMGF=0 OK AT+CMGS=019 > 0011000D91683165304843F5000801044F60597D [ctrl+z] +CMGS: 45 OK

4.4

Send MMS Picture

操作内容:通过 MMS 将 JPG 格式图片 picture01.jpg

发送到 13560384345。

首先需要将该图片转换成 txt 格式的文本文件 picture.txt,每段 400 个字符,共 13 段,内容如下: ffd8ffe000104a46494600010101007800780000ffe1001645786966000049492a0008000000000000000000ffdb004 300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242e2720222c231c1c28 37292c30313434341f27393d38323c2e333432ffdb0043010909090c0b0c180d0d1832211c2132323232323232323 23232323232323232323232323232323232323232323232323232323232323232323232323232323232ffc000110 800540070030122000211010311 01ffc4001f0000010501010101010100000000000000000102030405060708090a0bffc400b510000201030302040 3050504040000017d01020300041105122131410613516107227114328191a1082342b1c11552d1f024336272820 90a161718191a25262728292a3435363738393a434445464748494a535455565758595a636465666768696a73747 5767778797a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

11/13

Putal

TCP/IP MMS

AT COMMAND

8c9cad2d3d4d5d6d7d8d9dae1e2e3 e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000102030405060708090 a0bffc400b5110002010204040304070504040001027700010203110405213106124151076171132232810814429 1a1b1c109233352f0156272d10a162434e125f11718191a262728292a35363738393a434445464748494a53545556 5758595a636465666768696a737475767778797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9a ab2b3b4b5b6b7b8b9bac2c3c4 c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f9faffda000c03010002110311003f00c4d3 b4e000f96ba3b5b3031c52da5b000715b105bf4e2918b6320b5f6abf1dbe31c558b6b5924fb91e40e092401f4e4d4b7 7a75c3c2022c61d7246645f43ef4b5136225bf3daa75838e95cebe9dae64fef6d140033ba44ef524561a8f9444d79689 267e521e3231f4a56279ded63a1f27da8f2c572725beaa24dbf6fd376819de5a300ff005ad8b0bc82dad156e2ead44a4 0dfb264033cfa1f 71458a8c9b7668d4f2c5218862990dd473f31b0653d194820fe558faf788acf4fb6963172a6e00c796b9247afd29ad4 bb13de5e2ac862830cfddbb2d568e18e63fbd7694fb9e3f2ae0c78cd2191c3c4f827236e0923de987c7922bfee84807a 61456ae36d8cd293dcf4436a8170a8147b0aa735a67b562787fc6526b1a94560b000ee09dec781819ed5d8c9102bd3 9a8b35b89e8645ac1d2b5618b1505bc781d2af463150d9426a5a72dff00879a22aa7374bf7871f76b93bcd1c594889f 678242e3236c7dbf2af4 0b7cc9a7c916de04e8d9faf18a9d6d944832547ca3818f53446766572dd1e7d6569c92da7c6001cee8783fa55d78225 1bbec16cdce388867f957a0ac70f96dbd907ca7a95f4fad5782c92391a52e8b11dbb09603f879fd6b6534fa19ca33565 7b9e757312904ff0066a9f64b707fa543696934922c7fd9af0444122492d540ce3d6bd6b65b9500dc443fe042b9bbe1 1c3a73dd49c85540c9137cc3048e067dea1cdb5eea348c395de52332ca1fb258aaf1c48c3818ea335e5de20b8ddab5e 1cf26535e9eb70b73a3 b5dc11c891b4a0b073961d17fa5792ea4527d5750f31c2edf31864e32474150afd7734567b1cecef990f27a0fe42a30c 73492b7ef5b3edfca98a6b55b0d9d9fc391bbc528dfdc8243fa015ebe7915e4bf0cd77788276feedb37fe842bd641e0d 4c8c67b95221c55b8fb56126bb6207fac3f829a993c41640706427fddacd824765a72eed3271e93464fe75792170d13 ac36d212a46257c639ea3839ac6f0fde47aa68fa8adbcc21742a77c89bb6e39ced0726af5a477d3c21d35bb71b3e5e7 4ff2c83d7a33669a8d eccd0d41f6ac7cb6b643fe067ff89a62d8cd1ccd2a241b8e300938079cf6aa8ed711e3cef1246bea4470aff3cd53b8bfb 75c87f15a8ff766817f90ad6e975fcc871b9b846a03fe7d17f0635cf78a9bfb3b4a9af6e61fb4676a3c70a1c92cdd7bf1 54a4d4f4f5396f14dd311ce16e971ff8ead51b8d534c690e756bd901e3fd74b83f8000547359e83704d6a43a7bc973e 17bd67b696dc2c8db12542ac40e738fcf91c578aeaed9bfba3ff4d1bf9d7b3c57f69e55e436e1a49278cac4bf687919b ea1ba7e15e1ba89 b85bb9d275292ef3b9597041fa51bc9b45c55958a329fde37d69a0f34391bdb919cd38ac4200e270643ff2cc29e3f1a b19ddfc30ff009095fc9e902afe6d9fe95ea4b20c578bf832e9ed9ef1d2528084048e3d6bb48f56bc041492423fdb231f ad4cb73392d4c8592a7497dcfe75cf47773ed3f3c79c747f9715b5e0a906a5ad9379796a896ea5fca271bdb381827b0 eb52c763a2d459b43d0230aa7edd72c39c1250753d3d303f1ae66e757d62fe52d3bdc4cc780cf1f6fcabb1d4a7825ba 679356d3215030a24b b507159725d68b19fde788b4d1ff005cdcb9fd2945e80bcce7164d51b9104c3e8a16a616dac4c320483fde9d47e99cd 6b36b7e1887efeb9bff00eb9dbb1aacde30f0cc05c466f6e4edc82a8aa18fa73fceaae514bfb335460434b1a83eb313fa 0cd44da35fc9f7a58c67938663579bc7de1f52e3fb36f9c03f2fce8091efe9fad5593e216940feeb4295bfdfba23f90a2e c020f0fdd03b96ed636072acbbb2a7b106b727b28b5ab2f2353644be036c77ab10f9bd0383d6b9993e2328188741b5 1fefc8cd5564f88b a8b7faad334e4fac45bfad166c650d6b4bd4f42bbf22ea1b745627cb952252920f5071fa565b5c3b280c2127d440a0ff 002ad3d4fc5dabeb96a2d2f1e116e18308e28f68c8e95918cf5c53d40dad145cc88ed1cc542903038fcbb56daade8ff9 7b9ff1543591a2b6c89fdcd6d2cdef4364b3284a0f5e6a85fc645b7dd5750dc0230c3f1a7abfd2a40c0fe1486610b727 a06fd2945b3e402c47fbc0815bcd212bd6b3a676dcc0b123de9dc66e68565a3ae2269ede6b8938669972abec0115e8

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

12/13

Putal

TCP/IP MMS

AT COMMAND

361a3c124422b7895b dd235cfe1815e29e6104ee008ad7d1bc4da8e8b3a4d6378f195390ac78ff00eb7e149a607a76a9e1cd3aea0682ead54 3767db8653ec6bcb2ff004afb05f4b6d248098cf071d41e41ae8b50f891a95f82d2c703487ab124f35cccb7b3ea13b5c dc3ee91fa9c6285740823b28e43f78fe54d92de1849055891f8559b6eb4fb98bcc5c8c6e140ccb90c7d1136fe3518f7a 99a36ce08e734ab0b96c6da606ae967109cfad68ef159768a624c355af331de864b33949c8a9549a28a4c052c40aaae a19f27345140c86785 02061d6aae28a298c9046188fe95a50c48b1a003b679a28a0448bc74a764edcd1452021910139ef4d42538078f7a28 a7d0435ee644e98aad25ecc4e3701f414514219fffd9 AT 指令实现如下: AT^UPLOADFILE = ,-3 建立新的图片文件 AT^UPLOADFILE=ffd8ffe000104a46494600010101007800780000ffe1001645786966000049492a00080000000 00000000000ffdb004300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242 e2720222c231c1c2837292c30313434341f27393d38323c2e333432ffdb0043010909090c0b0c180d0d1832211c213 2323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232 32323232ffc000110800540070030122000211010311 UPLOAD FILE OK (offset control parameter 为空,默认为“-1”,该段数据追加到新建空文件的末尾) AT^UPLOADFILE=…………. UPLOAD FILE OK AT^UPLOADFILE=…………. UPLOAD FILE OK ………………………………… AT^UPLOADFILE=02061d6aae28a298c9046188fe95a50c48b1a003b679a28a0448bc74a764edcd145202191013 9ef4d42538078f7a28a7d0435ee644e98aad25ecc4e3701f414514219fffd9 UPLOAD FILE OK (上传最后一行图片数据) AT+CKPD="EE" ----------确保模块处于待机界面 AT^MMSSEND=13560384345 SEND MMS OK (图片成功发送到 13560384345)

4.5 TCP/IP Application 操作内容: 1. 连接到服务器(IP:121.32.16.103 2. 发送数据“hello,Putal” 3. 断开与服务器的连接。

PORT:2020) ,

AT 指令实现如下: AT^CIPSTART=TCP, 121.32.16.103,2020 ↙ AT^CIPSEND=hello,Putal ↙ AT^CIPCLOSE ↙ AT+CGATT= 0

连接到服务器 发送字符数据 关闭连接 关闭移动场景

完毕

Guangzhou Putal Communication Technology Co., Ltd

[email protected]

13/13

Related Documents

At Command For Mms
December 2019 22
At Command
April 2020 22
Mms
November 2019 16
Mms
November 2019 20
At Command Manual
December 2019 16
Mms Lab.pdf
December 2019 16

More Documents from "Srikar Dangeti"