Unable in reading SMS from 3g USB dongle

笑着哭i 提交于 2019-12-12 02:13:22

问题


I'm building a windows service to read SMS from 3G dongle storage set as SIM card using AT commands. It's working good but some times it fails and response shows +CPMS: 0,0,0,0,0,0.

Code

        gsmPort.WriteLine("AT+CMGF=1"); //Set mode to Text(1) or PDU(0)
        gsmPort.WriteLine("AT+CPMS=\"SM\""); //Set storage to SIM(SM), MODEM(ME), BOTH(MT)
        gsmPort.WriteLine("AT+CMGL=\"ALL\""); //What catagory to read ALL, REC READ, or REC UNREAD

        response = gsmPort.ReadExisting();

When i move dongle into another port it starts working. I've tride it on multiple systems with different dongle but the result is always same. I've also changed my SIM card but no effect. Can any one have any idea why after some time SIM storage shows 0/0.

来源:https://stackoverflow.com/questions/42506759/unable-in-reading-sms-from-3g-usb-dongle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!