FabLab61 / FabKey

Completely opensource Arduino-based access control system. Compatible with any Wiegand readers, Arduino boards and single-board linux computers
3 stars 1 forks source link

wiring pi is not working #19

Open pavelsr opened 7 years ago

pavelsr commented 7 years ago
Unable to determine hardware version. I see: Hardware   : BCM2835
,
 - expecting BCM2708 or BCM2709. Please report this to projects@drogon.net
pavelsr commented 7 years ago

Possible solution: use arm32v6/alpine:3.6 in dockerfile

pavelsr commented 7 years ago

Steps to reproduce the problem:

docker run pavelsr/fabkey:armhf gpio readall
pavelsr commented 7 years ago

Check with raspbian:

arm32v7/debian:stretch resin/rpi-raspbian

pavelsr commented 7 years ago

Dockerfile1:

FROM arm32v7/debian:stretch
RUN apt-get update && \
    apt-get install wiringpi

Dockerfile2

FROM resin/rpi-raspbian
RUN apt-get update && \
    apt-get install wiringpi
docker build -t paveslr/fabkey-strecth -f Dockerfile1 .
docker run -it paveslr/fabkey-strecth gpio readall
pavelsr commented 7 years ago

Result:

arm32v7/debian:stretch : E: Unable to locate package wiringpi

resin/rpi-raspbian: wiringPiSetup: Unable to open /dev/mem or /dev/gpiomem: No such file or directory. Try running with sudo?

Working:

docker run -it --privileged paveslr/fabkey-resin gpio readall

Ok but

E: Unable to locate package perl-dev
E: Unable to locate package openssl-dev

So let's try with following Dockerfile:


libperl-dev
libssl-dev
pavelsr commented 7 years ago

Wiring pi (gpio) script without sudo:

#!/bin/bash
PIN=22
gpio export $PIN out
gpio -g write $PIN 1
sleep 3
gpio -g write $PIN 0
printf 1;