1

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.

Canis
  • 87
  • 10
  • 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
  • @duenni I have no idea, but I doubt it. Most of these old automation systems are created by people good at BAC-net, PLS etc, and not so much ip, windows or general best practice. We have other systems we need to host where the system has to run in the user context as it is not able to run as a service, which means never log out of the server. – Canis Feb 22 '16 at 16:13
  • @Patrick Unfortunatly the system does not know what internet is, or even an API. Imagine it running as it was designed: A dusty old win xp PC tucked away in a handy closet with GSM modems attached directly to the COM-port.We've taken over a few of those dust-piles over the years and virtualized them in our datasenter as our clients request better up-time for the systems. – Canis Feb 22 '16 at 16:16
  • whilst I understand your pain I'm afraid virtualisation of GSM hardware isn't anything I know about. I wish you luck! – Patrick Feb 22 '16 at 16:22
  • Maybe you don't need a virtual GSM modem but a [COM port redirector](https://en.wikipedia.org/wiki/COM_port_redirector). Your systems speaks to a virtual COM port, this port opens a TCP/IP connection to a server with a real GSM modem attached (and a modern OS) which processes this requests and fires up your SMS. – duenni Feb 23 '16 at 08:09
  • @duenni I'm sorry, but as I've stated in the question, we do no have the option to host hardware, not even serial-to-ip converters. The virtual COM-port will not have anything to connect to if I cant find a software solution... – Canis Feb 23 '16 at 08:28
  • Ok but how will this get running without another (virtual) server? Your legacy system has no internet connection and no modem can be attached. How do you plan to connect to the "outside world"? – duenni Feb 23 '16 at 08:38
  • @duenni The legacy server does not know what internet is, but with a virtual COM-port it can connect to a TCP port on another virtual server. But I cant connect a modem there either, because it is virtual. Thats why I need some software on the receiving end of the virtual COM-port to act like a modem, so the legacy server can understand whats going on. It only speaks in AT-commands. – Canis Feb 23 '16 at 08:43

2 Answers2

2

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.

codehead
  • 958
  • 5
  • 7
  • 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 08: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
1

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:

https://github.com/hakash/virtual-gsm

Canis
  • 87
  • 10