Using NMEA formatted messages, commands can be sent to the μModule to perform actions. After the commands are executed, a response is returned.

sequenceDiagram autonumber Controller->>μModule: Establish UART/USB Connection loop Note left of Controller: Format Command Controller->>μModule: Send NMEA Command Note right of μModule: Process Command μModule->>Controller: Send Response Note left of Controller: Process Response end Controller->>μModule: End Connection

NMEA messages are formatted as follows:

$TYPE,ARGUMENT1,...*[CRC] • Each message starts with$
• Types are 3 to 5 characters and specify an action to perform
• Arguments are separated by commas and can be of any type, string, float, etc.
• Messages end with a * and are followed with a CRC value represented by two hexadecimal characters. CRC checks are turned off by default, but two characters still must be passed. Two zeros works for this.

Some example messages to request a conductivity measurement from a μMod-EC device would look like this:

A complete listing of types and their parameters can be found in each μModule's respective documentation.

Responses

By default, the response to an NMEA message is an NMEA-formatted response. It will be identified using the same type, UFEC for example, but in place of the arguments used to call it, response information will be sent.

An example UFEC response:

\$UFEC,1100,1.1,0*27

Represents a conductivity measurement (UFEC) that measured 1100 microsiemens, or 1.1 millisiemens, and finished with an error code of 0 (no error).

Note the CRC of response messages is always valid, regardless of CRC checks being on or off.

Alternatively, JSON or MsgPack can be chosen for output formats.