Hallo,
Hardware Raspberry PI 3.
Bislang nutze ich eine relativ alte Version von Smarthome und knxd. Diese funktioniert in der genannten Konstellation problemlos.
Nun habe ich mir Testweise das neue Image von OnkelAndy geladen.
Dann habe ich mir folgende Anleitung gesucht:
Ich sehe im Verzeichnis /dev die Schnittstelle ttyAMA0 mit Root als Owner.
Meine 70-knxd.rules sieht wie folgt aus:
#ACTION=="add", SUBSYSTEM=="tty", ATTRS{id}=="00241011", KERNELS=="3f201000.uart", SYMLINK+="ttyKNX1", OWNER="knxd"
ACTION=="add", SUBSYSTEM=="tty", KERNELS="ttyAMA0", SYMLINK+="knx1", OWNER="knxd"
Die auskommentierte Zeile ist die, die mit dem alten Image funktioniert hat. Laut der Anleitung würde das der USB-TPUART Schnittstelle enstsprechen. Es ist aber eine zum draufstecken auf den PI.
Meine cmdline.txt:
Hier ein Auszug aus der config.txt
[all]
#dtoverlay=vc4-fkms-v3d
# BEGIN ANSIBLE MANAGED BLOCK
hdmi_safe=1
disable_overscan=1
hdmi_force_hotplug=1
#hdmi_drive=2
config_hdmi_boost=4
sdtv_mode=2
#dtoverlay=gpio-ir,gpio_pin=18
#dtoverlay=gpio-ir-tx,gpio_pin=17
enable_uart=1
dtoverlay=pi3-disable-bt
dtoverlay=pi3-miniuart-bt
#dtparam=watchdog=on
# END ANSIBLE MANAGED BLOCK
[smarthome@SmartHomeNG ~]$ sudo journalctl -xn
-- Logs begin at Wed 2020-04-22 21:52:32 CEST, end at Wed 2020-04-22 21:56:21 CEST. --
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 5 [17:B.tpuarts/Conn 0.007] down/error => >down
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 4 [17:B.tpuarts/Conn 0.007] down/error
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 4 [17:B.tpuarts/Conn 0.008] is down
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 2 [19:B.tpuarts/LowF 0.008] Close
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 2 [20:B.tpuarts/TPU_ser 0.009] Close
Apr 22 21:56:16 SmartHomeNG systemd[1]: Started KNX Daemon.
-- Subject: A start job for unit knxd.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit knxd.service has finished successfully.
--
-- The job identifier is 1276.
Apr 22 21:56:16 SmartHomeNG systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit knxd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Apr 22 21:56:16 SmartHomeNG systemd[1]: knxd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit knxd.service has entered the 'failed' state with result 'exit-code'.
Apr 22 21:56:21 SmartHomeNG sudo[743]: smarthome : TTY=pts/0 ; PWD=/home/smarthome ; USER=root ; COMMAND=/bin/journalctl -xn
Apr 22 21:56:21 SmartHomeNG sudo[743]: pam_unix(sudo:session): session opened for user root by (uid=0)
Es wird nach dem Reboot keine "knx1" unter dev angelegt. Auf dem alten Image gab es eine "ttyKNX1" mit knxd als owner. So wie in der Anleitung beschrieben.
Hat jemand eine Idee was ich falsch mache?
Danke schonmal im Voraus.
Gruß
Wolfgang
Hardware Raspberry PI 3.
Bislang nutze ich eine relativ alte Version von Smarthome und knxd. Diese funktioniert in der genannten Konstellation problemlos.
Nun habe ich mir Testweise das neue Image von OnkelAndy geladen.
Dann habe ich mir folgende Anleitung gesucht:
Adding a TPUART serial interface to the Raspberry Pi
On the Raspberry Pi 2 and 3 the console is /dev/ttyAMA0. The udev line is:
ACTION=="add", SUBSYSTEM=="tty", KERNELS="ttyAMA0", SYMLINK+="knx1", OWNER="knxd"
On the Raspberry Pi 4 the console is on /dev/ttyACM0. The udev line is:
ACTION=="add", SUBSYSTEM=="tty", KERNELS=="ttyACM0", SYMLINK+="knx1", OWNER="knxd"
This rule creates a symlink /dev/knx1 which points to the console. The knxd configuration will use that symlink.
On the Raspberry Pi 2 and 3 you need to disable the serial console. Edit /boot/cmdline.txt and remove the console=ttyAMA0 entry. Then reboot.
On the Raspberry Pi 3, the serial console is on ttyAMA1 by default. However, that is a software-driven serial port (the hardware serial interface is used for Bluetooth on the Pi3). Varying CPU speed causes this port to be somewhat unreliable. If this happens, disable bluetooth by adding
dtoverlay=pi3-disable-bt
to /boot/config.txt, run systemctl disable hciuart, and rebooting. The TPUART module is now back on ttyAMA0.
On the Raspberry Pi 2 and 3 the console is /dev/ttyAMA0. The udev line is:
ACTION=="add", SUBSYSTEM=="tty", KERNELS="ttyAMA0", SYMLINK+="knx1", OWNER="knxd"
On the Raspberry Pi 4 the console is on /dev/ttyACM0. The udev line is:
ACTION=="add", SUBSYSTEM=="tty", KERNELS=="ttyACM0", SYMLINK+="knx1", OWNER="knxd"
This rule creates a symlink /dev/knx1 which points to the console. The knxd configuration will use that symlink.
On the Raspberry Pi 2 and 3 you need to disable the serial console. Edit /boot/cmdline.txt and remove the console=ttyAMA0 entry. Then reboot.
On the Raspberry Pi 3, the serial console is on ttyAMA1 by default. However, that is a software-driven serial port (the hardware serial interface is used for Bluetooth on the Pi3). Varying CPU speed causes this port to be somewhat unreliable. If this happens, disable bluetooth by adding
dtoverlay=pi3-disable-bt
to /boot/config.txt, run systemctl disable hciuart, and rebooting. The TPUART module is now back on ttyAMA0.
Meine 70-knxd.rules sieht wie folgt aus:
#ACTION=="add", SUBSYSTEM=="tty", ATTRS{id}=="00241011", KERNELS=="3f201000.uart", SYMLINK+="ttyKNX1", OWNER="knxd"
ACTION=="add", SUBSYSTEM=="tty", KERNELS="ttyAMA0", SYMLINK+="knx1", OWNER="knxd"
Die auskommentierte Zeile ist die, die mit dem alten Image funktioniert hat. Laut der Anleitung würde das der USB-TPUART Schnittstelle enstsprechen. Es ist aber eine zum draufstecken auf den PI.
Meine cmdline.txt:
root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait rootdelay=5 consoleblank=0 cgroup_memory=1 cgroup_enable=memory
[all]
#dtoverlay=vc4-fkms-v3d
# BEGIN ANSIBLE MANAGED BLOCK
hdmi_safe=1
disable_overscan=1
hdmi_force_hotplug=1
#hdmi_drive=2
config_hdmi_boost=4
sdtv_mode=2
#dtoverlay=gpio-ir,gpio_pin=18
#dtoverlay=gpio-ir-tx,gpio_pin=17
enable_uart=1
dtoverlay=pi3-disable-bt
dtoverlay=pi3-miniuart-bt
#dtparam=watchdog=on
# END ANSIBLE MANAGED BLOCK
[smarthome@SmartHomeNG ~]$ sudo journalctl -xn
-- Logs begin at Wed 2020-04-22 21:52:32 CEST, end at Wed 2020-04-22 21:56:21 CEST. --
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 5 [17:B.tpuarts/Conn 0.007] down/error => >down
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 4 [17:B.tpuarts/Conn 0.007] down/error
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 4 [17:B.tpuarts/Conn 0.008] is down
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 2 [19:B.tpuarts/LowF 0.008] Close
Apr 22 21:56:16 SmartHomeNG knxd[741]: Layer 2 [20:B.tpuarts/TPU_ser 0.009] Close
Apr 22 21:56:16 SmartHomeNG systemd[1]: Started KNX Daemon.
-- Subject: A start job for unit knxd.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit knxd.service has finished successfully.
--
-- The job identifier is 1276.
Apr 22 21:56:16 SmartHomeNG systemd[1]: knxd.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit knxd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Apr 22 21:56:16 SmartHomeNG systemd[1]: knxd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit knxd.service has entered the 'failed' state with result 'exit-code'.
Apr 22 21:56:21 SmartHomeNG sudo[743]: smarthome : TTY=pts/0 ; PWD=/home/smarthome ; USER=root ; COMMAND=/bin/journalctl -xn
Apr 22 21:56:21 SmartHomeNG sudo[743]: pam_unix(sudo:session): session opened for user root by (uid=0)
Es wird nach dem Reboot keine "knx1" unter dev angelegt. Auf dem alten Image gab es eine "ttyKNX1" mit knxd als owner. So wie in der Anleitung beschrieben.
Hat jemand eine Idee was ich falsch mache?
Danke schonmal im Voraus.
Gruß
Wolfgang
Kommentar