Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am getting following exception when reading sms through GSMCommunication.dll in c#

C#
GsmComm.GsmCommunication.CommException: No phone connected. 
at GsmComm.GsmCommunication.GsmPhone.VerifyValidConnection()
at GsmComm.GsmCommunication.GsmPhone.SelectReadStorage(String storage)
at GsmComm.GsmCommunication.GsmCommMain.ReadMessages(PhoneMessageStatus status, String   storage)
at SMSC.ReadSMSManager.ReadSMS()

But old version modem is working fine. old version modem: HUAWEI E156C.



Exception is being thrown when accessing following code:
C#
DecodedShortMessage[] messages = ModemConnectionManager.Comm().ReadMessages(PhoneMessageStatus.All, storage);


Any help would be appreciated?
Posted
Comments
Sergey Alexandrovich Kryukov 10-Sep-13 14:39pm    
If this is your code working with older modem, it should have a fragment where you set a baud rate; why not using the same? The problem could be somewhere else. By the way, how do you know that the new one is really operational?
—SA
Green Mile 10-Sep-13 21:16pm    
Thanks for your response. Yes you are right problem was somewhere else. I used older GSMCommunication.dll(v1.10.0.0) version which does not work. Now, It's working with new GSMCommunication.dll version.
Sergey Alexandrovich Kryukov 10-Sep-13 21:53pm    
Great. Good luck.
—SA

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



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