[Solved] Z-Wave: Protocol error (OOF) [Serial/COM-Port in virtualization]

Hi there, hi @chris,

i have a question regarding z-wave. I switched my original Debian 8 NUC to another NUC where i virtualized Debian 8 again. Everything worked like before, but some WARNINGS i didn’t have in the past.
It looks something like:

2017-06-12 06:33:33.039 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x1F.
2017-06-12 06:33:33.039 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x00.
2017-06-12 06:33:33.039 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x04.
2017-06-12 06:33:33.039 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x00.
2017-06-12 06:33:33.040 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x19.
2017-06-12 06:33:33.040 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x8F.
2017-06-12 06:33:33.041 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x04.
2017-06-12 06:33:33.041 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x30.
2017-06-12 06:33:33.042 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x03.
2017-06-12 06:33:33.042 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0xFF.
2017-06-12 06:33:33.043 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x0C.
2017-06-12 06:33:33.043 [WARN ] [WaveSerialHandler$ZWaveReceiveThread] - Protocol error (OOF). Got 0x05.

I created a z-wave debug log as well over a longer period and it would be great if some expert could have a look at it. I have the feeling, the network isn’t that much reliable it was before, but this can also be caused by some devices, with low batteries right now…

I also checked the debug log with the log viewer from chris’ webpage but couldn’t see anything worse. Where can i upload that logfile?

Many thanks and regards,
Stef

These probably indicate that there are bytes being missed in the serial receiver… IF you only see these on startup, then it’s fine. If it happens throughout the log, then it probably indicates something strange with serial ports is happening.

Thanks for the fast reply - It is not only on startup. So you think it’s the “passthrough” of the USB-Serial port through KVM virtualizaton?
Hm!

Yes, this is the most common reason for this sort of problems - it quite often causes problems.

The protocol will resynchronise, but ultimately it means you’re missing frames so the system is not 100% reliable. This will either cause you to miss notifications, or increase delays due to timeouts…

are there any solutions you know (i’m not familiar which settings i have at all) using serial devices in virtual machines in that cases or do you suggest running that zwave dongle on a “real” machine?

I don’t personally know of any, but that definitely doesn’t mean there aren’t systems that work fine. Strangely people mostly write messages when things don’t work, so I know plenty of people have problems, but it’s less common for people to post when things work fine ;).

I’d suggest to change the title of this message to add something like COM port over IP, or COM port virtualisation or something and maybe someone who has a working system will comment.

1 Like

I have another question: It seems like i only get theese protocol errors if a specific device of mine receives or sends defined updates.

What do i mean? I only get these protocol errors if someone in the flat is moving, while we are sleeping, there are no protocol errors. Exeption: Shortly after network heal 4AM.

If i were right, how can a “serial controller problem” only affect one device? (Guess: Zipato Multisensor Quad)

It can’t. The SOO is an error on the serial port and should not be related to any specific device. If it really is only one device, then I don’t know what could cause this. Given you’re using some sort of virtualisation or IP streaming or something, I’d suggest that maybe something else happens at the same time to disrupt this link?

i’m not sure right now, if it really is only one device. But what is sure is, that this error pops up frequently if someone moves in the corridor (someone leaves or arrives in the flat). One could say that there are more messages on the z-wave network, but okay, i think that shouldn’t be an issue, but who knows.

i will keep an eye of that and eventually power down that suspicious device for validation, but i don’t get the point how all this should only disturb the virtual com port at these times.

technical background how i assigned the host usb z-wave device to the guest can be seen here, but it’s not via IP or something:
http://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest

I’m using vmware ESXI 6.5 (running OH2 on a debian 8 virtual install) and everything has been working fine for a couple of months now…
(The only thing I had to fix was a new USB driver that had to be disabled)

could you please post a “lsusb” and a “dmesg |grep acm” from your guest?

im running openhab on ubuntu 17.04 as guest on qnap virtualization station, usb passthrough is running fine here, no issues (ZME_UZB1) Controller.

same question here, could you please post a “lsusb” and a “dmesg |grep acm” from your guest?

 lsusb
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 0658:0200 Sigma Designs, Inc.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg |grep acm
[    8.776955] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[    8.780239] usbcore: registered new interface driver cdc_acm
[    8.780241] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[57963.181273] cdc_acm 2-2:1.1: urb 12 failed submission with -19
[57963.201258] cdc_acm 2-2:1.1: urb 13 failed submission with -19
[59900.179164] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

looks exactely the same in my guest system…

this thread doesn’t bolster myself for finding a solution, but there is still the guess that this is all caused by the same device…

Crazy stuff… and i thought i was late moving my openhab installation to a VM…

okay, i think i found the solution myself:

there is a “usb mode” option in the virt-manager. For any reason i changed that while i created the VM to “USB2”. I switched it back to “hypervisor standard” and got a different virtual usb hub. With this hub it seems like my errors are gone, at least i didn’t have one since then right now.

Thanks to anybody!
stef