OscarLib - sending SMS via ICQ Free c# code

posted May 10, 2011, 11:56 PM by Ofer Fridman   [ updated May 11, 2011, 12:04 AM ]
If you need to send SMS programmatically using C# this is the solution:

OscarLib in a c# (2.0) library enable you to send SMS, ICQ programmatically and much more (see Wikipedia)

I was looking for a simple (and free) way to send and receive SMS from cellular phone programmatically (SMS getway) the first choice was Google (using Gtalk) but I got to a dead end.

I've opened this branch because i could not contact the person behind the old project (here) and it is under GNU (2.1). I've needed a reliable free way to send SMS and receive the responses programmatically. This project was dead for almost 3 years, but to my surprise it worked fine for me almost out-of-the-box. the only thing I should ad was the ability to process SNAC(04,07) channel 4, witch was not handled. I did this using the very good documentation here. Surprisingly the responses I got wasn't in the format described here but more like XML based response (like this one), so I've tried to figure out the content of the resonances and add the needed part at the MessageManager class.

the main change is the ability to receive responses from sent SMS messages.

the source published here.

The library is simple to use, I've add a simple console application to show the simple tasks:
  • Send a SMS from ICQ.
  • Receive a response from phone's SMS message.
  • Send ICQ message.
  • Receive an ICQ message.
To use this sample:
  • download the source from here.
  • Open the "OscarLib.sln" sulotion file in you'r preferd c# IDE (I use SharpDevelop (4.0)).
  • Set the "TestSMS" as start-up project.
  • Compile and run.
  • Enter the required information (use the ICQ number and not the email!).
  • Have fun.