Page 1 of 1

Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Mon Jul 08, 2019 8:32 am
by kfx
Hi everyone,
I have brand new Raspberry Pi 4 4GB, installed fresh Raspbian (twice to test).

After inserting into any USB port an Aeotec Z-Wave USB Stick Gen5, nothing - completely nothing happened in dmesg.

Just like nothing have been inserted, but stick gets powered on. Of course any other device (keyboard, pendrive, card reader) have been showed in dmesg properly, that device is detected, or unplugged. Z-Wave Stick - no. That stick works properly on Raspberry Pi 2B, dmesg shows messages, on Windows 10 on PC also worked properly, so everything is ok with it.

Is Raspbian missing something? Some firmware?

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Mon Jul 08, 2019 11:14 am
by jdb
This is a known issue. The device is doing something odd which causes it to get probed as a USB3.0 device, despite there only being D+ and D- in the connector.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Mon Jul 08, 2019 11:18 am
by kfx
I can't find anywhere informations about that stick and RPi4 problems. On RPi2 works like a charm, but on RPi4 no activity is even showed in dmesg. No matter if inserted into USB2.0 / USB3.0 connector.

What is the solution? Maybe using some USB hub? Firmware change?

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Tue Jul 09, 2019 10:00 am
by kfx
Anyone knows, what can be done? Latest vl805_update_0137a8 firmware and apt update+upgrade doesn't help - no activity at all in dmesg.
After connecting USB hub, it have been detected properly, but connected stick generates dmesg log:

Code: Select all

device not accepting address **, error -22
but doesn't work.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Tue Jul 09, 2019 10:32 am
by jdb
Is the hub a USB3.0 or USB2.0 hub?

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Tue Jul 09, 2019 10:48 am
by kfx
I've specially bought 2.0 to force any problems with 3.0 connection, as you mentioned before.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Wed Jul 10, 2019 10:39 am
by kfx
Is there a possibility, that some firmware/software need to be updated?

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Thu Jul 11, 2019 11:28 pm
by knu
Hi,
I have the same problem with a PI 4/2GB. Every usb-device is working properly, The Aeotec Z-Wave Stick not. Nothing happens in dmesg.
With a PI3B+ everything works like it should, with the same SD-card ...
I have no idea what I can do to solve this problem.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Wed Jul 17, 2019 11:06 am
by jdb
This device has some very non-compliant behaviours.

- On initial connect, it pulls D+ to +5V through a strong pull-up. After 20ms, the pull strength drops which results in D+ dropping to about 4.1V. This is a gross violation of the USB electrical spec.

- If I plug this device into either the Pi 4 or a USB3.0 hub with VIA chipset, the 20ms pull to 5V appears to trigger some sort of protection within the upstream port - both D+ and D- lines end up at >3.3V (SE1) and a device attach does not occur. Plugging a different device into the same port results in an attach event, so it appears the behaviour is temporary.

I can get it into a state where the device does actually attach, by forcing D- to 0V temporarily. In this state, the D- line floats up to 3v3 after every packet so it looks like the upstream port 10k pull-down resistor(s) aren't enabled.

My opinion is that it's not a fault of the USB chip to refuse to talk to a device that could potentially fry the port logic.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Jul 20, 2019 6:03 pm
by lbx
@jdb
Thanks for all the investigation you have done on this issue.

The Aeotec Z-Stick is a very popular Z-Stick controller used by people with home automation setups. I would expect a lot of folks wanting to upgrade to the Pi 4 and so this problem will keep coming up.

This Z-Stick is suggested in the official documentation for home-assistant:
https://www.home-assistant.io/docs/z-wave/controllers/
and probably the most used one.
My opinion is that it's not a fault of the USB chip to refuse to talk to a device that could potentially fry the port logic.
Got it. I understand the device is violating USB specs, but I wonder if there is any workaround you can suggest / think of to folks still interested in using it -- unfortunately there aren't a lot of other good alternatives in the market and I think lots of folks will want to use this with the Pi 4.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Jul 20, 2019 8:40 pm
by jdb
Plug the z-wave adapter into a USB2.0 hub that doesn't care that its downstream D+ input is being pulled to +5V, and plug the hub into the Pi. Failing that, petition the company that designed the hardware to release a version that actually complies with the USB specification.

I note that the no USB logos appear anywhere on the packaging or in the instruction leaflet supplied with the device. Compliance testing programs exists for a reason - it catches basic design mistakes like these.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sun Jul 21, 2019 2:25 am
by lbx
Thank you! I will try the USB 2 hub hack and see if I can find one that works for this purpose.

At the same time, I'll make sure to let the company know so hopefully their next release will be done with better compliance testing. Thanks again for all the investigation over here.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Tue Jul 23, 2019 10:35 pm
by kendaop
I just wanted to report that the USB hub trick worked for me. I used this hub, which cost me about $4.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Tue Jul 23, 2019 10:37 pm
by kendaop
Just out of curiosity, does anyone have any idea why the RPi3 doesn't have this issue as well?

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Wed Jul 24, 2019 9:01 am
by jamesh
kendaop wrote:
Tue Jul 23, 2019 10:37 pm
Just out of curiosity, does anyone have any idea why the RPi3 doesn't have this issue as well?
Completely different USB controller.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Jul 27, 2019 1:41 pm
by dallen
I am very interested in this thread as I too use the Aeotec Z-Wave USB Stick Gen5 with HomeAssistant to control my home automation and am experiencing the issue described in previous posts.
kendaop wrote:
Tue Jul 23, 2019 10:35 pm
I just wanted to report that the USB hub trick worked for me. I used this hub, which cost me about $4.
I purchased the above and am having trouble getting consistent working results. I did eventually get it to work, but the pi suddenly stopped detecting the Aeotec Z-Wave USB Stick Gen5 for some reason. I don't know if it overheated causing it or if it was due to the voltage issue described by jdb (who is obviously very knowledgeable). jdb, your help and insight into the topic is much appreciated and I completely understand your frustration with the non-compliant device. There is no excuse for developing devices that do not adhere to USB standards; however, unfortunately, we appear to be stuck with this misbehaving device since there appears to be no better alternative. Is it possible for jdb to suggest a workaround that will function consistently. Again, I want to thank you for your time and attention.

Kind regards,
dallen

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Jul 27, 2019 2:08 pm
by davidcoton
dallen wrote:
Sat Jul 27, 2019 1:41 pm
There is no excuse for developing devices that do not adhere to USB standards; however, unfortunately, we appear to be stuck with this misbehaving device since there appears to be no better alternative
As you say, there is no excuse. It is not reasonable to except RPF/T to fix someone else's broken design. They have many other things to fix that affect far more Pi users. :lol:

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Jul 27, 2019 3:05 pm
by trejan
The Z-Stick is firmware upgradable according to Aeotec so they may be able to work around this bug.

It looks like its a design flaw with the circuitry itself. No firmware is going to fix this.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Jul 27, 2019 3:18 pm
by jamesh

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Mon Jul 29, 2019 7:24 am
by lost
jdb wrote:
Wed Jul 17, 2019 11:06 am
My opinion is that it's not a fault of the USB chip to refuse to talk to a device that could potentially fry the port logic.
This device have an internal battery to allow standalone in-place z-wave associations with remote modules that may be too far from the machine hosting the home management stuff. This was a nice feature, as secured z-wave associations needs a symmetric key exchange & you don't want it to be catched... So association must be done closely because of reduced radio power.

Anything to do with this battery to explain this voltage drop at plug? I've read some managed to get it work after using a USB2 hub and this still worked device immediately plugged back directly on the PI4.

Battery charging immediately at plug... or not?

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sat Aug 03, 2019 7:25 pm
by dallen
I managed to get it to work, but the Aeotec Z-wave stick would fall offline every night making the Raspberry Pi 4 virtually unusable for the purpose for which I intended to use it (Home Assistant home automation). I have been forced to revert back to using my Raspberry Pi 3, unfortunately. I am interested in finding out whether anyone has a suggestion for an alternative USB z-wave stick that is compliant or, better yet, a consistently reliable work around. Thanks in advance.

Re: Pi4 && Aeotec Z-Wave USB Stick Gen5

Posted: Sun Sep 08, 2019 5:57 pm
by SignOver
jdb wrote:
Wed Jul 17, 2019 11:06 am
This device has some very non-compliant behaviours.

- On initial connect, it pulls D+ to +5V through a strong pull-up. After 20ms, the pull strength drops which results in D+ dropping to about 4.1V. This is a gross violation of the USB electrical spec.

- If I plug this device into either the Pi 4 or a USB3.0 hub with VIA chipset, the 20ms pull to 5V appears to trigger some sort of protection within the upstream port - both D+ and D- lines end up at >3.3V (SE1) and a device attach does not occur. Plugging a different device into the same port results in an attach event, so it appears the behaviour is temporary.

I can get it into a state where the device does actually attach, by forcing D- to 0V temporarily. In this state, the D- line floats up to 3v3 after every packet so it looks like the upstream port 10k pull-down resistor(s) aren't enabled.

My opinion is that it's not a fault of the USB chip to refuse to talk to a device that could potentially fry the port logic.
Soo.. not to be sarcastic or anything, but are we sure that raspberry 4 is following USB specifications?
https://hackaday.com/2019/07/16/explori ... -in-depth/