Navio2 SPI not working

Hello,

I am using Navio2 with Raspberry Pi 2 Model B and I have some issues with SPI while running the examples in C++ you are providing on your GitHub repository (the AccelGyroMag more precisely).

I used the Raspbian image provided in the DOC section of your website. At first, everything seems to work, I get beautiful data and I am happy. But as soon as a sudo apt-get upgrade is done, and then a reboot of the system, the spi_bcm2708 module disappears from the lsmod output and the examples can’t run anymore (sensor not enabled or sometimes some random values) for both MPU9250 and LSM9DS1.

First, I checked in /etc/modprobe.d/raspi-blacklist.conf for any blacklisted module, but the file is empty. I then tried to manually enable SPI interface in /boot/config.txt by adding dtparam=spi=on and reboot, but this still doesn’t work. I also tried sudo modprobe spi_bcm2708 but I am getting an error ([…] No such device). Can I use the spi_bcm2835 module instead ? If so, how ?

I also tried with Ubuntu 14.04 LTS, but the same issues are encountered. The only way I managed to make everything work was to change nothing on the Raspbian image provided. But I need to install ROS and a upgrade is required to work properly.

Thank you in advance for you help :smile:

Hi,

is there anything we can change in sources or config to enable back spi?
led and baro are working for me but spi gyro, gps not.

Thank you,
Grega

you can install ros-jade-* on emlid SD
follow this guide jade/Installation/UbuntuARM - ROS Wiki

ros and ardupilot are running
not yet tested integration…

thank you, but I am using navio2 for my custom project in c++.
is there a fix without having to install ros?

Which package breaks the upgrade?

not sure… after installing emlid image on Raspberry Pi 2, I did:

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install rpi-update
  • sudo rpi-update

I am new to RPI but there are only spi0 and spi1 under /dev/ .
I have also tried raspi-config and enable SPI, I2C, enable/disable device tree

By running these procedures you’ve replaced our custom kernel that provides access to RC IO coprocessor and has some additional tuning required for running examples and APM. In next version of the image we will be controlling that the kernel stays intact, but in the current one it is better not to run upgrade and rpi-update.

The problem was I wanted to use the new RPi 3 and with current image it hangs on boot (rainbow) screen. You have to do a rpi-update apt-get update on RPi 2 and then move sd card to RPi 3 to boot your image. Now I am back on RPi 2 with a fresh image and examples work again.

Hey grega!
Here is what to do thx to George Staroselskiy:

Support for RPi3 is in progress, we will release an image soon.

So it’s not possible to access the RC IO coprocessor with the standard Jessie image?

Not without additional procedures like kernel and module compilation, configuration etc.

I guess this is not yet implemented on the latest Stretch image…

Just fell on rpi-update “trap”…

The apt-get upgrade has been working for years now. rpi-update is a custom update mechanism for downstream Raspberry Pi Foundation’s kernels. We don’t use one, so it’s pretty obvious that it won’t work. We can get rid of rpi-update debian package in the next release, if it confuses anyone.

Thanks @george.staroselskiy

the statement above from Mikhail is not clear. Any chance of publishing the required steps to build a Emlid image from scratch ?

Yeah, we’ll try to release this week.

Quick question.

Any specific reason to disable the Bluetooth on the config.txt for the RPI3 ?

It conflicted with UART which is mostly used for radios.

ok thanks

Good to know.

I would suggest to add that to the release notes Raspbian Stretch Release for Navio with ArduCopter-3.5 and ROS Kinetic

1 Like