I started with installing python module RPi.GPIO with pip. Failed with message “Python.h not found” because required python-devel was not found. python-devel is not available either through zypper nor through pip.
Thanks, Malcolm.
It’s better but not perfect yet
Regards, Darek
===============================================================
linux:/home/pi # cat /etc/os-release
NAME=“SLES_RPI”
VERSION=“12-SP2”
VERSION_ID=“12.2”
PRETTY_NAME=“SUSE Linux Enterprise Server for the Raspberry Pi”
ID=“sles_rpi”
ANSI_COLOR=“0;32”
CPE_NAME=“cpe:/o:suse:sles_rpi:12:sp2”
zypper in wiringPi-gpio
Refreshing service ‘SUSE_Linux_Enterprise_Server_for_the_Raspberry_Pi_12_SP2_aarch64’.
Loading repository data…
Reading installed packages…
Resolving package dependencies…
The following 2 NEW packages are going to be installed:
wiringPi wiringPi-gpio
The following 2 packages are not supported by their vendor:
wiringPi wiringPi-gpio
2 new packages to install.
Overall download size: 60.4 KiB. Already cached: 0 B. After the operation, additional 257.5 KiB will be
used.
Continue? [y/n/? shows all options] (y): y
Retrieving package wiringPi-2.36-16.1.aarch64 (1/2), 36.5 KiB (168.4 KiB unpacked)
Retrieving: wiringPi-2.36-16.1.aarch64.rpm …[error]
File ‘./aarch64/wiringPi-2.36-16.1.aarch64.rpm’ not found on medium ‘http://download.opensuse.org/repositories/home:/malcolmlewis:/ARM:/TESTING/SUSE_SLE-12-SP2_aarch64/’
Abort, retry, ignore? [a/r/i/? shows all options] (a):
linux:/home/pi # python3
Python 3.4.5 (default, Sep 08 2016, 13:41:53) [GCC] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import RPi.GPIO
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib64/python3.4/site-packages/RPi/GPIO/init.py”, line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
Hi Darek
So with some hacking (I do mean hacking ) I now have python RPi.GPIO
and wiringPi working…
To start with what I did was create a fake cpuinfo file
called /tmp/cpuinfo, then patched RPi.GPIO and wiringPi to use this
fake file. But (always one of those) what I did was glean the Hardware,
Revision and Serial number via booting up Raspbian and running
cat /proc/cpuinfo and noting the info.
Next I created a systemd fake-cpuinfo service as well as a
YaST /etc/sysconfig/fake-cpuinfo file with entries from the above
information, so for things to work this is needed.
So if you uninstall the two python modules, wiringPi and wiringPi-gpio
and install either python module and wiringPi (just one package now,
as built a little different) fire up yast sysconfig and browse to
System and fake-cpuinfo and add your info for Revision and Serial
Number and save, then enable and start the fake-cpuinfo service;
In the last image you can see pin 12 is set to OUT, so it all appears
to be working… need a lcd char board turning up this week to really
test…
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.1|GNOME 3.16.2|4.1.36-44-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Hi
Just an update, wiringPi has now been patched (and updated) to no longer need the fake cpu service. Also RPi.GPIO has been patched to fix as well as using mraa instead of wiringPi.