Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

R1 - GPIO halfway working

Featured Replies

Hi,

 

after unsuccessful experiences with bananian I found armbian - due to the active forum and answers to questions it looks like the better choice.

 

I try to install fhem on bpr-r1. Combine a access point with homeautomation server (the router ifunction is handled by another device).

After some work with Debian Jessie (lot´s of issues with hostapd and gpio) - Ubuntu with 4.4.1 kernel works stable.

Only issue which keeps me from going into operation is following problem:

all directories /sys/devices/platform/gpio-sunxi/gpio/gpio* are recreated everytime fhem server starts.

 

The trick from Raspbian with chown -R root:gpio ys/devices/platform/gpio-sunxi/gpio/gpio* is not working, due to recreation.

The effect is, that attributes like "active_low" are not working, behaus fhem cannot modify them because of missing access rights. Running fhem as root is not an option.

 

I know for sure, this is not a fhem problem. Some device definition is working fine on 2 RaspberryPis.

 

 

Where is the place I can tell the system do recreate gpio-subdirectories with user:group = root:gpio as well as 775 as access rights?

 

Greetings

Harald

The trick from Raspbian with chown -R root:gpio ys/devices/platform/gpio-sunxi/gpio/gpio* is not working, due to recreation.

 

Why shouldn't that work if you put the line in /etc/rc.local so that it gets executed on every reboot?

 

BTW: Before you start wasting time trying to use the R1 as access point better search the forums before to get an idea what a waste of time and ressources this will be (in other words: it doesn't work as advertised and you better forget about it or replace the hardware)

  • Author

Thanks tkaiser for the advice.

The AP is just a nice to have feature  and I will not waste more time on it. I already bought a USB Wifi stick as replacement.

 

Before writing in this forum I added "chmod and chown" commands into /etc/init.d/fhem before starting fhem - no help.

Just now I did a test again:

Log file of fhem:

016.03.26 13:22:00 1: OG.fz.RS.tuer_mot: entfernt
2016.03.26 13:22:00 1: OG.fz.RS.tuer_dir: entfernt
2016.03.26 13:22:00 1: Including fhem.cfg
2016.03.26 13:22:00 1: Including myGlobals.inc
2016.03.26 13:22:01 3: telnetPort: port 7072 opened
2016.03.26 13:22:01 3: WEB: port 8083 opened
2016.03.26 13:22:01 3: WEBphone: port 8084 opened
2016.03.26 13:22:01 3: WEBtablet: port 8085 opened
2016.03.26 13:22:01 2: eventTypes: loaded 56 events from ./log/eventTypes.txt
2016.03.26 13:22:01 1: Including /opt/fhem/haus.inc
2016.03.26 13:22:01 1: Including /opt/fhem/og.inc
/usr/local/bin/gpio: Warning: File not present: /sys/class/gpio/gpio4/edge
2016.03.26 13:22:01 1: Can't open file: OG.fz.RS.tuer_dir, active_low
2016.03.26 13:22:01 1: Can't open file: OG.fz.RS.tuer_mot, active_low
2016.03.26 13:22:01 1: Including /opt/fhem/myEvents.inc
2016.03.26 13:22:01 1: Including ./log/fhem.save
/usr/local/bin/gpio: Warning: File not present: /sys/class/gpio/gpio4/edge

 

root@lamobo-r1:/opt/fhem# ll /sys/devices/platform/gpio-sunxi/gpio/
total 0
drwxrwxr-x 18 root gpio 0 Mar 26 13:22 ./
drwxr-xr-x  4 root gpio 0 Mar 26 06:58 ../
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio10/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio11/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio14/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio15/
drwxr-xr-x  3 root root 0 Mar 26 13:22 gpio17/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio18/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio22/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio23/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio24/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio25/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio27/
drwxr-xr-x  3 root root 0 Mar 26 13:22 gpio4/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio7/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio8/
drwxr-xr-x  3 root gpio 0 Mar 26 13:21 gpio9/
drwxrwxr-x  3 root gpio 0 Mar 26 06:58 gpiochip1/
root@lamobo-r1:/opt/fhem# gd !$
gd /sys/devices/platform/gpio-sunxi/gpio/
/sys/devices/platform/gpio-sunxi/gpio /opt/fhem ~
root@lamobo-r1:/sys/devices/platform/gpio-sunxi/gpio# ll gpio4
total 0
drwxr-xr-x  3 root root       0 Mar 26 13:22 ./
drwxrwxr-x 18 root gpio       0 Mar 26 13:22 ../
-rw-r--r--  1 root root    4096 Mar 26 13:22 active_low
lrwxrwxrwx  1 root root       0 Mar 26 13:23 device -> ../../../gpio-sunxi/
-rw-r--r--  1 root root    4096 Mar 26 13:22 direction
drwxr-xr-x  2 root root       0 Mar 26 13:23 power/
lrwxrwxrwx  1 root root       0 Mar 26 13:23 subsystem -> ../../../../../class/gpio/
-rw-r--r--  1 root root    4096 Mar 26 13:22 uevent
-rw-r--r--  1 fhem dialout 4096 Mar 26 13:22 value
 

GPIO pin 4 and 7 have been recreted by the start of fhem.

/usr/local/bin/gpio is right in place.

 

So I came to conclusion there are 2 ways

a) change file rights during creation   --> ask the forum

B) modify the fhem module RPB_GIO --> searching ins ongoing

 

Greetings

Harry99n

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.