多部分或长短信 [英] multipart or long sms

查看:80
本文介绍了多部分或长短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用gsmcomm库发送和接收超过160个字符或多部分短信

how to send and recieve more than 160 characters or multipart sms using gsmcomm library

推荐答案

首先,一些基础知识,

有发送和接收短信的两种模式,即文本模式 PDU模式

文本模式简单易懂,但缺点是你一次不能发送超过160个字符。发送超过160个字符的短信:

使用PDU模式。您可以使用 AT + CMGF = 0 更改SMS格式。但在这种情况下,您需要PDU转换器将SMS更改为PDU格式。



现在回到您的问题,

First, some basics,
There are two modes for sending and receiving SMS namely Text mode and PDU mode.
Text mode is simple and easy to understand but has a disadvantage that you cannot send more than 160 characters at a time. For sending SMS having more than 160 characters:
Use PDU mode. You can change the SMS format using AT+CMGF=0. But in this case you need to PDU converters to change the SMS to PDU format.

Now coming back to your question,
slilence_prg写道:
slilence_prg wrote:

使用gsmcomm库的多部分短信

multipart sms using gsmcomm library



GSMComm Library也支持PDU模式。我没有用过它。

查看这篇文章:如何使用GSM调制解调器发送和接收短信 [ ^ ]。检查发送短信部分,它谈到PDU模式。

必须有某种方法可以将模式更改为PDU模式。您可能需要查看GSMComm Library文档,了解如何使用PDU模式发送消息。

希望这有帮助! :thumbsup:


GSMComm Library supports PDU Mode as well. I haven't used it though.
Check this article: How To Send and Receive SMS using GSM Modem[^]. Check the send SMS part, it talks about the PDU mode.
There must be some way you can change the mode to PDU mode. You may need to check GSMComm Library documentation on how to use PDU mode to send messages.
Hope this helps! :thumbsup:


我尝试自己的工作费用....

mY代码

messageToSend =" lONG MESSAGE> 160"

mobileNo ="" ;;

SmsSubmitPdu [] pdu2;

pdu2 = GsmComm.PduConverter.SmartMessaging。 SmartMessageFactory.CreateConcatTextMessage(messageToSend,mobileNo);

//comm.SendMessage(pdu1);

comm.SendMessages(pdu2);
I TRY IT MY SELF IT WORKING FINE....
mY CODE IS
messageToSend = "lONG MESSAGE >160";
mobileNo = "";
SmsSubmitPdu[] pdu2;
pdu2 = GsmComm.PduConverter.SmartMessaging.SmartMessageFactory.CreateConcatTextMessage(messageToSend, mobileNo);
//comm.SendMessage(pdu1);
comm.SendMessages(pdu2);


这篇关于多部分或长短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆