Du bist hier -> Projekte -> Asus Tinker
Themen
- Neuen User (Rechte wie linaro) anlegen
- Samba Server einrichten
- mpd Music Player Deamon einrichten
- wiringPi installieren
- Python
https://the-bionic-cyclist.co.uk/2017/04/05/setup-asus-tinkerboard-to-boot-from-a-hard-drive/
84
https://sourceforge.net/projects/tinkerboard/
linaro@linaro-alip:~$ sudo su
root@linaro-alip:/home/linaro# whoami root root@linaro-alip:/home/linaro# passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully root@linaro-alip:/home/linaro# exit exit linaro@linaro-alip:~$ passwd Changing password for linaro. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully linaro@linaro-alip:~$
sudo su passwd -> standard exit passwd -> standard sudo dpkg-reconfigure locales
sudo dpkg-reconfigure keyboard-configuration
sudo reboot Datum und Uhrzeit prüfen/stellen -war-> ok sudo apt-get update sudo apt-get install mc sudo apt-get install nano ssh ist installiert -> ok sudo apt-get install xfonts-base sudo apt-get install tightvncserver
(https://www.raspberrypi.org/forums/viewtopic.php?t=123457)
Create a new file /etc/systemd/system/vncserver@.service with the following contents:
[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forking User=linaro PAMName=login PIDFile=/home/linaro/.vnc/%H:%i.pid ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.target
xsetroot -solid grey -cursor_name left_ptr
Start mit: tightvncserver -geometry 1280x720
oder
tightvncserver
su linaro -c "vncserver -geometry 1920x1080")
Die Auflösung des VNC-Bildschirmes kann beim Starten des TightVNC-Servers mit dem Parameter -geometry angeben werden. Für eine Auflösung von 1280x720 sieht der Befehl wie folgt aus. tightvncserver -geometry 1280x720
pw standard an
oder z.B.
tightvncserver -geometry 1920x1080
tightvncserver -geometry 1376×768
1600x900
TightVNCServer automatisch starten
Damit TightVNC beim Systemstart automatisch gestartet wird, folgenden Befehlsaufruf in die /etc/rc.local eintragen werden.sudo nano /etc/rc.local
Vor der letzten Zeile (exit) folgende Zeile einfügen:su linaro -c "tightvncserver -geometry 1920x1080"
Danach mit:sudo shutdown -r now
nach Neustart testen.
Hinweis: Eingabe um von Full-Mode in den Normal-Mode und umgekehrt umschalten: SHIFT+CTRL+ALT+F
Install V1.6 beta
Monitoraufloesung angepasst geaendert
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure keyboard-configuration
sudo reboot Datum und Uhrzeit prüfen/stellen sudo apt-get update sudo apt-get install console-data (??notwendig??) nicht notwendig: setxkbmap de -> ok sudo apt-get install mc -> ok sudo apt-get install nano -> ok
Den ECDSA-Fingerprint eines Servers kann man mit dem Systemprogramm ssh-keygen erfahren:
ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key.pub -l 256 52:e3:90:68:7e:8e:da:f0:81:b2:70:53:3c:0c:50:fd /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA) sudo su root@linaro-alip:/home/linaro# passwd Geben Sie ein neues UNIX-Passwort ein: Geben Sie das neue UNIX-Passwort erneut ein: passwd: Passwort erfolgreich geändert root@linaro-alip:/home/linaro# exit linaro@linaro-alip:~$ passwd Ändern des Passworts für linaro. wifi rechts unten rechte MT auf Connectsymbol -> Edit Connections .. keyring di Synaptic Package Manager Firefox esr (Firefox) password di... Firefox sprachpacket de -l10nde sudo reboot sudo apt-get install xfonts-base sudo apt-get install tightvncserver
linaro@linaro-alip:~$ sudo nano /etc/rc.local
linaro@linaro-alip:~$ tightvncserver -geometry 1920x1080 password: standard
17.04.17
Synaptic Package Manager bluefish (chromium wurde dabei deinstalliert warum??) audacity -> Fehler keine Funktion VLC -> Fehler keine Funktion chromium nochmals installiert
sudo apt-get autoremove
FTP-Server einrichten
http://praxistipps.chip.de/raspberry-pi-als-ftp-server-einrichten-so-gehts_29526 sudo apt-get install proftpd sudo nano /etc/proftpd/proftpd.conf ServerName "linaro"
unsortierte Sammlung über Asus Tinker Board
http://rockchip.wikidot.com/linux-user-guide
192.168.178.89 linaro an proftp ->ok keyring di mpc update speaker-test -t sin -f 800
https://wiki.ubuntuusers.de/.asoundrc/
https://www.asus.com/uk/Single-Board-Computer/Tinker-Board/
https://www.realvnc.com/docs/raspberry-pi.html#raspberry-pi-setup funktioniewt nicht
GPIO
https://github.com/FrankWu100/tinker-gpio
https://sourceforge.net/p/raspberry-gpio-python/wiki/Home/
Alternativen
http://up-shop.org/up-boards/94-up-squared-celeron-duo-core-4gb-memory32gb-emmc.html
https://www.texim-europe.com/up-board/order.aspx
Download: QNAP\Education\AsusTinker
GPIO_API_for_Python 20170223-tinker-board-linaro-jessie-alip-v14 https://www.asus.com/uk/supportonly/TInker%20Board2GB/HelpDesk_Download/
https://www.asus.com/de/Motherboards/TINKER-BOARD/HelpDesk/?SearchKey=Tinker/
https://www.asus.com/de/Single-Board-Computer/Tinker-Board/
https://help.nextcloud.com/t/experimental-howto-asus-tinker-board-nc-box/9135
Tastatur
um auf eine deutsche Tastatur umzustellen, im Terminal folgendes eingeben:
sudo dpkg-reconfigure keyboard-configuration
Diese Umstellung gilt nur für die laufende Sitzung. Benutzt Du kein DE mit einer eigenen Einstellmöglichkeit, nimmst Du obigen Befehl in Deine Autostart-Datei auf.
Dort sind sämtliche Tastatur-Layouts gespeichert.
Nun funktioniert unser Befehl wieder, wie er soll:
loadkeys us
zurück zum deutschen Layout geht’s wieder mit:
loadkeys de
VNC Server
sudo apt-get install tightvncserver Fehler: Couldn't start Xtightvnc; trying default font path.
apt-get install xfonts-base
ls /usr/share/fonts/X11/ if it is not found, then try to install xfonts base
Start mit: vncserver
su linaro -c "vncserver -geometry 1920x1080"
Bildschirmauflösung festlegen
Die Auflösung des VNC-Bildschirmes kann beim Starten des TightVNC-Servers mit dem Parameter -geometry angeben werden. Für eine Auflösung von 1024x768 sieht der Befehl wie folgt aus. tightvncserver -geometry 1024x768
oder z.B. tightvncserver -geometry 1920x1080
TightVNCServer automatisch starten
Damit TightVNC beim Systemstart automatisch gestartet wird, folgenden Befehlsaufruf in die /etc/rc.local eintragen werden.sudo nano /etc/rc.local
Vor der letzten Zeile (exit) folgende Zeile einfügen:su linaro -c "tightvncserver -geometry 1920x1080"
Danach mit:sudo shutdown -r now
nach Neustart testen.
Hinweis: Eingabe um von Full-Mode in den Normal-Mode und umgekehrt umschalten: SHIFT+CTRL+ALT+F
Neuen User (Rechte wie linaro) anlegen-> zurück
http://www.gtkdb.de/index_36_2175.html
Betriebssystem Jessie; Neuen User userx anlegen;
Zu welchen Gruppen linaro gehört kann in der Datei /etc/group gefunden werden;
Mit folgendem Befehl wurden die einzelnen Gruppen direkt angegeben.
sudo useradd -m userx -g 1000 -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,netdev,input
Da es mühselig ist die Gruppen von Hand herauszusuchen und dem Befehl zu übergeben, kann man dies auch wie folgt automatisieren.
sudo useradd -m userx -g 1000 -G $(cat /etc/group | grep linaro | cut -d: -f1 | sed ':a;N;$!ba;s/\n/,/g')
Danach dem Benutzer ein Passwort zuweisen.
sudo passwd userx
Damit der neue Benutzer sudo nutzen kann und dabei nicht ständig das Passwort eingeben muss, wird die Konfigurationsdatei /etc/sudoers angepasst.
Öffnen mit:
sudo visudo
Am Ende der Datei einfügen
userx ALL=(ALL) NOPASSWD: ALL
Samba Server einrichten-> zurück
Following on from previous blog I’ve tried to emulate MrEngmans brilliant concept of providing a single install script that does as much of the work as possible
His idea is to copy a file onto the SD while its plugged into a PC/Mac etc and then put the card into your RPi and issue one simple command
So this is the file
https://dl.dropbox.com/s/wjlshn22z80rzpv/simplesamba.sh
simply copy it to the SD card while its in your PC/Mac and then put it in your RPi and issue this command
sudo /boot/simplesamba.sh
Alternatively (thanks to Jason Powell)
wget https://dl.dropbox.com/s/wjlshn22z80rzpv/simplesamba.sh
and then run
sudo bash simplesamba.sh
Note-some parts of the script can take a bit of time as the Pi needs to download stuff – just answer Y if asked questions BTW:)
When it sits there with New SMB passord: showing , enter raspberry as the password and then repeat it. At the end, you should be able connect to your RPi from windows using username=pi password=raspberry
Folgende Änderungen in /etc/samba/smb.conf :
sudo nano /etc/samba/smb.conf
user pi durch gewünschten "user" ersetzen
Danach Samba password setzen:
sudo smbpasswd -a username
Nach Passworteingabe Neustart des Samba-Servers:
sudo /etc/init.d/samba restart
nach samba installation sudo apt-get install gvfs-backends
sudo apt-get install gvfs-fuse
error: Connection refused linaro@linaro-alip:~$ sudo chmod g+w /var/lib/mpd/music/ /var/lib/mpd/playlists/ linaro@linaro-alip:~$ sudo chgrp audio /var/lib/mpd/music/ /var/lib/mpd/playlists/ linaro@linaro-alip:~$ sudo /etc/init.d/mpd restart [ ok ] Restarting mpd (via systemctl): mpd.service. linaro@linaro-alip:~$ mpc update error: Connection refused linaro@linaro-alip:~$ mpc update error: Connection refused
mpd
mpd Music Player Deamon einrichten-> zurück
https://wiki.archlinux.org/index.php/Music_Player_Daemon https://wiki.ubuntuusers.de/.asoundrc/
PulseAudio wurde entfernt, ob notwendig wurde nicht geprüft!
sudo apt-get purge pulseaudio
Schritt 1: Paketliste aktualisieren
sudo apt-get update
Schritt 2: Benötigte Pakete installieren
sudo apt-get install mpd mpc alsa-utils
Schritt : Konfiguration
sudo nano /etc/mpd.conf
Wenn MPD über das Netzwerk betrieben werden soll, ist es zwingend notwendig folgende Zeile auszukommentieren.
bind_to_address
#bind_to_address
Output anpassen
audio_output { type "alsa" name "My ALSA Device" # device "hw:0,0" # optional # device "hw:1,0" # optional (hdmi ok) device "hw:0,2" # optional (Buchse ok) mixer_type "software" # optional mixer_device "default" # optional # mixer_control "PCM" # optional # mixer_index "0" # optional }
speichern und schließen
Im Terminal eingeben
alsamixer
Headphone1 Grundlautstärke einstellen
Folgende Datei wurde erstellt:
sudo nano /etc/asound.conf
Inhalt:
pcm.snd_card { type hw card 1 device 0 } ctl.snd_card { type hw card 1 device 0 }
http://mpd.wikia.com/wiki/Clients gmpc mit synatic installiert
How to install wiringPi-> zurück
How to install wiringPi
The easiest way is to use the supplied 'build' script:
./build
that should do a complete install or upgrade of wiringPi for you.
That will install a dynamic library.
Some distributions do not have /usr/local/lib in the default LD_LIBRARY_PATH. To fix this, you need to edit /etc/ld.so.conf and add in a single line:
/usr/local/lib
then run the ldconfig command.
sudo ldconfig
If you want to install a static library, you may need to do this manually:
cd wiringPi make static
To un-install wiringPi:
./build uninstall
Gordon Henderson
projects@drogon.net https://projects.drogon.net/
Nach der Installation Test mit:
gpio readall
Ausgabe:
+-----+-----+---------+------+---+--Tinker--+---+------+---------+-----+-----+ | CPU | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | CPU | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 252 | 8 | SDA.1 | | 1 | 3 || 4 | | | 5V | | | | 253 | 9 | SCL.1 | | 1 | 5 || 6 | | | 0v | | | | 17 | 7 | GPIO0C1 | OUT | 1 | 7 || 8 | 1 | SERL | TxD1 | 15 | 161 | | | | 0v | | | 9 || 10 | 1 | SERL | RxD1 | 16 | 160 | | 164 | 0 | GPIO5B4 | SERL | 1 | 11 || 12 | 0 | | GPIO6A0 | 1 | 184 | | 166 | 2 | GPIO5B6 | IN | 0 | 13 || 14 | | | 0v | | | | 167 | 3 | GPIO5B7 | IN | 1 | 15 || 16 | 1 | IN | GPIO5B2 | 4 | 162 | | | | 3.3v | | | 17 || 18 | 1 | IN | GPIO5B3 | 5 | 163 | | 257 | 12 | MOSI1 | | 0 | 19 || 20 | | | 0v | | | | 256 | 13 | MISO1 | | 1 | 21 || 22 | 0 | IN | GPIO5C3 | 6 | 171 | | 254 | 14 | SCLK1 | | 1 | 23 || 24 | 1 | | CE0 | 10 | 255 | | | | 0v | | | 25 || 26 | 1 | | CE1 | 11 | 251 | | 233 | 30 | SDA.2 | OUT | 1 | 27 || 28 | 1 | | SCL.2 | 31 | 234 | | 165 | 21 | GPIO5B5 | SERL | 1 | 29 || 30 | | | 0v | | | | 168 | 22 | GPIO5C0 | IN | 1 | 31 || 32 | 1 | PWM | GPIO7C7 | 26 | 239 | | 238 | 23 | GPIO7C6 | PWM | 1 | 33 || 34 | | | 0v | | | | 185 | 24 | GPIO6A1 | | 0 | 35 || 36 | 1 | SERL | GPIO7A7 | 27 | 223 | | 224 | 25 | GPIO7B0 | SERL | 1 | 37 || 38 | 0 | | GPIO6A3 | 28 | 187 | | | | 0v | | | 39 || 40 | 0 | | GPIO6A4 | 29 | 188 | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | CPU | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | CPU | +-----+-----+---------+------+---+--Tinker--+---+------+---------+-----+-----+
Übersicht shell-Befehle
http://wiringpi.com/the-gpio-utility/
Standard input and output commands
gpio mode <pin> in/out/pwm/clock/up/down/tri
Examples
gpio mode 0 out gpio write 0 1 The above uses the wiringPi pin numbers to set pin 0 as an output and then sets the pin to a logic 1. gpio -g mode 17 out gpio -g write 17 1 This uses the BCM_GPIO pin numbering scheme and performs the same operation as above. gpio -1 mode 11 out gpio -1 write 11 1 This uses the physical P1 pin numbering scheme and performs the same operation as above.
Python-> zurück
https://www.asus.com/de/Single-Board-Computer/Tinker-Board/ https://wiki.ubuntuusers.de/Python/ https://wiki.ubuntuusers.de/Entwicklungsumgebungen/ https://wiki.ubuntuusers.de/Entwicklungsumgebungen/#idle
sudo apt-get install python3
sudo apt-get install idle
zusatz
linaro@linaro-alip:~$ sudo pip install RPi.GPIO
Requirement already satisfied (use --upgrade to upgrade): RPi.GPIO in /usr/local/lib/python2.7/dist-packages Cleaning up...
ic2 https://www.pi4iot.com/doku.php?id=components:i2c