GuoZhiyong / gsmmodem

Automatically exported from code.google.com/p/gsmmodem
1 stars 2 forks source link

Error happened when receiving new sms #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I checked out the latest version, the send function is perfect, thank you very 
much. :-)

The problem is, the following error occurred when I try to receive the new 
message:

8/4/2013 10:07:11 PM:ReadNewMsg: Exception:System.Exception: Index and length 
must refer to a location within the string.
Parameter name: length PDU:
   at GSMMODEM.PDUEncoding.PDUDecoder(Int32 SmsIndex, String strPDU) in D:\Source\gsmmodem-read-only\src\GSMMODEM\PDUEncoding.cs:line 726
   at GSMMODEM.GsmModem.ReadMsgByIndex(Int32 index) in D:\Source\gsmmodem-read-only\src\GSMMODEM\GsmModem.cs:line 599
   at GSMMODEM.GsmModem.ReadNewMsg(Int32& sMsgIndex) in D:\Source\gsmmodem-read-only\src\GSMMODEM\GsmModem.cs:line 557
   at 短信猫.Form1.button5_Click(Object sender, EventArgs e) in D:\Source\gsmmodem-read-only\Samples\Sample\Form1.cs:line 225

What steps will reproduce the problem?
1. Connect COM3, and 9660
2. Send a new msg
3. click read new message

What is the expected output? What do you see instead?
The receive function should be normal

What version of the product are you using? On what operating system?
gsmmodem revision 34;  OS: windows 7

Please provide any additional information below.
I guess the reason is I am in Australia, our sms center format is like:  
0410066900, and our mobile number is like that format (0412345678  - 10 digits 
and start with 0 ) as well. The format is a little bit different with China.

Thank you very much for your help.

Cheers

Johnny Chen (I am a Chinese as well :-))

Original issue reported on code.google.com by itb...@gmail.com on 4 Aug 2013 at 12:21

GoogleCodeExporter commented 9 years ago
突然发现可以发中文,不好意思啊,呵呵。我估计可能是澳��
�的手机格式和国内的不一样,所以造成了兼容性问题。

Original comment by itb...@gmail.com on 4 Aug 2013 at 12:23

GoogleCodeExporter commented 9 years ago
短信接收功能测试不是非常充分,不同编码或短信数据包不��
�整可能导致问题

Original comment by wyun...@gmail.com on 17 Dec 2013 at 1:43