My problem is that there is a legacy system for building automation (ventilation, temperature, lighting etc) without the possibility for upgrades, that needs to send text messages through a connected GSM modem. It does not have interfaces for connecting to the standardised SMS services around. The system is hosted in a virtual environment without the option for inserting physical equipment like GSM modems, even with a serial-to-IP converter.

What I'm trying to find is really some piece of software, commercial is fine, that can act as a bridge between the legacy system and the modern SMS services. The software would probably have to emulate the modem to receive and process the AT-commands from the legacy system, convert the data into a proper format, for example SMPP, and then forward the request to the SMS service for sending the message.

Another option is a simple software acting only as a virtual GSM modem, saving the messages somewhere (DB, files etc) for further consumption.

I'm stumped at the moment, so I hope some of you have seen some solutions for this somewhere.

  • Are email-toSMS gateways unsuitable, and if so, why? – MadHatter Feb 19 '16 at 14:53
  • @MadHatter Unfortunately yes, the system doen not support sending e-mail... – Canis Feb 19 '16 at 15:04
  • OK, fair enough. – MadHatter Feb 19 '16 at 15:06
  • Any chance your automation system speaks OPC or DDE? – duenni Feb 22 '16 at 10:46
  • does this system have internet access? Could it post directly to an api at a hosted SMS gateway? Could you write the SMS text to an alternate location and use a secondary system to read that data and process accordingly? – Patrick Feb 22 '16 at 16:02

You can use tcpser(1) to emulate a physical modem that accepts connections on a virtual serial port and forwards the data stream to a TCP server - that you'd probably have to write yourself.

It's not a turnkey solution but it might be a good start.

  • Wow! Great answer. Does that run on windows as well? Or is it able to receive from a virtual COM-port on another server? – Canis Feb 25 '16 at 8:48
  • After some testing and debugging it seems like tcpser only supports the dialing modems. According to the internet it was made to emulate one of the first Hayes modems created in 1981. It is supposedly updated updated to support more modern commands as well, but my testing indicates that it does not handle GSM-specific commands well. I was able to work around the PIN code checking, but not the check for the modem being registered to a network. I've taken a quick look at the source code as well and there seems to be dial up modems that it focuses on. – Canis Feb 25 '16 at 21:30
  • I am still rewarding you the correct answer and the bounty, because I now have some source code I can use as reference to quickly hack together a Node.js, go or Python-script to interpret the bare minimum of commands to do just the messaging. – Canis Feb 25 '16 at 21:34

codehead clearly got the bounty and the correct answer. His answer led me to discover a piece of software that inspires me to create an emulator that support at minimum the commands for the SMS-sending. Development will be done using the fabulous SMS Server Tools 3, NodeJS and adjustments for corner cases from real systems can be done when they surface.

The project will be open sourced under the MIT license and hosted on GitHub:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.