基于AT指令开发短信程序

 

基于AT指令开发短信程序

本人的专职工作是做手机底层软件中SMS和CBS的功能模块软件,对SMS的PDU格式可以说是比较了解,在网上查找了一下感觉目前国内公开的软件大多功能比较单一。主要特点如下: 1、支持分页短信,最大可以支持15个分页,可以一次发送超长数据。 2、文字编码不仅有7BIT和UCS2,还附上8BIT,对于一些手机可以省去解释特殊字符的烦恼。 3、支持CLASS类型的短信,如CLASS0收到就自动显示,用户看完就自动消失。 4、支持电话簿编辑功能,可以将自己的联系人输入我写的数据库中,自动用软件的下载到SIM卡中去,也可以从SIM卡中读取联系人的信息。对于备份联系人的信息非常有帮助。 5、支持短信的存储功能,可以保存到数据库或文件中。

本文摘录3gpp27005中关于CNMI的片段,充分理解此文章可以充分根据GSM-MODEM的提示功能,主动打开GSM-MODEM的新短信、状态报告,小区广播提示。

New Message Indications to TE +CNMI

Parameter Command Syntax

Command

Possible response(s)

+CNMI=[<mode>[,<mt>[,<bm>[,<ds>[,

<bfr>]]]]]

+CMS ERROR: <err>

+CNMI?

+CNMI: <mode>,<mt>,<bm>,<ds>,<bfr>

+CNMI=?

+CNMI: (list of supported <mode>s),(list of supported <mt>s),(list of supported <bm>s),(list of supported <ds>s),(list of supported <bfr>s)

Description

Set command selects the procedure, how receiving of new messages from the network is indicated to the TE when TE is active, e.g. DTR signal is ON. If TE is inactive (e.g. DTR signal is OFF), message receiving should be done as specified in 3G TS 23.038 [2].

NOTE:       When DTR signal is not available or the state of the signal is ignored (V.25ter command &D0), reliable message transfer can be assured by using +CNMA acknowledgement procedure.

<mode> controls the processing of unsolicited result codes specified within this command, <mt> sets the result code indication routing for SMS-DELIVERs, <bm> for CBMs and <ds> for SMS-STATUS-REPORTs. <bfr> defines the handling method for buffered result codes when <mode> 1, 2 or 3 is enabled. If ME does not support requested item (although TA does), final result code +CMS ERROR: <err> is returned. See chapter Message Service Failure Result Code for a list of <err> values.

Test command gives the settings supported by the TA as compound values.

NOTE:       Command Select Message Service +CSMS should be used to detect ME support of mobile terminated SMs and CBMs, and to define whether a message routed directly to TE should be acknowledged or not (refer command +CNMA).

Defined Values

<mode> (refer figure 2;

 

NOTE:       The buffering mechanism may as well be located in the ME; the setting affects only to unsolicited result codes specified within this command):

0    Buffer unsolicited result codes in the TA. If TA result code buffer is full, indications can be buffered in some other place or the oldest indications may be discarded and replaced with the new received indications.

1    Discard indication and reject new received message unsolicited result codes when TA-TE link is reserved (e.g. in on-line data mode). Otherwise forward them directly to the TE.

2    Buffer unsolicited result codes in the TA when TA-TE link is reserved (e.g. in on-line data mode) and flush them to the TE after reservation. Otherwise forward them directly to the TE.

3    Forward unsolicited result codes directly to the TE. TA-TE link specific inband technique used to embed result codes and data

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值