Showing Posts From
Uart
- 22 Apr, 2017
- 1 min read
Enable UART Port on Raspberry Pi
By standard the UART interface is configured as serial console. If you want to use the UART interface for other things, e.g. for a GPS module, the standard function needs to be deactivated. Open the cmdline.txt file with the Nano text editor. sudo nano /boot/cmdline.txt and remove the following part from the file. console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 The content of the file should look like this dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait Exit the editor with ctrl+x and save the changes using y.Open inittab sudo nano /etc/inittab and search for the following line. T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Insert a # at the beginning of the line to comment this line. Doing so the line should look like this. #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Exit the editor the same ways as in the previous step.From Kernel 3.18.x on the following step must be excecuted aditionally. sudo nano /boot/config.txt Search for the following line and remove the # at the beginning of the line. #dtparam=spi=on Exit the editor the same ways as in the previous step. Show kernel version uname -aRestart RPI. sudo reboot
- 10 Jun, 2015
- 1 Min. Lesezeit
UART Schnittstelle am Raspberry Pi aktiveren/nutzen
Standardmäßig ist die UART Schnittstelle als serielle Konsole konfiguriert. Wenn man die UART Schnittstelle für andere Dinge verwenden will, wie zum Beispiel für ein GPS Modul muss diese Funktion deaktiviert werden. Öffne die cmdline.txt Datei mit dem Nano Text Editor sudo nano /boot/cmdline.txt und entferne diesen Teile aus der Datei. console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 Der Inhalt der Datei sollte dann so aussehen dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait Beende den Editor mit ctrl+x und dann die Veränderung mit y speichern.Öffne inittab sudo nano /etc/inittab und such nach folgender Zeile. T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Füge ein # an den Anfang der Zeile um diese Auszukommentieren. Die Zeile sollte dann so aussehen. #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Beende den Editor wie im vorherigen Schritt.Ab Kernel 3.18.x muss dieser Schritt noch zusätzlich ausgeführt werden. sudo nano /boot/config.txt Suche nach folgender Zeile und entferne das # am Anfang. #dtparam=spi=on Beende den Editor wie in den vorherigen Schritten. Kernel Version anzeigen uname -aStarte den RPI neu. sudo reboot