WIBL Firmware

Firmware Features

The majority of the behavior of the WIBL logger is controlled by the firmware running on the embedded microcontroller. Since the Arduino architecture is used (to abstract from the hardware and allow for portability), a one-time setup is implemented, followed by a run-loop that scans the various interfaces for new data (including a serial line interface for flashing the firmware, initial setup, and debugging), and logging any completed messages. The reference implementation includes NMEA0183 and NMEA2000 interfaces, and a MEMS 6-axis motion sensor to give some idea of the motion of the vessel. Data packets from all of the interfaces are encapsulated in a custom binary data format, and serialized into files of up to 10MB on the attached SD card. Cards up to 32GB have been confirmed to operate with the current implementation of the logger.

The firmware responds to user commands using a specialized micro-language passed as ASCII string through either the console hardware serial interface (available through a USB to serial converter plugged in to the associated pin header on the board) or the WiFi interface when activated (the logger runs its own web server and provides a RESTful interface for commands). Some commands are only accepted on one or the other interface; the WiFi interface is preferred for data transfer and configuration. Commands are available to set and query the configuration of the logger, including the line speed of the NMEA0183 interface (by default, and standard definition, 4800 baud), filtering of NMEA0183 messages, metadata, and setup of the WiFi interface. The logger will start its own WiFi network by default, but can be configured to join another network if required. The code will automatically attempt to join a network a configurable number of times, with delays between attempts, but then fall back to starting its own network if necessary. This avoid an unresponsive logger in case of inconsistent or incorrect configuration.

The firmware can be configured through individual commands for specific interfaces or options, but is more conveniently configured through an appropriately formatted JSON file. The Python GUI can be used to extract JSON-formatted configuration files from the logger, and send them to configure the logger in one pass. A separate "default" configuration can also be set in the firmware's non-volatile store and recovered with a single command (e.g., if the running configuration is corrupted for any reason).

Further details of the firmware structure and order of operations can be found in the Wiki associated with the project.