BananaPro (Armbian ab 1/2018): Unterschied zwischen den Versionen

Aus www.electronic-man.randschtoischlotzer.de
Wechseln zu: Navigation, Suche
K (SMB-Zugriff (Share) einrichten)
(RPi.GPIO auf Banana Pro einrichten)
Zeile 155: Zeile 155:
  
 
[http://wiki.lemaker.org/RPi.GPIO Quelle:]
 
[http://wiki.lemaker.org/RPi.GPIO Quelle:]
 +
 +
==Benutzer Rechte auf GPIO gewähren==
 +
 +
===Enable GPIO access===
 +
 +
Interrupts work by monitoring the GPIO pins. You'll need to give the user ''bananapi'' access to these by adding the following udev rule (all on one line) to <code>/etc/udev/rules.d/51-gpio.rules::</code>
 +
 +
SUBSYSTEM=="gpio*", PROGRAM="
 +
/bin/sh -c 'chown -R root:gpio /sys/class/gpio &&
 +
chmod -R 770 /sys/class/gpio;
 +
chown -R root:gpio /sys/devices/platform/gpio-sunxi/gpio &&
 +
chmod -R 770 /sys/devices/platform/gpio-sunxi/gpio'"
 +
 +
with the following command::
 +
 +
$ sudo nano /etc/udev/rules.d/51-gpio.rules
 +
 +
Then create the gpio group and add the user ''bananapi''::
 +
 +
$ sudo groupadd gpio
 +
$ sudo gpasswd -a bananapi gpio
 +
 +
You will have to reboot after setting up SPI and GPIO permissions.
 +
 +
[https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwi-nuLsloHMAhXDHQ8KHTSVArMQFggfMAA&url=https%3A%2F%2Fgithub.com%2FLeMaker%2FLNcommon&usg=AFQjCNFf-pvaub9fXlRhD2wONN4R7GM_Gw Quelle:]
  
 
==[[TM1637 LED Display ansteuern - Only 4 PIN Red Common Anode 4-Segment Digital Tube Display For Arduino Raspberry]]==
 
==[[TM1637 LED Display ansteuern - Only 4 PIN Red Common Anode 4-Segment Digital Tube Display For Arduino Raspberry]]==

Version vom 28. Januar 2018, 16:18 Uhr

Armbian (Debian Server Mainline Kernel) (ab 1/2018)

Download

  • https://www.armbian.com/banana-pi-pro/
  • Download: Armbian_5.35_Bananapipro_Debian_stretch_next_4.13.16.7z (249.265 kB)
  • momentanes Image: Armbian_5.35_Bananapipro_Debian_stretch_next_4.13.16.img (1.355.776 kB)

Infos zur Hardware

https://linux-sunxi.org/Banana_Pro

Erstanmeldung

Benutzer:

root

Kennwort:

1234

Aktualisieren

apt-get update
apt-get upgrade

Neustarten

  • Notwendig, weil der dbus-Dämon ersetzt werden soll: A reboot is required to replace the running dbus-daemon. Please reboot the system when convenient.
reboot

Zeitzone einstellen

armbian-config

Locale auf Deutsch stellen

Ein Workaround, weil armbian-config hier wohl momentan einen Fehler (Bug) hat:

sudo apt-get install task-german
sudo dpkg-reconfigure locales
locale -a
locale-gen
sudo nano /etc/default/keyboard
update-locale
sudo nano /etc/default/locale
armbian-config
env | egrep '(LC|LANG)'

NTFS-formatierte USB-HDD bei Start mounten

  • falls nicht vorhanden ntfs-3g für Zugriff auf Windows-NTFS-formatierte Datenträger installieren:
apt-get install ntfs-3g
  • Mountpunkt erstellen:
mkdir /media/usb0
  • die Cron-Job-Tabelle um einen Mount-Befehl erweitern:
 [Ausklappen
crontab -e
  • Zeile einfügen:
@reboot sleep 60;  mount -t auto /dev/sda1 /media/usb0

Quelle:

SMB-Zugriff (Share) einrichten

  • Software installieren
apt-get install samba samba-common-bin
  • Benutzer einrichten
smbpasswd -a pi
  • Server einstellen
service samba stop
mv /etc/samba/smb.conf /etc/samba/smb.conf.original
nano /etc/samba/smb.conf
  • Inhalt der smb.conf
    [global]
       workgroup = WORKGROUP
       #usershare allow guests = yes
       #security=share
       security=user
       follow symlinks = yes
       wide links = no
       unix extensions = no
       lock directory = /var/cache/samba
   [Pi]
       browsable = yes
       read only = no
       #guest ok = yes
       valid users = pi
       path = /home/pi
   [devices]
       browsable = yes
       read only = no
       #guest ok = yes
       valid users = pi
       path = /media
       force user = root
  • optional:
      [MEDIA USB-HDD 1.0 TB]
      browsable = yes
      read only = no
      #guest ok = yes
      valid users = pi
      path = /media/usb0
  • Server neu starten
service smbd restart

Quelle:

RPi.GPIO auf Banana Pro einrichten

Voraussetzungen: Paket sudo muss instaliert sein.

  • GIT installieren:
sudo apt-get update
sudo apt-get install git 
  • Paket herunterladen:
cd /root
git clone https://github.com/LeMaker/RPi.GPIO_BP -b bananapro
  • Installation:
sudo apt-get update
sudo apt-get install python-dev
  • Kompilieren und Installieren:
cd RPi.GPIO_BP
python setup.py install                 
sudo python setup.py install

Quelle:

Benutzer Rechte auf GPIO gewähren

Enable GPIO access

Interrupts work by monitoring the GPIO pins. You'll need to give the user bananapi access to these by adding the following udev rule (all on one line) to /etc/udev/rules.d/51-gpio.rules::

SUBSYSTEM=="gpio*", PROGRAM="
/bin/sh -c 'chown -R root:gpio /sys/class/gpio &&
chmod -R 770 /sys/class/gpio;
chown -R root:gpio /sys/devices/platform/gpio-sunxi/gpio &&
chmod -R 770 /sys/devices/platform/gpio-sunxi/gpio'"

with the following command::

$ sudo nano /etc/udev/rules.d/51-gpio.rules

Then create the gpio group and add the user bananapi::

$ sudo groupadd gpio
$ sudo gpasswd -a bananapi gpio

You will have to reboot after setting up SPI and GPIO permissions.

Quelle:

TM1637 LED Display ansteuern - Only 4 PIN Red Common Anode 4-Segment Digital Tube Display For Arduino Raspberry

TFTP-Server installieren

  • Server installieren:
apt-get install tftpd-hpa
  • Einstelllungen anpassen:
nano /etc/default/tftpd-hpa

Inhalt der Datei wie folgt ändern:

TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/srv/tftp”
TFTP_ADDRESS=”0.0.0.0:69″ 
TFTP_OPTIONS=”–secure -4
  • Server neu starten:
service tftpd-hpa restart

Quelle:

Hinweis: Dateien in /srv/tftp ablegen.

Evtl. Rechte anpassen:

chmod g+s /srv/tftp/
chmod 775 /srv/tftp/

PXE einrichten

  • den DNSMASQ-Dämon um ein Startscript erweitern:
 [Ausklappen
nano /etc/dnsmasq.d/04-pxe.conf
  • den DNSMASQ-Dämon neu starten:
sudo service dnsmasq restart

Quelle1: Quelle2: Quelle3: Quelle4: Quelle5:

TFTP-Server "zusehen"

  • tcpdump installieren:
sudo apt-get install tcpdump
  • Auf TFTP7PXE-Ports "lauschen":
tcpdump port 69 -vv
tcpdump port 4011 -vvvvv
sudo tcpdump -i eth0 port bootpc