Skip to content

RockPro64 - Firewall mit zwei LAN Schnittstellen!

Verschoben ROCKPro64
  • Ich benutze ja schon länger für verschiedene Einsatzzwecke USB3-to-LAN-Schnittstellen. Einen dieser Adapter, habe ich schon jahrelang an meiner IPFire (IntelNUC).

    Nun wollte ich mal versuchen, wie das so aussieht am ROCKPro64. Wird sie erkannt, läuft sie, was für Probleme tauchen auf usw. Ich habe mich so ziemlich an folgenden Beitrag gehalten https://forum.frank-mankel.org/topic/120/ubuntu-bionic-ip-adresse-ändern

    Also, was haben wir vor? Zwei Schnittstellen, eth0 holt sich per DHCP die Informationen aus meinem LAN. Die Schnittstelle enx000acd26e2c8 bildet ein LAN, das ganze soll durch iptables geschützt sein. Kein Zugriff von außen!

    Hardware

    • ROCKPro64 v2.1 2GB RAM
    • USB-to-LAN DeLock 62121

    Software

    rock64@rockpro64v2_1:/etc$ uname -a
    Linux rockpro64v2_1 4.4.132-1077-rockchip-ayufan-gbaf35a9343cb #1 SMP Mon Jul 30 14:06:57 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
    

    Schnittstellen

    eth0

    • DHCP
    • 192.168.3.x

    enx000acd26e2c8

    • 192.168.0.0/24

    Ähm, kleine Anmerkung: Geht das nicht einheitlich, also eth0,eth1 usw. Ich glaube das ist veraltet, das neue ist dann dieses enx000acd26e2c8. Also, einheitlich wäre mir lieber!?!

    Hier die Lösung.

    Konfiguration netplan

    /etc/netplan/eth0.yaml

    network:
      version: 2
      renderer: networkd
      ethernets:
        eth0:
          dhcp4: true
        enx000acd26e2c8:
          dhcp4: no
          addresses: [192.168.0.1/24]
    

    Netzwerk neustarten

    Direkt mit

    netplan apply      
    

    oder mit

    netplan try
    

    netplan try ermöglicht, das man eine falsche Konfiguration automatisch wieder zurücksetzen lassen kann.

    Nach dem Neustart sieht das dann so aus.

    rock64@rockpro64v2_1:~$ ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
        link/ether 1e:0e:99:52:8e:40 brd ff:ff:ff:ff:ff:ff
        inet 192.168.3.17/24 brd 192.168.3.255 scope global dynamic eth0
           valid_lft 2224sec preferred_lft 2224sec
        inet6 fe80::1c0e:99ff:fe52:8e40/64 scope link 
           valid_lft forever preferred_lft forever
    3: enx000acd26e2c8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 00:0a:cd:26:e2:c8 brd ff:ff:ff:ff:ff:ff
        inet 192.168.0.1/24 brd 192.168.0.255 scope global enx000acd26e2c8
           valid_lft forever preferred_lft forever
        inet6 fe80::20a:cdff:fe26:e2c8/64 scope link 
           valid_lft forever preferred_lft forever
    

    Konfiguration iptables

    Dazu erstellen wir ein Script /etc/firewall.sh

    #!/bin/sh
    # This is a more complex setup, for a home firewall:
    # * One interface plug to the ISP conection (eth0). Using DHCP.
    # * One interface plug to the local LAN switch (eth1). Using 192.168.0.0/24.
    # * Traffic open from the LAN to the SSH in the firewall.
    # * Traffic open and translated, from the local LAN to internet.
    # * Traffic open from internet, to a local web server.
    # * Logging of dropped traffic, using a specific ''log level'' to configure a separate file in syslog/rsyslog.
    
    PATH='/sbin'
    
    ## INIT
    
    # Flush previous rules, delete chains and reset counters
    iptables -F
    iptables -X
    iptables -Z
    iptables -t nat -F
    
    # Default policies
    iptables -P INPUT DROP
    iptables -P OUTPUT DROP
    iptables -P FORWARD DROP
    
    echo -n '1' > /proc/sys/net/ipv4/ip_forward
    echo -n '0' > /proc/sys/net/ipv4/conf/all/accept_source_route
    echo -n '0' > /proc/sys/net/ipv4/conf/all/accept_redirects
    echo -n '1' > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
    echo -n '1' > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
    
    # Enable loopback traffic
    iptables -A INPUT -i lo -j ACCEPT
    iptables -A OUTPUT -o lo -j ACCEPT
    
    # Enable statefull rules (after that, only need to allow NEW conections)
    iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    
    # Drop invalid state packets
    iptables -A INPUT -m conntrack --ctstate INVALID -j DROP
    iptables -A OUTPUT -m conntrack --ctstate INVALID -j DROP
    iptables -A FORWARD -m conntrack --ctstate INVALID -j DROP
    
    ## INPUT
    
    # Incoming ssh from the LAN
    iptables -A INPUT -i enx000acd26e2c8 -s 192.168.0.0/24 \
    -p tcp --dport 22 -m conntrack --ctstate NEW -j ACCEPT
       
    # Allow any connection from this host.
    iptables -A INPUT -i lo -j ACCEPT
       
    # Allow any connection from the local network.
    iptables -A INPUT -s 192.168.0.0/24 -j ACCEPT
      
    # Allow all broadcast traffic.
    iptables -A INPUT -m pkttype --pkt-type broadcast -j ACCEPT
       
    ## OUTPUT
      
    # Enable al outgoing traffic to internet
    iptables -A OUTPUT -o eth0 -d 192.16.3.0/0 -j ACCEPT
       
    # Enable access traffic, from the firewall to the LAN network
    iptables -A OUTPUT -o enx000acd26e2c8 -d 192.168.0.0/24 -j ACCEPT
    
    ## FORWARD
          
    # We have dynamic IP (DHCP), so we've to masquerade
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    iptables -A FORWARD -o eth0 -i enx000acd26e2c8 -s 192.168.0.0/24 \
    -m conntrack --ctstate NEW -j ACCEPT
          
    # Redirect HTTP (tcp/80) to the web server (192.168.0.2)
    #iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 \
    # -j DNAT --to-destination 192.168.0.2:80
    #
    #iptables -A FORWARD -i eth0 -p tcp --dport 80 \
    # -o eth1 -d 192.168.0.2 \
    # -m conntrack --ctstate NEW -j ACCEPT
          
    ## LOGGING
          
    iptables -A INPUT -j LOG --log-level 4 --log-prefix '[FW INPUT]: '
    iptables -A OUTPUT -j LOG --log-level 4 --log-prefix '[FW OUTPUT]: '
    iptables -A FORWARD -j LOG --log-level 4 --log-prefix '[FW FORWARD ]: '
    

    Das starten wir nun mal zum Testen.

    sudo chmod +x firewall.sh
    sudo ./firewall.sh
    

    Achtung! Die offene Konsole bleibt bestehen, aber einmal den ROCKPro64 neustarten und die Konsole ist weg. Dann hilft nur noch die serielle Schnittstelle, oder ein angeschlossenes Notebook am LAN. Wenn denn alles funktioniert 😉 Also Konsole nicht zumachen!!

    Nun kann man testen ob alles so funktioniert, wie es soll. Sollte dies nun alles problemlos funktionieren schreiben wir ein Script, so das das Firewall-Script automatisch beim Starten des ROCKPro64 ausgeführt wird.

    Unter /etc/rc.local folgendes Script erstellen.

    #!/bin/sh
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    set -e
    
    # Launch my netfilter rules
    if [ -e '/etc/firewall.sh' ]
    then
    /bin/sh '/etc/firewall.sh'
    fi
    
    exit 0
    

    Rechte entsprechend anpassen.

    sudo chmod +x rc.local
    

    Danach den Rechner neu starten. Macht dies bitte ganz zum Schluss, wenn alles klappt.


    Sollen die Rechner im LAN (enx000acd26e2c8) automatisch eine IP-Adresse bekommen, so brauchen wir einen DHCP-Server, der diese an die entsprechenden Teilnehmer verteilt.

    DHCP-Server

    Nach einer kurzen Testphase, habe ich begriffen, das man DNSMASQ nur mit tiefgreifenden Änderungen am Grundsystem von Ubuntu 18.04.1 benutzen kann. Da scheint es doch viele Änderungen gegeben zu haben. Da ich zu viele Änderungen am Grundsystem nicht mag, muss ich mich wohl oder übel mit den neuen Sachen vertraut machen.

    Nach Recherche im Netz habe ich den hoffentlich richtigen DHCP-Server gefunden.

    Installation

    sudo apt-get install isc-dhcp-server

    Konfiguration /etc/dhcp/dhcpd.conf

    Der DHCP-Server stellt auf der enx000acd26e2c8-Schnittstelle IP-Adressen zur Verfügung. Die 3.1 ist mein DNS-Server im lokalen Netz.(eth0)

    # Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
    
    # Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
    #DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
    #DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
    
    # Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
    #DHCPDv4_PID=/var/run/dhcpd.pid
    #DHCPDv6_PID=/var/run/dhcpd6.pid
    
    # Additional options to start dhcpd with.
    # Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
    #OPTIONS=""
    
    # On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
    # Separate multiple interfaces with spaces, e.g. "eth0 eth1".
    INTERFACESv4="enx000acd26e2c8";
    INTERFACESv6="";
    
    #authoritative;
        
    # Sample /etc/dhcpd.conf
    # (add your comments here) 
    default-lease-time 600;
    max-lease-time 7200;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.0.255;
    option routers 192.168.0.1;
    option domain-name-servers 192.168.3.1, 1.1.1.1;
    option domain-name "mydomain.example";
    
    subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.10 192.168.0.100;
    #range 192.168.1.10 192.168.1.20;
    }
    

    Ich hatte ein paar Probleme mit der Konfig, weil da ; fehlten. Mit folgendem Befehl kann man die Konfig testen.

    dhcpd -t -cf /etc/dhcp/dhcpd.conf   
    

    Starten

    sudo service isc-dhcp-server start
    

    Status

    sudo service isc-dhcp-server status
    

    Am Ende klappt alles so, wie ich es mir vorgestellt habe.

    Speedtest

    Konsole

    rock64@rockpro64v2_1:~$ iperf3 -c 192.168.3.213
    Connecting to host 192.168.3.213, port 5201
    [  4] local 192.168.3.17 port 45344 connected to 192.168.3.213 port 5201
    [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
    [  4]   0.00-1.01   sec   108 MBytes   890 Mbits/sec    0   5.65 MBytes       
    [  4]   1.01-2.00   sec   114 MBytes   964 Mbits/sec    0   5.65 MBytes       
    [  4]   2.00-3.00   sec   112 MBytes   942 Mbits/sec    0   5.65 MBytes       
    [  4]   3.00-4.00   sec   112 MBytes   940 Mbits/sec   11   2.82 MBytes       
    [  4]   4.00-5.01   sec   112 MBytes   943 Mbits/sec    0   2.82 MBytes       
    [  4]   5.01-6.00   sec   111 MBytes   937 Mbits/sec   11   1.41 MBytes       
    [  4]   6.00-7.00   sec   112 MBytes   941 Mbits/sec   11    723 KBytes       
    [  4]   7.00-8.00   sec   112 MBytes   943 Mbits/sec   11    363 KBytes       
    [  4]   8.00-9.01   sec   112 MBytes   943 Mbits/sec    0    416 KBytes       
    [  4]   9.01-10.00  sec   111 MBytes   936 Mbits/sec   11    300 KBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec   55             sender
    [  4]   0.00-10.00  sec  1.09 GBytes   935 Mbits/sec                  receiver
    
    iperf Done.
    rock64@rockpro64v2_1:~$ iperf3 -c 192.168.3.213 -R
    Connecting to host 192.168.3.213, port 5201
    Reverse mode, remote host 192.168.3.213 is sending
    [  4] local 192.168.3.17 port 45348 connected to 192.168.3.213 port 5201
    [ ID] Interval           Transfer     Bandwidth
    [  4]   0.00-1.00   sec   110 MBytes   922 Mbits/sec                  
    [  4]   1.00-2.00   sec   112 MBytes   941 Mbits/sec                  
    [  4]   2.00-3.00   sec   112 MBytes   939 Mbits/sec                  
    [  4]   3.00-4.00   sec   111 MBytes   932 Mbits/sec                  
    [  4]   4.00-5.00   sec   112 MBytes   941 Mbits/sec                  
    [  4]   5.00-6.00   sec   112 MBytes   941 Mbits/sec                  
    [  4]   6.00-7.00   sec   112 MBytes   941 Mbits/sec                  
    [  4]   7.00-8.00   sec   112 MBytes   941 Mbits/sec                  
    [  4]   8.00-9.00   sec   112 MBytes   942 Mbits/sec                  
    [  4]   9.00-10.00  sec   112 MBytes   941 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec  1.09 GBytes   939 Mbits/sec    0             sender
    [  4]   0.00-10.00  sec  1.09 GBytes   938 Mbits/sec                  receiver
    
    iperf Done.
    

    LAN Notebook

    frank@thinkpad:~$ iperf3 -c 192.168.3.213
    Connecting to host 192.168.3.213, port 5201
    [  4] local 192.168.0.10 port 38566 connected to 192.168.3.213 port 5201
    [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
    [  4]   0.00-1.00   sec  58.5 MBytes   491 Mbits/sec   91   1.19 MBytes       
    [  4]   1.00-2.00   sec  57.9 MBytes   485 Mbits/sec    0   1.32 MBytes       
    [  4]   2.00-3.00   sec  57.7 MBytes   484 Mbits/sec    0   1.42 MBytes       
    [  4]   3.00-4.00   sec  57.8 MBytes   485 Mbits/sec    1   1.05 MBytes       
    [  4]   4.00-5.00   sec  58.0 MBytes   487 Mbits/sec    0   1.13 MBytes       
    [  4]   5.00-6.00   sec  57.9 MBytes   485 Mbits/sec    0   1.18 MBytes       
    [  4]   6.00-7.00   sec  58.0 MBytes   486 Mbits/sec    0   1.22 MBytes       
    [  4]   7.00-8.00   sec  58.0 MBytes   486 Mbits/sec    0   1.24 MBytes       
    [  4]   8.00-9.00   sec  57.9 MBytes   485 Mbits/sec    0   1.25 MBytes       
    [  4]   9.00-10.00  sec  57.8 MBytes   485 Mbits/sec    0   1.26 MBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec   579 MBytes   486 Mbits/sec   92             sender
    [  4]   0.00-10.00  sec   577 MBytes   484 Mbits/sec                  receiver
    
    iperf Done.
    frank@thinkpad:~$ iperf3 -c 192.168.3.213 -R
    Connecting to host 192.168.3.213, port 5201
    Reverse mode, remote host 192.168.3.213 is sending
    [  4] local 192.168.0.10 port 38570 connected to 192.168.3.213 port 5201
    [ ID] Interval           Transfer     Bandwidth
    [  4]   0.00-1.00   sec  73.4 MBytes   615 Mbits/sec                  
    [  4]   1.00-2.00   sec  91.9 MBytes   771 Mbits/sec                  
    [  4]   2.00-3.00   sec  90.6 MBytes   760 Mbits/sec                  
    [  4]   3.00-4.00   sec  91.5 MBytes   767 Mbits/sec                  
    [  4]   4.00-5.00   sec  90.6 MBytes   760 Mbits/sec                  
    [  4]   5.00-6.00   sec  91.5 MBytes   767 Mbits/sec                  
    [  4]   6.00-7.00   sec  90.5 MBytes   759 Mbits/sec                  
    [  4]   7.00-8.00   sec  91.7 MBytes   769 Mbits/sec                  
    [  4]   8.00-9.00   sec  91.7 MBytes   769 Mbits/sec                  
    [  4]   9.00-10.00  sec  91.2 MBytes   765 Mbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec   896 MBytes   752 Mbits/sec    0             sender
    [  4]   0.00-10.00  sec   895 MBytes   751 Mbits/sec                  receiver
    
    iperf Done.
    

    Fazit

    War mal wieder ein hartes Stück Arbeit. Und an alle Experten, die das hier lesen, wenn was falsch ist freue ich mich über konstruktive Kritik.

    Und für Einsteiger, bitte nutzt das so nicht an einer Internetleitung. Damit der Server sicher ist benötigt es noch viel mehr Arbeit. Dazu gibt es viele Hilfeseiten im Netz.

    Links

    https://linoxide.com/linux-how-to/install-configure-dhcp-ubuntu/

  • 0 Stimmen
    2 Beiträge
    438 Aufrufe
    FrankMF

    Hat ein wenig Nerven gekostet und der Artikel ist auch was länger geworden 🙂 Viel Spaß beim Lesen und testen!

  • ROCKPro64 - Release 0.10.6 Was geht?

    Angeheftet ROCKPro64
    1
    0 Stimmen
    1 Beiträge
    383 Aufrufe
    Niemand hat geantwortet
  • ROCKPro64 - USB-C -> LAN

    ROCKPro64
    1
    0 Stimmen
    1 Beiträge
    277 Aufrufe
    Niemand hat geantwortet
  • 0 Stimmen
    1 Beiträge
    420 Aufrufe
    Niemand hat geantwortet
  • ROCKPro64 - RP64.GPIO

    Angeheftet Verschoben Hardware
    6
    0 Stimmen
    6 Beiträge
    6k Aufrufe
    FrankMF

    Hallo zusammen,

    da ich weiß das dieser Artikel recht beliebt ist, wollen wir den heute mal aktualisieren. Vieles aus den vorherigen Beiträgen passt noch. Es gibt aber kleine Anpassungen.

    Hardware ROCKPro64v21. 2GB RAM Software Kamils Release 0.10.9 Linux rockpro64 5.6.0-1132-ayufan-g81043e6e109a #ayufan SMP Tue Apr 7 10:07:35 UTC 2020 aarch64 GNU/Linux Installation apt install python

    Danach laden wir das Projekt

    git clone https://github.com/Leapo/Rock64-R64.GPIO

    PIN Nummern anpassen

    cd Rock64-R64.GPIO/R64 nano _GPIO.py

    Datei ergänzen

    # Define GPIO arrays #ROCK_valid_channels = [27, 32, 33, 34, 35, 36, 37, 38, 64, 65, 67, 68, 69, 76, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 96, 97, 98, 100, 101, 102, 103, 104] #BOARD_to_ROCK = [0, 0, 0, 89, 0, 88, 0, 0, 64, 0, 65, 0, 67, 0, 0, 100, 101, 0, 102, 97, 0, 98, 103, 96, 104, 0, 76, 68, 69, 0, 0, 0, 38, 32, 0, 33, 37, 34, 36, 0, 35, 0, 0, 81, 82, 87, 83, 0, 0, 80, 79, 85, 84, 27, 86, 0, 0, 0, 0, 0, 0, 89, 88] #BCM_to_ROCK = [68, 69, 89, 88, 81, 87, 83, 76, 104, 98, 97, 96, 38, 32, 64, 65, 37, 80, 67, 33, 36, 35, 100, 101, 102, 103, 34, 82] ROCK_valid_channels = [52,53,152,54,50,33,48,39,41,43,155,156,125,122,121,148,147,120,36,149,153,42,45,44,124,126,123,127] BOARD_to_ROCK = [0,0,0,52,0,53,0,152,148,0,147,54,120,50,0,33,36,0,149,48,0,39,153,41,42,0,45,43,44,155,0,156,124,125,0,122,126,121,123,0,127] BCM_to_ROCK = [43,44,52,53,152,155,156,45,42,39,48,41,124,125,148,147,124,54,120,122,123,127,33,36,149,153,121,50]

    Abspeichern.

    Datei test.py anlegen

    nano test.py

    Inhalt

    #!/usr/bin/env python # Frank Mankel, 2018, LGPLv3 License # Rock 64 GPIO Library for Python # Thanks Allison! Thanks smartdave! import R64.GPIO as GPIO from time import sleep print("Output Test R64.GPIO Module...") # Set Variables var_gpio_out = 156 var_gpio_in = 155 # GPIO Setup GPIO.setwarnings(True) GPIO.setmode(GPIO.ROCK) GPIO.setup(var_gpio_out, GPIO.OUT, initial=GPIO.HIGH) # Set up GPIO as an output, with an initial state of HIGH GPIO.setup(var_gpio_in, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Set up GPIO as an input, pullup enabled # Test Output print("") print("Testing GPIO Input/Output:") while True: var_gpio_state_in = GPIO.input(var_gpio_in) var_gpio_state = GPIO.input(var_gpio_out) # Return State of GPIO if var_gpio_state == 0 and var_gpio_state_in == 1: GPIO.output(var_gpio_out,GPIO.HIGH) # Set GPIO to HIGH print("Input State: " + str(var_gpio_state_in)) # Print results print("Output State IF : " + str(var_gpio_state)) # Print results else: GPIO.output(var_gpio_out,GPIO.LOW) # Set GPIO to LOW print("Input State: " + str(var_gpio_state_in)) # Print results print("Output State ELSE: " + str(var_gpio_state)) # Print results sleep(0.5) exit() Beispiel

    Bild Text

    Wenn der Taster im Bild betätigt wird, soll die LED blinken.

    Wir benutzen folgende Ein- Augänge des ROCKPro64.

    # Set Variables var_gpio_out = 156 var_gpio_in = 155

    Das heißt:

    an Pin 1 (3,3V) kommt eine Strippe des Tasters an Pin 29 (Input) kommt eine Strippe des Tasters an Pin 31 (Output) kommt der Plus-Pol der LED an Pin 39 (GND) kommt der Minus-Pol der LED

    Somit wird auf den Eingang (Pin 29) bei Betätigung des Tasters 3,3 Volt angelegt. Damit wird dann der Eingang als High (1) erkannt. Die LED wird über den Ausgang (Pin 31) gesteuert.

    Starten kann man das Script mit

    python test.py

  • 0 Stimmen
    1 Beiträge
    1k Aufrufe
    Niemand hat geantwortet
  • 0 Stimmen
    2 Beiträge
    2k Aufrufe
    FrankMF
    Ergänzung

    Eine andere SATA-Karte und eine Riser-Karte mit angeschlossener GPU startet nicht.

    rock64@rockpro64v2_1:~$ uname -a Linux rockpro64v2_1 4.4.132-1075-rockchip-ayufan-ga83beded8524 #1 SMP Thu Jul 26 08:22:22 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
  • u-boot-erase-spi-rockpro64.img.xz

    Verschoben Tools
    1
    0 Stimmen
    1 Beiträge
    877 Aufrufe
    Niemand hat geantwortet