使用华为E160 USB调制解调器发送短信和彩信 [英] sending SMS and MMS with the Huawei E160 USB Modem freezed

查看:105
本文介绍了使用华为E160 USB调制解调器发送短信和彩信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用华为e160 usb调制解调器发送短信的问题。问题是,几个小时后,调制解调器将无法响应,我的短信应用程序将无法与调制解调器通信。当我拔下这个调制解调器并重新插上它再开始工作..我有一个其他公司teltonika gsm调制解调器..如果我使用teltonika gsm调制解调器我的应用程序工作..这是我的代码



i have an issue for sending sms using huawei e160 usb modem .. problem is that after a couple of hours, the modem would become unresponsive, and my sms application would be unable to communicate with the modem. When I unplug this modem and plug it again its start working again..i have an other company teltonika gsm modem..if i m using teltonika gsm modem my application working perfactly.. here is my code

Dim SMSEngine As New SMSCOMMS("COM4")
'the port needs to be initialised
SMSPort = New SerialPort
    With SMSPort
        .PortName = COMMPORT
        .BaudRate = 19200
        .Parity = Parity.None
        .DataBits = 8
        .StopBits = StopBits.One
        .Handshake = Handshake.RequestToSend
        .DtrEnable = True
        .RtsEnable = True
        .NewLine = vbCrLf
    End With 

    'this is  the set of AT commands to be written on serial port
        SMSPort.WriteLine("AT")
        'set command message format to text mode(1)
        SMSPort.WriteLine("AT+CMGF=1" & vbCrLf) 
        'set service center address (which varies for service providers (idea, airtel))
        SMSPort.WriteLine("AT+CSCA=""+919822078000""" & vbCrLf)             
        ' enter the mobile number whom you want to send the SMS
        SMSPort.WriteLine("AT+CMGS=  + TextBox1.text + " & vbCrLf) 
        _ContSMS = False
        SMSPort.WriteLine("+ TextBox1.text +" & vbCrLf & Chr(26)) 'SMS sending
Dim i As Integer

Private Sub Button1_Click(ByVal sender As System.Object,
   ByVal e As System.EventArgs) Handles Button1.Click
    SMSEngine.Open() 'open the port
    SMSEngine.SendSMS() 'send the SMS
End Sub

推荐答案

Soooo一旦发送消息,你在哪里关闭端口?这可能是你的问题。



因为这里的任何常客都不太可能拥有相同的调制解调器,所以任何人都几乎不可能测试你的代码并告诉你怎么了。准备好只接受猜测可能出现的问题。
Soooo where are you closing the port once the message is sent?? That could be your problem.

As it's extremely unlikely any of the regulars around here have the same modem, it's pretty much impossible for anyone to test your code and tell you what's wrong. Be prepared to receive nothing but guesses as to what the problem may be.


你好..,



我想,这个一段时间后调制解调器进入睡眠模式。这几年我一直在努力。但我可以在这里建议一些东西,也许你可以尝试一下。



请查看调制解调器文档,其中包含可用于唤醒调制解调器的任何命令,或任何可用于将调制解调器设置为不进入睡眠模式的命令。

如果没有,我建议您在间隔期间发送AT命令,如果您的应用程序没有长时间发送SMS。



--RA
Hello..,

I guess, this Modem is going to sleep mode after sometime. I have worked on this couple of years back. But I can suggest here something, may be you can try that.

Please check the modem documentation wherein any command available for the wakeup the modem, or any command available to set the modem to not going to sleep mode.
If not, I suggest you to send "AT" command in the intervals, if your application is not sending SMS(s) for longer time.

--RA


这篇关于使用华为E160 USB调制解调器发送短信和彩信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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