Non-IP Modem Codecs for Node.JS
A Node.JS library for decoding and encoding efficient binary blob messages for Non-IP Modem data transport over constrained satellite networks.
NIMO
Non-IP Modem for ORBCOMM protocols is derived from a proprietary codec key file described by XML or JSON. The principle is the first 2 payload bytes comprise a message key describing services (aka SIN) made up of messages (aka MIN). Messages are defined for both uplink (aka Mobile-Originated) and downlink (aka Mobile-Terminated) operations.
Using this approach we can define up to 256 Service(s) each with up to 256 Message(s) in each direction of communication. The intent is that each micro-service encapsulates a set of related remote operations, and the messages represent the individual downlink (command/query) or uplink (response/report) operations.
[!NOTE] When using actual ORBCOMM-protocol based modems (IDP/OGx service) SIN 0-15 are reserved for system use, and SIN 16-127 are pseudo-reserved for ORBCOMM Lua apps.
[!TIP] The key feature of NIMO messages is that data field boundaries do not need to align with byte boundaries.
Each message is defined by a set of attributes:
nameshould be unique to the direction in the servicemessageKey(akaMIN) must be unique to the direction in the servicedescriptionis optionalfieldsDefines a set of ordered data types in the message payload, where each field includes attributes:namemust be unique withinfieldsdescriptionis optional to provide additional contexttypemust be one of the supported data types:boolare 1-bit valuesenumdefine a set number of bits to index discrete string valuesintdefine a set number of bits for signed integer (MSB sign)uintdefine a set number of bits for unsigned integerstringdefine a set or maximum number of ASCII character bytesdatadefine a set or maximum number of bytesarraydefine a set or maximum number of nested child fieldsbitmasklistdefine a set number of bits to index array fields
sizeis used for types:enum,int,uintto represent the number of bits of payload used. It repesents the maximum number of bytes of payload used forstringordata. It represents the maximum number of fields used forarrayorbitmasklist. It is not used forbool.itemsis a list required forenumorbitmasklisttypes.fieldsis a list required forarrayandbitmasklisttypes, defining nested fields.optionalis optional for any type; flags the field as being present or not, and consumes 1 bit of payload to indicate presence.fixedis optional for variable length fieldsstring,data,arrayto reserve/pad the maximum data length to a specific payload size.
The XML format was historically uploaded to the Viasat/Inmarsat or
ORBCOMM/SkyWave web service API gateways, typically with extension *.idpmsg.
Some field types may not be supported on some gateways.
The JSON format provides a condensed version and supports an extended set of field types. The codec library is intended to prefer JSON representation for processing external to the service provider API gateways.