Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I used gsmcomm library to develop little sms program, but when i click in btnCheckSMS i got the string error like this "Could not find any recognizable digits " . this button used for reading incoming sms in the gsm sim card. This is my code :

C#
private void btnCheckSMS_Click(object sender, EventArgs e)
    {
        var messages = comm.ReadMessages(PhoneMessageStatus.All, PhoneStorageType.Sim);
        foreach (var message in messages)
        {
            var data = (SmsDeliverPdu)message.Data;
            var phoneNumber = data.OriginatingAddress; // when debug got the problem over here, Could not find any recognizable digits 
            var msg = data.UserDataText;
            var tanggal = string.Format("{0:yyyy/MM/dd}", data.SCTimestamp.ToDateTime());
            var jam = string.Format("{0:HH:mm:ss}", data.SCTimestamp.ToDateTime());


            lstDaftarSMS.Items.Add(string.Format("{0}, {1}, {2}, {3}", tanggal, jam, phoneNumber, msg));
        }
    }

when debug got the problem over here, Could not find any recognizable digits :
C#
var phoneNumber = data.OriginatingAddress;

anyone can help me how to solve this?
Posted
Updated 2-Aug-15 22:45pm
v2

1 solution

Just upgrade the gsmcomm library from version 1.15 to 1.21 and it will solve,...in this case gsmcomm library 1.15 didn't support for the shortnumber income message and string number like operator celluler number

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900