Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to build for the Lorank8 #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matthijskooijman
Copy link

This is just a copy of the build-pi.sh script, with some minimal
changes:

  • Remove the WiringPi compilation
  • Do not install the python-rpi.gpio package
  • Set PLATFORM to "lorank"

Since the changes are minimal, it might be better to integrate them into a single "build" script perhaps, passing a PLATFORM (and perhaps also CFG_SPI) parameter? Or just a separate script, which gives maximum flexibility for now?

This script was tested on a Lorank8 with a clean Debian Stretch install and produces a working forwarder.

@matthijskooijman
Copy link
Author

I just added one more related commit, that installs libttn-gateway-connector into /usr/local/lib instead of /usr/lib, since the latter should be reserved for system libraries installed by the package manager AFAIK.

This is just a copy of the build-pi.sh script, with some minimal
changes:
 - Remove the WiringPi compilation
 - Do not install the python-rpi.gpio package
 - Set PLATFORM to "lorank"
/usr/lib is normally reserved for system libraries installed to the
package manager. The paho.mqtt.embedded-c was already installed into
/usr/local, now all libraries are.
This passes --remove-destination to the copy of `mp_pkt_fwd` in the rpi
and lorank build scripts, to remove and recreate the file instead of
writing to the existing file. This prevents the "Text file busy" error
that would otherwise occur when the forwarder is running.
@matthijskooijman
Copy link
Author

matthijskooijman commented May 1, 2020

For anyone still looking here for Lorank-support: It seems that with a recent kernel update, the beagleboard has renamed their SPI devices. The Lorank uses SPI0 for the radio, but this used to be /dev/spidev1.0 (which is also what the packet forwarder tries to open. However, with a recent Debian buster kernel, it is called /dev/spidev0.0 instead.

It seems that these device names are not necessarily stable, so the best way to access SPI devices is to use the /dev/spi/0.0 symlink (present only in recent images, stretch did not have it yet, and this is also Beaglebone-specific).

I saw that this packet forwarder supports a -d option to change the SPI device, which might be useful: 9100f65

Some additional discussion is here: adafruit/adafruit-beaglebone-io-python#263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant