Siwi2way - AT console behind NAT

description
At Victron Energy we use FXTs to report system values to our website by periodic get
requests. Currently SMS messages are used to report something back to the modem /
instruct it to do something etc. It would be nicer if AT commands could simply be sent
over tcp/ip. Since in general modems are behind NATs, it is not easily possible to open
a connection to it. This example is trying to workaround that by using PubNub
pubnub.com.

note: it is not finished / not completely tested. It is at a point that it seems to
work, but some things can be done better / some features are missing etc.

Software version
OASiS 2.36 and windows executable

Hardware version
Fast Supreme 10 (the old one), IESM ethernet card

Features/Services covered

  • dynamic string functions
  • traces without using TRACE ( ( something ) ) :wink:
  • custom AT commands (well with ve macros, the adl names are far too long)
  • calling custom at commands from within the application
    (was not possible, don’t know current status).
  • flash
  • TCP client socket
  • HTTP Keep-Alive requests
  • PubNub support
  • AT console on top of PubNub
  • (limited) MSVC solution
  • malloc/free/realloc (Doug Lea, see below) [be carefull though to use the correct free!]

Plug-ins used
WIP (but not the http client)
https://forum.sierrawireless.com/t/wip-5-3-periodic-http-get/4610/1
https://forum.sierrawireless.com/t/multiple-http-requests-every-other-one-fails/4184/1

code:
github.com/jhofstee/siwi2way

Thanks goes to:

Doug Lea for his malloc. g.oswego.edu/dl/html/malloc.html
(for realloc calloc and friends)

loyd Hilaiel and contributors for yajl, lloyd.github.com/yajl/
JSON parser

Regards,
Jeroen