Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fixing spi errors in early April 2019

There are different fixes for the master (0.6.2) or dev (0.7.0) branches - make sure to use the solution specific for the branch you want to use.

Master installation

If you're getting spi-related errors, e.g.

Waiting up to 4 minutes for new BG: ls: cannot access '/tmp/pump_loop_completed': No such file or directory
grepImportError: No module named spi_serial
Radio check failed. ImportError: No module named spi_serial
  1. Run this: curl https://gist.githubusercontent.com/cluckj/1f93b89388dfeec686be73f85e852a00/raw/a80388dc07eb43655b11be019ee2334d0a773a24/install_mraa.sh | bash

  2. Then reboot

  3. Check your logs (l) and see if the error cleared.

Still getting errors? Or an error that says "Radio check failed. ValueError: Invalid SPI context"?

a. Run sed -i.bak -e "s/#dtparam=spi=on/dtparam=spi=on/" /boot/config.txt

b. then reboot -f

c. Check your logs (l) and see if the spi error cleared. If it has, give it ~20 minutes and you should be looping again.

Dev installation

If you're getting spi-related errors, e.g.

Radio check failed. ImportError: No module named spi_serial

Do this:

  1. npm remove oref0 -g

  2. reboot

@jvemme

This comment has been minimized.

Copy link

commented Apr 13, 2019

Hi there. I having the same error in a Openaps with rmt69 radio on a Raspberry PI. I tried solotion above, besides that cmake needed installing script ran as I guess it sshould, but no dice... Mig rig is on the 0.7.0 dev branch. Any suggestion?

@danamlewis

This comment has been minimized.

Copy link
Owner Author

commented Apr 16, 2019

(Heads up that I don't get notifications from gist comments..so make sure to comment in Gitter https://gitter.im/nightscout/intend-to-bolus if you run into issues.)

@scottleibrand

This comment has been minimized.

Copy link

commented Apr 17, 2019

openaps/oref0#1245 may fix this: to test, do cd ~/src/oref0 && git fetch && git checkout setup-improvements && npm run global-install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.