Getting Started

Before doing anything else, you can get a flavor of the EasyNMEA capabilities by checking out the easynmea Docker image for Ubuntu. This image ships an already built EasyNMEA with compiled examples that you can use to get some readings out of your NMEA sensor without building anything on your side. If you do not have the Docker Engine already installed, you can install it following this tutorial. Then, there are two options for running the container:

Run docker knowing the specific serial device

If your NMEA module is already connected to a serial port and it is not going to be unplugged, then you can just share that device with the container:

docker run -it --device=<path_to_device> eduponz/easynmea bash

Then, inside the container, you can run the GPGGA example with:

/root/easynmea/build/examples/gpgga_example -b <baudrate> -p <path_to_device>

Run docker allowing for plug-unplug connectivity

If your module may be unplug and plug while the container is running, you can still share the serial port with the Docker container by sharing all the devices of the same cgroup. Plug your device and get its cgroup with:

ls -l <path_to_device> | awk '{print substr($5, 1, length($5)-1)}'

Then, run the container:

docker run -it -v /dev:/dev --device-cgroup-rule='c <device cgroup>:* rmw' eduponz/easynmea bash

Finally, inside the container, you can run the GPGGA example as before:

/root/easynmea/build/examples/gpgga_example -b <baudrate> -p <path_to_device>