/dev/spidev0.1: device in use

Hi,

Raspberry pi 3B - Wazigate V1.1.3

After sudo apt update && sudo apt upgrade which has upgraded to Linux 5.4.51-v7+ armv7l I am now getting:

Err: looking for SX127X: can not export gpio8: write /sys/class/gpio/export: device or resource busy

Err: looking for SX127X: /dev/spidev0.1: device is in use

from the wazigate-lora logs.

Please check and advise.

Kind regards

Paul

I think @moji can reply

Hi Paul,

It looks like waziugate-lora cannot find the lora-module.

Do you have a LoRa module attached on your Raspberry pi? something like WaziHAT single channel?
something like this:
image

Cheers

Hi Moji,

Yes, that’s the system I have.

The update was with apt not apt-get.

The current output with apt-get is the following:

The following package was automatically installed and is no longer required: rpi-eeprom-images Use 'sudo apt autoremove' to remove it. The following packages have been kept back: binutils binutils-arm-linux-gnueabihf binutils-common libbinutils python-rpi.gpio python3-rpi.gpio raspberrypi-ui-mods The following packages will be upgraded: apt apt-transport-https apt-utils arandr base-files bind9-host bluez bluez-firmware ca-certificates connectd containerd.io distro-info-data docker-ce docker-ce-cli dphys-swapfile ffmpeg firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek fuse gir1.2-pango-1.0 git git-man gldriver-test gtk2-engines-clearlookspix hostapd iputils-ping libapt-inst2.0 libapt-pkg5.0 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libbind9-161 libbluetooth3 libcups2 libcupsimage2 libcurl3-gnutls libdns-export1104 libdns1104 libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules libfm4 libfuse2 libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev libgnutls30 libgnutlsxx28 libicu63 libisc-export1100 libisc1100 libisccc161 libisccfg163 libjavascriptcoregtk-4.0-18 libldap-2.4-2 libldap-common liblwres161 libnss3 libobrender32v5 libobt2v5 libopenmpt0 libpam-chksshpwd libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libpostproc55 libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libssh-gcrypt-4 libssl1.1 libswresample3 libswscale5 libsystemd0 libtag1v5 libtag1v5-vanilla libudev1 libunbound8 libwebkit2gtk-4.0-37 lxinput lxpanel lxpanel-data lxplug-bluetooth lxplug-cputemp lxplug-ejecter lxplug-network lxplug-ptbatt lxplug-volume lxterminal obconf openbox openssl pcmanfm pi-bluetooth pi-greeter pi-package pi-package-data pi-package-session piclone pipanel pishutdown piwiz pprompt python-motephat python-pil python3-motephat python3-pgzero python3-pil raspberrypi-bootloader raspberrypi-kernel raspberrypi-sys-mods raspi-config rc-gui realvnc-vnc-server rp-prefapps rpd-plym-splash rpi-chromium-mods rpi-eeprom rpi-eeprom-images rpi-update systemd systemd-sysv tzdata udev wpasupplicant xserver-common xserver-xorg-core 142 upgraded, 0 newly installed, 0 to remove and 7 not upgraded. Need to get 277 MB of archives. After this operation, 7,691 kB disk space will be freed. Do you want to continue? [Y/n] n Abort.

I note that:

The following packages have been kept back: binutils binutils-arm-linux-gnueabihf binutils-common libbinutils python-rpi.gpio python3-rpi.gpio raspberrypi-ui-mods

Maybe these are the packages that are affecting the SPI port?

Using apt gives the following:
The following package was automatically installed and is no longer required: rpi-eeprom-images Use 'sudo apt autoremove' to remove it. The following NEW packages will be installed: agnostics fio libaio1 libfl2 libnuma1 librbd1 librdmacm1 lxplug-magnifier rp-bookshelf rpi.gpio-common The following packages will be upgraded: apt apt-transport-https apt-utils arandr base-files bind9-host binutils binutils-arm-linux-gnueabihf binutils-common bluez bluez-firmware ca-certificates connectd containerd.io distro-info-data docker-ce docker-ce-cli dphys-swapfile ffmpeg firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek fuse gir1.2-pango-1.0 git git-man gldriver-test gtk2-engines-clearlookspix hostapd iputils-ping libapt-inst2.0 libapt-pkg5.0 libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56 libbind9-161 libbinutils libbluetooth3 libcups2 libcupsimage2 libcurl3-gnutls libdns-export1104 libdns1104 libfm-data libfm-extra4 libfm-gtk-data libfm-gtk4 libfm-modules libfm4 libfuse2 libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev libgnutls30 libgnutlsxx28 libicu63 libisc-export1100 libisc1100 libisccc161 libisccfg163 libjavascriptcoregtk-4.0-18 libldap-2.4-2 libldap-common liblwres161 libnss3 libobrender32v5 libobt2v5 libopenmpt0 libpam-chksshpwd libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpangoxft-1.0-0 libpostproc55 libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libssh-gcrypt-4 libssl1.1 libswresample3 libswscale5 libsystemd0 libtag1v5 libtag1v5-vanilla libudev1 libunbound8 libwebkit2gtk-4.0-37 lxinput lxpanel lxpanel-data lxplug-bluetooth lxplug-cputemp lxplug-ejecter lxplug-network lxplug-ptbatt lxplug-volume lxterminal obconf openbox openssl pcmanfm pi-bluetooth pi-greeter pi-package pi-package-data pi-package-session piclone pipanel pishutdown piwiz pprompt python-motephat python-pil python-rpi.gpio python3-motephat python3-pgzero python3-pil python3-rpi.gpio raspberrypi-bootloader raspberrypi-kernel raspberrypi-sys-mods raspberrypi-ui-mods raspi-config rc-gui realvnc-vnc-server rp-prefapps rpd-plym-splash rpi-chromium-mods rpi-eeprom rpi-eeprom-images rpi-update systemd systemd-sysv tzdata udev wpasupplicant xserver-common xserver-xorg-core 149 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Need to get 283 MB of archives. After this operation, 2,478 kB disk space will be freed. Do you want to continue? [Y/n] n Abort

The NEW packages are:

The following NEW packages will be installed: agnostics fio libaio1 libfl2 libnuma1 librbd1 librdmacm1 lxplug-magnifier rp-bookshelf rpi.gpio-common

Maybe one of these have changed the SPI way of working?

Have gone back to the previous version - all is working OK.

Kind regards Paul

1 Like

@moji Please see this:

Kind regards Paul

1 Like

My understanding is that the new version of Raspbian uses GPIO07 for some new purpose. The previous version didn’t use it. However LoRa hats also uses GPIO07.
@paulimison, did you try the overlay solution proposed in the post?
@moji, what do you think, should we include the overlay solution in the new version of the WaziGate?
Should we plan to re-wire something in the next version of the WaziHat?
Cheers

1 Like