In the last days, I’ve been experimenting with SMSLib and IKVM. My goal is to create a .NET version of SMSLib, based on the same source files, in order to avoid the burden of managing two distinct codes. IKVM is certainly not the most efficient way to do it: it has an enormous 30Mb library which should be included in the .NET projects. But, who cares… PCs are strong, memory is cheap! The advantages of having a common code base for the two platforms are enormous.

It seems that it may be possible. Current progress is as follows:

  • The main problem in converting SMSLib with IKVM was the comm library with its external dlls. I don’t know if it is my fault, but I couldn’t make this work… So I decided to go the “brutal” way. I’ve created a tiny .NET application which creates a bridge between a serial port and a network socket. From then on, I can use the IP Modem Gateway to connect to the socket created by this tiny .NET app and see the modem.
  • I have managed to make the ReadMessages example work.
  • IKVM has problems converting Generic Collections from Java to .NET. So I was forced to add some extra methods in Service. For example, instead of calling the existing: int readMessages(Collection msgList, MessageClasses msgClass), I created a new: public InboundMessage[] readMessages(MessageClasses msgClass) in order to get rid of the Java Collections. No harm done, and everything works.

Up to now, everything seems to work correctly. I will continue to test (and possibly adopt the sources) the rest of SMSLib functionality. If everything goes well, I expect to publish a BETA version of the new SMSLib for .NET library in the following days.