Here you will find ready-to-use libraries for working with SMS messages.
You can use this software free of charge, but at your own risk.
GSMComm is my own written communication library for GSM phones, mainly for performing SMS-related tasks.
Other developers can re-use this library for their own projects.
Download the development packages below.
for x86 and x64 systems (32 and 64 bit)
Changes and fixes:
Added a workaround for a communication issue, where you may receive an unexpected System.IOException with the error message "The I/O operation has been aborted because of either a thread exit or an application request." when using GSMComm to communicate with a phone for a longer amount of time (was observed after several days).
The reason for this is a problem in the .NET SerialPort implementation. You can read a detailed explanation here:
Thanks go to:
If you encounter issues using GSMComm, use the following hints to investigate them:
Q: The phone/modem locks up after sending a lot of messages in succession, or returns errors like error code 301 (SMS service of phone reserved).
A: This is probably a timing issue. The messages are sent too fast and the phone/modem can't catch up with it. Try a delay of one or more seconds before sending the next message. If you're using version 1.9 or higher, try the SMS batch mode if your phone and network support it.
Q: The GSMComm setup doesn't work because it wants a higher .NET version. Do you have a solution?
A: Yes, install the requested version or use a version that supports the .NET version you have installed. GSMComm setup packages that target different .NET framework versions can be installed side-by-side.
Q: Does GSMComm work with Unicode messages?
A: Yes, some Unicode support is built in since version 1.61.
GSMComm can create, send and decode Unicode text messages. For creating Unicode messages, just be sure to set the correct DataCodingScheme before setting the UserDataText in the SmsSubmit object and it's all right. Sending of long (concatenated) Unicode messages is also supported.
Q: Is it possible to get incoming messages as an undecoded PDU string?
A: Yes, use the GsmCommMain.ReadRawMessages method for that.
Q: How can I send long (concatenated) text messages?
A: GSMComm implements a part of the "Smart Messaging" standard defined by Nokia. The methods for it are implemented in the GsmComm.PduConverter.SmartMessaging.SmartMessageFactory class. It supports creating long messages for standard SMS text as well as for Unicode messages (Built-in Unicode conversion starts with Version 1.61).
Sending or receiving long text messages is not restricted to Nokia models, but there was a bug in GSMComm (fixed in version 1.15) that prevented several receiving phones from decoding the message propertly.
Q: I get the error "No phone connected" and I have verified that the connection works properly using a communication program like HyperTerminal.
A: This is probably because of communication timeouts. The phone/modem does not reply within the time waited by GSMComm. Try to use higher values for the timeout parameter in the constructor of the GsmCommMain or GsmPhone object. The default communication timeout does not necessarily work for all devices, some are slower, some are faster. This also depends on the baudrate used.
Q: Will GSMComm support CDMA at some time?
A: No. The name GSMComm implies working for GSM networks and not for others. But besides the name, I don't do anything with CDMA and currently do not intend to work myself into CDMA.
Q: Do you recommend a specific phone/modem?
A: No. For most of the tests, Nokia phones have been used, but it's not restricted to them. As long as the phone/modem meets GSMComm's requirements and supports the features you need, you can use whatever model you want.
Q: Is there a limit on how many SMS messages can be sent, e.g. per day?
A: GSMComm does not restrict the number of messages in any way. However, the network provider may limit your possibilities, for example if you use a prepaid account.
Q: Can I use GSMComm for multiple phones/modems?
A: Yes, use multiple instances of the communication classes for that. If you want asynchronous processing, you have to handle that yourself.
Q: I think GSMComm didn't properly pick up a response from the phone/modem. Can I check this somewhere?
A: Yes. You can use GSMComm's logging mechanism (basically the LoglineAdded event) to find out what was sent to the phone, what responses were received and often also how GSMComm interpreted the response. This may give you a hint about where the fault came from.
Q: What does the "Phone reports generic communication error or syntax error." error really mean?
A: This is how GSMComm interprets the ERROR response if something isn't right. Many issues can be the cause, including:
In many cases, the command is simply not supported by the phone.
As of GSMComm version 1.15, the text has been changed to be more meaningful.
Q: How can I, after sending an SMS message, receive a notification that the message has been delivered?
A: You can request a status report along with a message. The SmsSubmitPdu class has a property "RequestStatusReport". Set this to true before sending the message, and you will receive a report in the form of a special SMS message any time something important happens to your message. The report includes a code that tells you what is going on.
Q: Can GSMComm be used from VB6?
A: No. GSMComm does not support the Component Object Model (COM). Therefore you cannot use GSMComm from VB6, VBScript or other COM clients.
Q: I can send and receive messages fine. I can also enable message notifications (no error), but I never receive a notification. What's wrong?
A: There are some modems which expose multiple COM ports for different purposes. Check the available ports (e.g. using Device Manager) and try using all ports the modem exposes. You can also check out the modem's documentation, how many ports are available, and how they should be used.
Here is an example how it looks like in the Device Manager when using some HUAWEI USB modems:
Under “Modems” there are:
Under "Ports (COM/LPT)" there are: