Skip to content

Instantly share code, notes, and snippets.

@danamlewis
Last active April 17, 2019 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danamlewis/ed73bd2008def086a334a7102f6005bd to your computer and use it in GitHub Desktop.
Save danamlewis/ed73bd2008def086a334a7102f6005bd to your computer and use it in GitHub Desktop.
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
Copy link

jvemme 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
Copy link
Author

(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
Copy link

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