At least on the TRB, there is a feature to forward all SMS messages to a web server which can be localhost. All you need is to write a CGI script that handles the incoming messages. You don't need to poll using gsmctl or handle the SMS storage in any way.