C# 通过 USB-HSDPA 调制解调器发送文本消息/短信 ->不支持的消息类型
我正在尝试使用华为 (E122-1) 的 USB-HSDPA 调制解调器创建文本消息/短信网关。 我前段时间用一个较旧的调制解调器完成了此操作。在安装驱动程序并接收新设备的正确 comPort 时遇到一些麻烦后,我终于建立了与设备的通信。
comPort 检查和 PIN 检查已完成。 现在我切换到文本模式 (CMGF) 并写入消息 (CMGS):
comPort.Write("AT+CMGF=1\r\n");
线程.睡眠(1000);
comPort.Write("AT+CMGS=\"" + "某个电话号码" + "\"" + Environment.NewLine);
comPort.Write("文本内容" + (char)26 + Environment.NewLine);
线程.Sleep(2000);
响应 = comPort.ReadExisting();
一切正常,我得到了正确的回应和一切。
但是,问题是:所有手机/智能手机都无法读取发送的短信:
- 我的旧诺基亚 6300 显示“不支持的消息类型”。
- HTC Desire 显示一条空消息。
- 三星 Galaxy S2“不支持内容”。
- Samsung Galaxy S 可以正常显示该消息。
现在奇怪的是,如果我使用调制解调器(t-mobile 奥地利互联网管理器)附带的应用程序发送短信,所有列出的设备都可以正确显示它。
我是否缺少编码或某种标头的内容? (“t-mobile 互联网管理器”显然正在使用它来在接收方正确显示文本消息)
有什么建议或想法吗?
谢谢, 西塞
I am trying to create a text msg/sms gateway using a USB-HSDPA Modem from Huawei (E122-1).
I have done this with an older Modem some time ago. After some troubles installing the driver and receiving the correct comPort of the new device I have finally established to communicate with the device.
comPort Check and PIN-Check are already done.
Now I'm switching to textmode (CMGF) and write the message (CMGS):
comPort.Write("AT+CMGF=1\r\n");
Thread.Sleep(1000);
comPort.Write("AT+CMGS=\"" + "some tel no" + "\"" + Environment.NewLine);
comPort.Write("text content" + (char)26 + Environment.NewLine);
Thread.Sleep(2000);
response = comPort.ReadExisting();
everything works fine, i get proper responses and everything.
BUT, here is the problem: the sent text message can't be read on all mobile phones/smart phones:
- my old Nokia 6300 says 'unsupported message type'.
- HTC Desire shows an empty message.
- Samsung Galaxy S2 'content is not supported'.
- Samsung Galaxy S shows the message just fine.
Now here is the weird thing, if i use the application which comes with the modem (t-mobile austria internet manager) to send a text message, all of the listed devices can display it correctly.
am I missing something with the encoding or some kind of a header? (which the 't-mobile internet manager' apparently is using for correct displaying of the text message at the receiver side)
any suggestions or ideas?
thanks,
Sise
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不知何故,接收器设备期望 PDU 格式而不是 ASCII。
像这样的东西:
http://www.dreamfabric.com/sms/
但接收器设备我需要此方法for 是一个 GPS 跟踪盒,它确实理解 ascii,因此不需要 pdu,并且应用程序工作正常。
无论如何,谢谢! :)
somehow, the receiver devices are expecting PDU format and not ascii.
something like:
http://www.dreamfabric.com/sms/
but the receiver device i'm requiring this method for is a gps-tracking box and it does understand ascii, so pdu is not required and the application is working fine.
thanks anyways! :)
尝试以文本模式发送:https://www. diafaan.com/sms-tutorials/gsm-modem-tutorial/at-cmgf/
AT+CMGF=
1 = 文本模式
Try to send in text mode: https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/at-cmgf/
AT+CMGF=
1 = Text Mode