Raspberry Pi 4, Razberry 2 and Cannot start Z-Wave binding: Error: Invalid port

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
Tom01
Posts: 8
Joined: 31 Jan 2020 02:45

Raspberry Pi 4, Razberry 2 and Cannot start Z-Wave binding: Error: Invalid port

Post by Tom01 »

Code: Select all

tom@zway:~ $ sudo  ls -l /dev/tty*
crw-rw-rw- 1 root tty  5,  0 May 10 11:17 /dev/tty
crw--w---- 1 root tty  4,  0 May 10 11:17 /dev/tty0
crw------- 1 tom  tty  4,  1 May 10 11:52 /dev/tty1
crw--w---- 1 root tty  4, 10 May 10 11:17 /dev/tty10
crw--w---- 1 root tty  4, 11 May 10 11:17 /dev/tty11
crw--w---- 1 root tty  4, 12 May 10 11:17 /dev/tty12
crw--w---- 1 root tty  4, 13 May 10 11:17 /dev/tty13
crw--w---- 1 root tty  4, 14 May 10 11:17 /dev/tty14
crw--w---- 1 root tty  4, 15 May 10 11:17 /dev/tty15
crw--w---- 1 root tty  4, 16 May 10 11:17 /dev/tty16
crw--w---- 1 root tty  4, 17 May 10 11:17 /dev/tty17
crw--w---- 1 root tty  4, 18 May 10 11:17 /dev/tty18
crw--w---- 1 root tty  4, 19 May 10 11:17 /dev/tty19
crw--w---- 1 root tty  4,  2 May 10 11:17 /dev/tty2
crw--w---- 1 root tty  4, 20 May 10 11:17 /dev/tty20
crw--w---- 1 root tty  4, 21 May 10 11:17 /dev/tty21
crw--w---- 1 root tty  4, 22 May 10 11:17 /dev/tty22
crw--w---- 1 root tty  4, 23 May 10 11:17 /dev/tty23
crw--w---- 1 root tty  4, 24 May 10 11:17 /dev/tty24
crw--w---- 1 root tty  4, 25 May 10 11:17 /dev/tty25
crw--w---- 1 root tty  4, 26 May 10 11:17 /dev/tty26
crw--w---- 1 root tty  4, 27 May 10 11:17 /dev/tty27
crw--w---- 1 root tty  4, 28 May 10 11:17 /dev/tty28
crw--w---- 1 root tty  4, 29 May 10 11:17 /dev/tty29
crw--w---- 1 root tty  4,  3 May 10 11:17 /dev/tty3
crw--w---- 1 root tty  4, 30 May 10 11:17 /dev/tty30
crw--w---- 1 root tty  4, 31 May 10 11:17 /dev/tty31
crw--w---- 1 root tty  4, 32 May 10 11:17 /dev/tty32
crw--w---- 1 root tty  4, 33 May 10 11:17 /dev/tty33
crw--w---- 1 root tty  4, 34 May 10 11:17 /dev/tty34
crw--w---- 1 root tty  4, 35 May 10 11:17 /dev/tty35
crw--w---- 1 root tty  4, 36 May 10 11:17 /dev/tty36
crw--w---- 1 root tty  4, 37 May 10 11:17 /dev/tty37
crw--w---- 1 root tty  4, 38 May 10 11:17 /dev/tty38
crw--w---- 1 root tty  4, 39 May 10 11:17 /dev/tty39
crw--w---- 1 root tty  4,  4 May 10 11:17 /dev/tty4
crw--w---- 1 root tty  4, 40 May 10 11:17 /dev/tty40
crw--w---- 1 root tty  4, 41 May 10 11:17 /dev/tty41
crw--w---- 1 root tty  4, 42 May 10 11:17 /dev/tty42
crw--w---- 1 root tty  4, 43 May 10 11:17 /dev/tty43
crw--w---- 1 root tty  4, 44 May 10 11:17 /dev/tty44
crw--w---- 1 root tty  4, 45 May 10 11:17 /dev/tty45
crw--w---- 1 root tty  4, 46 May 10 11:17 /dev/tty46
crw--w---- 1 root tty  4, 47 May 10 11:17 /dev/tty47
crw--w---- 1 root tty  4, 48 May 10 11:17 /dev/tty48
crw--w---- 1 root tty  4, 49 May 10 11:17 /dev/tty49
crw--w---- 1 root tty  4,  5 May 10 11:17 /dev/tty5
crw--w---- 1 root tty  4, 50 May 10 11:17 /dev/tty50
crw--w---- 1 root tty  4, 51 May 10 11:17 /dev/tty51
crw--w---- 1 root tty  4, 52 May 10 11:17 /dev/tty52
crw--w---- 1 root tty  4, 53 May 10 11:17 /dev/tty53
crw--w---- 1 root tty  4, 54 May 10 11:17 /dev/tty54
crw--w---- 1 root tty  4, 55 May 10 11:17 /dev/tty55
crw--w---- 1 root tty  4, 56 May 10 11:17 /dev/tty56
crw--w---- 1 root tty  4, 57 May 10 11:17 /dev/tty57
crw--w---- 1 root tty  4, 58 May 10 11:17 /dev/tty58
crw--w---- 1 root tty  4, 59 May 10 11:17 /dev/tty59
crw--w---- 1 root tty  4,  6 May 10 11:17 /dev/tty6
crw--w---- 1 root tty  4, 60 May 10 11:17 /dev/tty60
crw--w---- 1 root tty  4, 61 May 10 11:17 /dev/tty61
crw--w---- 1 root tty  4, 62 May 10 11:17 /dev/tty62
crw--w---- 1 root tty  4, 63 May 10 11:17 /dev/tty63
crw--w---- 1 tom  tty  4,  7 May 10 11:52 /dev/tty7
crw--w---- 1 root tty  4,  8 May 10 11:17 /dev/tty8
crw--w---- 1 root tty  4,  9 May 10 11:17 /dev/tty9
crw------- 1 root root 5,  3 May 10 11:17 /dev/ttyprintk
Any ideas?

System is fresh, original for RP4B.
lanbrown
Posts: 306
Joined: 01 Jun 2021 08:06

Re: Raspberry Pi 4, Razberry 2 and Cannot start Z-Wave binding: Error: Invalid port

Post by lanbrown »

Search for dtoverlay as that is what you're missing from the config.
seattleneil
Posts: 175
Joined: 02 Mar 2020 22:41

Re: Raspberry Pi 4, Razberry 2 and Cannot start Z-Wave binding: Error: Invalid port

Post by seattleneil »

It looks like problems with serial port /dev/ttyAMA0 are being reported by multiple users. From my experience with bookworm OS, Z-Way's installation script (called RaspbianInstall) needs to be updated. Here are the issues I've encountered with the installation script for the 32-bit lite version of bookworm on a Pi 4:
1. /boot/config.txt is incorrectly updated
2. serial-getty@ttyAMA0.service needs to be stopped and masked

Here's how I was able to solve the serial port problem.
1. Update file /boot/firmware/config.txt by appending the following lines to the end of the file (after the [all] line). Note that I don't use bluetooth on the Pi, so I disable bluetooth. If you use bluetooth, uncomment the miniuart-bt line and comment out the disable-bt line.
#dtoverlay=miniuart-bt
dtoverlay=disable-bt
# enable uart
enable_uart=1

2. Install lsof since this app will be used to confirm ttyAMA0 port status
apt install lsof

3. Reboot the Pi to use the new config file

4. Disable the getty service that uses the ttyAMA0 port
systemctl disable serial-getty@ttyAMA0.service
systemctl stop serial-getty@ttyAMA0.service
systemctl mask serial-getty@ttyAMA0.service

5. Confirm the ttyAMA0 port is not being used - no output should appear since the ttyAMA0 port should not be in use. If you've already installed Z-Way, then restart z-way-server and skip to step 7.
lsof | grep ttyAMA0

6. Install Z-Way
wget -qO - https://storage.z-wave.me/RaspbianInstall | sudo bash

7. For completeness, check the Z-Way log file /var/log/z-way-server.log to confirm the serial port is working. You can also re-run the "lsof | grep ttyAMA0" command to see the z-way process (and its threads) has opened /dev/ttyAMA0.
Post Reply