Minimal drivers for Navio 2

Dear emlid,

I would like to know what is needed to compile the minimal drivers required to interact with all the features of the board? I am likely going to develop on a ubuntu-focal base docker image and plan to not use mavlink/ardupilot.

I would like to get the pure readouts from the sensors and read/write to the microcontroller for PWM I/O.

I did find the drivers here:

With the pin-outs given here:

And reading through this makes me think that raw readouts from the sensors can easily be done by compiling those libraries and using them in my own C++ code. Am I correct in this assumption?

Secondly, the thing that I cannot figure is how to do the RCIO microcontroller communication? I read the setup and I see that the rcio pwm ports require initialization: write_file("/sys/class/pwm/pwmchip0/export", "%u", channel) just like standard pwm ports , but then this would require me to compile a kernel to have /sys/class/pwm/pwmchip0 exist? Am i correct? is that a hard-requirement? I would like to know if there exists a driver in C++ for me to interact with your RCIO, and use all its features, while being able to freely use my own (dockerized) base image?

I would like to use your system as a pure hardware system and interact with its features directly from the raspberry pi.

Greetings and thank you for your time


Hi Deniz,

In general, everything you need to get data from Navio2 sensors and communicate with RCIO is provided by our version of Raspbian. Even if you don’t need mavlink/ardupilot, you still need to use the Navio2 image. There are no separate libraries ot drivers you could install on a regular Raspbian.

But why do you want to use Navio2 as a pure system? Is it just a matter of convenience? Or is something missed? I can’t promise we’ll make some essential changes, but it’s helpful to know!

Dear Svetlana,

Thank you for taking your time to reply on my thread, highly appreciated.

In the past ive developed on jetson Xaviers for maritime drones and on the drone itself we run:

  • Minimal base-image as docker host
  • Docker container with our compiled executable

It’s because we flash our drones with as minimal a docker host image as possible to do the downloading/container-running/monitoring/… , and all the drivers/software/etc are compiled in a docker container and deployed to the drone remotely.

I would like to build a drone using the same pipeline. Therefore, the base image that the raspberry get flashed for, will have to be the bare-bones docker host.

All the drone code/executables that will be written for it, will run in a container and will be pure C++14 ROS2.

Greetings, and again, thank you for your time.

PS: I wouldnt mind if there is even a simple, shortcut, solution where i could maybe write a PPM/SBUS signal to the RCIO chip and read a similar signal coming from it, I think that would be all i need for full PWM I/O?

PS2: Do all other sensors simply work using uart/i2c/spi interfaces?

  • Deniz

Hi Deniz,

The RCIO co-processor handles PWM, ADC, SBUS, and PPM generation. The RCIO code is not open-source, so there’s no possibility to get access to it. Still, you can build a custom Raspberry Pi OS image for Navio2 using pi-gen tool. Also, you can find our kernel source code and the instructions for its compilation on GitHub.

Navio2 sensors are on SPI, except for the barometer which is on I2C.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.