Ich versuche für einen RDM6300 RFID Reader momentan schon stundenlang eine Verbindung mit meinem Pi3 herzustellen.
Ein simples pyton Skript, was wie folgt anfängt
import serial
import sys
import time
from operator import xor
# UART
ID = ""
Zeichen = 0
Checksumme = 0
Tag = 0
# Flags
Startflag = "\x02"
Endflag = "\x03"
# UART oeffnen
UART = serial.Serial("/dev/ttyAMA0", 9600)
UART.open()
Display More
meldet mir aber nach Ausführung aber nur
Traceback (most recent call last):
File "rfid.py", line 19, in <module>
UART.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 271, in open
raise SerialException("Port is already open.")
serial.serialutil.SerialException: Port is already open.
Was ich zum Ändern des UART gemacht habe:
[font="monospace, Courier"]sudo raspi-config[/font]
[font="monospace, Courier"][font="monospace, Courier"]Serial auf enabled setzen[/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]sudo nano /boot/cmdline.txt[/font][/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]console=serial0,115200 entfernt[/font][/font][/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]sudo apt-get update
sudo apt-get upgrade[/font][/font][/font][/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]sudo apt-get install rpi-update
[/font][/font][/font][/font][/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]sudo rpi-update
sudo reboot[/font][/font][/font][/font][/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]sudo nano /boot/config.txt[/font][/font][/font][/font][/font][/font][/font]
[font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"][font="monospace, Courier"]dtoverlay=pi3-miniuart-bt
enable_uart=1
force_turbo=1[/font][/font][/font][/font][/font][/font][/font]
Wer blockiert mir da denn nun aber noch den ttyAMA0 und hindert mich am Auslesen meiner RFID Daten?
Jemand noch Ideen, was ich vergessen, oder falsch eingestellt habe?