I'm running z-way-server on a Raspberry Pi 4b bookworm. My controller is a RaZberry 7 Pro. US. The serial port is set to /dev/ttyAMA0. I've checked all of my location settings on the Pi and the Time zone in the z-way server settings. All are correct there. When connected to the web interface I often must reload the page to get past the error indicating a serial port communications problem but data does get saved. Obviously there is a problem with my serial connection to the controller. I purchased another RaZberry 7 pro on the chance that I had damaged the original one but they both seem to have the same problem. In expert mode the reset API action always results in the error "Unable to update data. SerialAPISoftReset()". I have tried several power supplies on the Pi4. Same response. I have rebuilt the server a couple of times with the same end result.
Can anyone point me to a possible solution or suggest where else to look?
Thanks very much. full z-way-server.log following a re-boot is attached
[2023-12-03 11:40:22.711] [D] [zway] Opened device: /dev/ttyAMA0
[2023-12-03 11:40:22.711] [i/o] Setting port speed to 115200
[2023-12-03 11:40:22.712] [D] [zway] Worker thread successfully created
[2023-12-03 11:40:22.712] [D] [zway] Worker thread entry point
[2023-12-03 11:40:22.712] [zway] Adding job: Get controller info and supported function classes
[2023-12-03 11:40:22.722] [D] [zway] SENDING: ( 01 03 00 07 FB )
[2023-12-03 11:40:22.725] [D] [zway] RECEIVED ACK
[2023-12-03 11:40:22.725] [D] [zway] RECEIVED: ( 01 01 01 )
[2023-12-03 11:40:22.725] [D] [zway] Wrong checksum
[2023-12-03 11:40:22.725] [D] [zway] SENT NAK
[2023-12-03 11:40:22.725] [E] [zway] RECEIVED UNKNOWN PACKET TYPE: 0xfe
[2023-12-03 11:40:22.725] [C] [i/o] Serial port has gone: (null)
[2023-12-03 11:40:22.725] [E] [zway] Device processing interrupted
[2023-12-03 11:40:22.725] [D] [zway] Worker thread exit point
[2023-12-03 11:40:22.732] [D] [zway] Worker thread successfully finished
[2023-12-03 11:40:22.733] [D] [i/o] Closing port
[2023-12-03 11:40:22.743] [zway] SaveData will not save data since it wasn't loaded. This is to prevent data loss.
[2023-12-03 11:40:22.744] [C] [zway] Get Serial API Capabilities returned zero.
[2023-12-03 11:40:22.749] [core] Error: Bad data - communication failed
RaZberry 7 Pro serial problem RPI4b bookworm
-
- Posts: 6
- Joined: 20 Dec 2021 17:56
RaZberry 7 Pro serial problem RPI4b bookworm
- Attachments
-
- z-way-server.log.zip
- (27.23 KiB) Downloaded 825 times
Re: RaZberry 7 Pro serial problem RPI4b bookworm
What does the end of the Pi configuration look like?
/boot/config.txt
/boot/config.txt
-
- Posts: 6
- Joined: 20 Dec 2021 17:56
Re: RaZberry 7 Pro serial problem RPI4b bookworm
Hmm. Must have hit the wrong button. If this is a duplicate reply, my apologies..
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
dtoverlay=miniuart-bt
dtoverlay=disable-bt
dtoverlay=disable-wifi
dtparam=sd_poll_once=on
dtoverlay=pi3-miniuart-bt
~
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
dtoverlay=miniuart-bt
dtoverlay=disable-bt
dtoverlay=disable-wifi
dtparam=sd_poll_once=on
dtoverlay=pi3-miniuart-bt
~
-
- Posts: 6
- Joined: 20 Dec 2021 17:56
Re: RaZberry 7 Pro serial problem RPI4b bookworm
FYI - I'm not sure why the seemingly conflicting bluetooth settings but I've spent a lot of time trying to get an HDMI output that would work with a KVM I use. This Pi4 B is in an Argon One M.2 case and I boot from an internal 500 GB SATA SSD. I've checked the power and that all seems fine. I'm confident that the RaZberry 7 Pro is connected to the GPIO pins of the Argon case correctly but if I don't get anywhere with the RaZberry controller my next step will be to remove the Pi from the Argon case and attach the controller directly to the GPIOs of the Pi board and re-configure my boot drive into an external case. I have 4 other Pi4s working well that way.
-
- Posts: 6
- Joined: 20 Dec 2021 17:56
Re: RaZberry 7 Pro serial problem RPI4b bookworm
Thanks for responding lanbrown
Re: RaZberry 7 Pro serial problem RPI4b bookworm
HI,
try to modify the config.txt (at f=/boot/firmware/config.txt ) :
If it does not help use raspi-config to disable the not needed options.
Michael
try to modify the config.txt (at f=/boot/firmware/config.txt ) :
Code: Select all
...
[all]
dtoverlay=pi3-disable-bt
enable_uart=1
Michael
-
- Posts: 6
- Joined: 20 Dec 2021 17:56
Re: RaZberry 7 Pro serial problem RPI4b bookworm
It Works!
sudo lsof -n | grep AMA0
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
Output information may be incomplete.
z-way-ser 728 root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 825 Optimizin root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 826 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 827 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 828 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 829 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 880 zway/core root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 929 zway/webs root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 972 zway/time root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 981 zway/dev/ root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 1001 zway/core root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 1002 zway/home root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
Partial tail of z-way-server.log:
[2023-12-07 16:59:09.551] [D] [zway] SENDING: ( 01 03 00 3B C7 )
[2023-12-07 16:59:09.552] [D] [zway] RECEIVED ACK
[2023-12-07 16:59:09.553] [D] [zway] RECEIVED: ( 01 07 01 3B AB A5 A5 7F 16 )
[2023-12-07 16:59:09.554] [D] [zway] SENT ACK
[2023-12-07 16:59:09.554] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel1 = 171 (0x000000ab)
[2023-12-07 16:59:09.554] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel2 = 165 (0x000000a5)
[2023-12-07 16:59:09.554] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel3 = 165 (0x000000a5)
[2023-12-07 16:59:09.554] [zway] Job 0x3b (Get background noise level): RSSI Ch#1: -85 dBm, Ch#2: -91 dBm, Ch#3: -91 dBm
[2023-12-07 16:59:09.554] [D] [zway] Job 0x3b (Get background noise level): success
[2023-12-07 16:59:09.554] [zway] Removing job: Get background noise level
[2023-12-07 16:59:29.689] [D] [zway] Job 0x3b: deleted from queue
[2023-12-07 16:59:39.558] [zway] Adding job: Get background noise level
[2023-12-07 16:59:39.560] [D] [zway] SENDING: ( 01 03 00 3B C7 )
[2023-12-07 16:59:39.561] [D] [zway] RECEIVED ACK
[2023-12-07 16:59:39.563] [D] [zway] RECEIVED: ( 01 07 01 3B AA A5 A5 7F 17 )
[2023-12-07 16:59:39.563] [D] [zway] SENT ACK....
Remove the Pi4b from its Argonone case after cloning the internal M.2 SATA drive to an external USB SATA. Uninstalled the Argone software. The Pi4b now sits on an open air enclosure with a fan and a Dual header on the GPIOs to accommodate the RaZ 7 Pro and the fan leads. External drive is powered by a USB 3.0 hub. The Pi runs cooler outside of the Argon M.2. used your config.txt suggestions although I believe I had found these entries and tried them before but they certainly work. I may have had some odd conflicts due to the Argon case. Can't recommend it for this application. It all worked fine under bullseye but with bookworm and the Wayland stuff, things seem to have changed.
Thanks Michael.
sudo lsof -n | grep AMA0
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
Output information may be incomplete.
z-way-ser 728 root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 825 Optimizin root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 826 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 827 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 828 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 829 v8:Sweepe root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 880 zway/core root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 929 zway/webs root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 972 zway/time root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 981 zway/dev/ root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 1001 zway/core root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
z-way-ser 728 1002 zway/home root 7u CHR 204,64 0t0 135 /dev/ttyAMA0
Partial tail of z-way-server.log:
[2023-12-07 16:59:09.551] [D] [zway] SENDING: ( 01 03 00 3B C7 )
[2023-12-07 16:59:09.552] [D] [zway] RECEIVED ACK
[2023-12-07 16:59:09.553] [D] [zway] RECEIVED: ( 01 07 01 3B AB A5 A5 7F 16 )
[2023-12-07 16:59:09.554] [D] [zway] SENT ACK
[2023-12-07 16:59:09.554] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel1 = 171 (0x000000ab)
[2023-12-07 16:59:09.554] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel2 = 165 (0x000000a5)
[2023-12-07 16:59:09.554] [D] [zway] SETDATA controller.data.statistics.backgroundRSSI.channel3 = 165 (0x000000a5)
[2023-12-07 16:59:09.554] [zway] Job 0x3b (Get background noise level): RSSI Ch#1: -85 dBm, Ch#2: -91 dBm, Ch#3: -91 dBm
[2023-12-07 16:59:09.554] [D] [zway] Job 0x3b (Get background noise level): success
[2023-12-07 16:59:09.554] [zway] Removing job: Get background noise level
[2023-12-07 16:59:29.689] [D] [zway] Job 0x3b: deleted from queue
[2023-12-07 16:59:39.558] [zway] Adding job: Get background noise level
[2023-12-07 16:59:39.560] [D] [zway] SENDING: ( 01 03 00 3B C7 )
[2023-12-07 16:59:39.561] [D] [zway] RECEIVED ACK
[2023-12-07 16:59:39.563] [D] [zway] RECEIVED: ( 01 07 01 3B AA A5 A5 7F 17 )
[2023-12-07 16:59:39.563] [D] [zway] SENT ACK....
Remove the Pi4b from its Argonone case after cloning the internal M.2 SATA drive to an external USB SATA. Uninstalled the Argone software. The Pi4b now sits on an open air enclosure with a fan and a Dual header on the GPIOs to accommodate the RaZ 7 Pro and the fan leads. External drive is powered by a USB 3.0 hub. The Pi runs cooler outside of the Argon M.2. used your config.txt suggestions although I believe I had found these entries and tried them before but they certainly work. I may have had some odd conflicts due to the Argon case. Can't recommend it for this application. It all worked fine under bullseye but with bookworm and the Wayland stuff, things seem to have changed.
Thanks Michael.
Re: RaZberry 7 Pro serial problem RPI4b bookworm
If you really want to have your Pi run cool, get a silicone thermal pad and the Geekworm for Raspberry Pi 4 Armor Case. Put the silicone pad on the top and bottom of the board (you will need to cut to fit) and your Pi will never overheat even if running at 100% CPU load. No fan needed either, all passive cooling.
-
- Posts: 6
- Joined: 20 Dec 2021 17:56
Re: RaZberry 7 Pro serial problem RPI4b bookworm
I will check that out Thanks.