raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.19k stars 5.02k forks source link

AEOTEC USB Zwave module not creating /dev/ttyACM0 #3027

Closed ghost closed 5 years ago

ghost commented 5 years ago

When i connect one of these:

https://www.amazon.co.uk/Aeotec-Z-Stick-Z-Wave-create-gateway/dp/B00YETCNOE

I normally get this device:

/dev/ttyACM0

which is used for serial comms to zwave home automation via home assistant.

Connecting it to the Pi4 + Buster i see no such device, infact when i connect via lsusb i see no change before / after connecting.

Any ideas?

ghost commented 5 years ago

This is the one I use, it's cheap and just works:

https://rover.ebay.com/rover/0/0/0?mpre=https%3A%2F%2Fwww.ebay.co.uk%2Fulk%2Fitm%2F362166919258

fribse commented 5 years ago

I've switched to HassIO now. From the 1 reboot so far it seems that it now keeps the USB stick mounted. I have ordered the USB3 hub anyways. My problem for the other suggestions is that they are not easily available in my area. And even the one that @roberttuttle uses I had to get from Germany.

Mastiffen commented 5 years ago

@fribse HassIO on Buster? I thought that was still not working right.

pelwell commented 5 years ago

@fribse are you saying that running different software on your Pi 4 allows the ZWave dongle to work?

fribse commented 5 years ago

@Mastiffen and @pelwell. I was running Raspbian Buster with docker and Hassio on it. I've now changed it to the 64-bit hassio beta image. It now automounts, it still has to be attached to a USB2 hub as far as the 2(!) reboots say. Next test will be power down etc. to see what happens.

bolausson commented 5 years ago

UPDATE: USB 2.0 hub (see above) did not work (neither wall nor bus powered). Ordered a 4-port USB 3.0 hub with adapter power options to try out. https://www.amazon.com/gp/product/B00TPMEOYM/ref=ppx_yo_dt_b_asin_title_o00_s00

This one worked ... plugged into the USB 3.0 port on the RPi. It is interesting that it works with both wall power ... 0.5A adapter ... and bus power from the RPi).

So, the "just plug in a USB 2.0 adapter in between the Aeotec stick and the RPi" is not necessarily a 100% workaround.

I have a rather old "Speedlink Nobilé active 4-Port USB 3.0-Hub with AC-Adapter" https://www.amazon.de/Speedlink-aktiver-Netzteil-3-0-Anschl%C3%BCsse-kompatibel/dp/B00Q6PLUHA

And the workaround does not work with this one.

So it really seems to be a gamble which hub might work...

Cheers, Bjoern

bolausson commented 5 years ago

UPDATE: USB 2.0 hub (see above) did not work (neither wall nor bus powered). Ordered a 4-port USB 3.0 hub with adapter power options to try out. https://www.amazon.com/gp/product/B00TPMEOYM/ref=ppx_yo_dt_b_asin_title_o00_s00

This one worked ... plugged into the USB 3.0 port on the RPi. It is interesting that it works with both wall power ... 0.5A adapter ... and bus power from the RPi).

So, the "just plug in a USB 2.0 adapter in between the Aeotec stick and the RPi" is not necessarily a 100% workaround.

What is the exact product code of the manufacturer of the USB 3.0 hub you are using? In the description from the Amazon Link you provided it says:

Sabrent 4-Port USB 3.0 Hub with Individual LED Lit Power Switches, Included 5V/2.5A Power Adapter (HB-UMP3)

If I search the same on Amazon.de I only find:

Sabrent 4-Port USB 3.0 Hub mit einzelnen Power Schalter und LEDs (HB-UM43)

https://www.amazon.de/dp/B00JX1ZS5O/ref=cm_sw_em_r_mt_dp_U_SIUsDbGBZTS3Y

Now the big question is - will it work or not?!?

fribse commented 5 years ago

@bolausson It's the same, they just bundle it with a PSU in the US apparently. I'll receive mine today, and I'll report back. Just had a bit of confusion here, it is very sensitive. As a preparation for the USB3 hub arriving today, I swapped the USB2 extension cord with a USB3 extension cord, and then it didn't work (with my current USB2 hub). Interesting.

bolausson commented 5 years ago

@fribse I ordered the Sabrent USB-Hub as well and it should arrive today... will report if it works or not.

The "Speedlink Nobilé active 4-Port USB 3.0-Hub with AC-Adapter" neither works via USB-2 or USB-3 cable and it doesn't matter if it is connected to the USB-2 or USB-3 port of the Pi. It doesn't make a difference if the USB-Hub is powered via a PSU or not...

Mastiffen commented 5 years ago

The Plexgear Desktop 500 still works 100 %, but I don't know if that's available everywhere. Here's the link so you can see what it looks like:

https://www.kjell.com/no/produkter/data-og-nettverk/kabler-og-adaptere/usb/usb-huber/plexgear-desktop-500-usb-3-0-hub-med-stromforsyning-4-veis-p69306

CokkocZateki commented 5 years ago

The Plexgear Desktop 500 still works 100 %, but I don't know if that's available everywhere. Here's the link so you can see what it looks like:

https://www.kjell.com/no/produkter/data-og-nettverk/kabler-og-adaptere/usb/usb-huber/plexgear-desktop-500-usb-3-0-hub-med-stromforsyning-4-veis-p69306

@Mastiffen do you have the Aeotec Z-Stick Series 5 and "Plexgear Desktop 500 USB 3.0-hub med strømforsyning 4-veis" with Raspberry PI 4?

Mastiffen commented 5 years ago

Yep.

CokkocZateki commented 5 years ago

Yep.

Great. I just started HA and ran into this issue. Going to buy one for myself :)

thank you

Mastiffen commented 5 years ago

No problem. :)

bolausson commented 5 years ago

Sabrent 4-Port USB 3.0 Hub mit einzelnen Power Schalter und LEDs (HB-UM43)

https://www.amazon.de/dp/B00JX1ZS5O/ref=cm_sw_em_r_mt_dp_U_SIUsDbGBZTS3Y

Now the big question is - will it work or not?!?

The Hub arrived today and I can confirm it is working. It works when plugged into the USB-3 port of the Pi4 - didn't test the USB-2 Ports.

pi@openhab $ lsusb 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 001 Device 007: ID 1cf1:0030 Dresden Elektronik 
Bus 001 Device 003: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Cheers, Bjoern

carloselectro commented 5 years ago

I'm glad I have found this post, I can finally make my Zwave dongle work with this hub:

My hub

I have a raspberry pi 4 with the latest buster and Domoticz.

fribse commented 5 years ago

I finally got the Sabrent 4 port USB3 hub and my USB3 0,5 m extender cable, and I've plugged it into the lower USB3 port (no PSU for the hub). I tried doing a complete shutdown and power-up, and it mounted immediately, so that config works perfectly.

tomasz-darlowski commented 5 years ago

I have still issue after reboot. When I manually replug usb hub, ACM0 device is correctly detected. But after reboot still nothing. Is there any command to execute (which I can put to crontab) which reset usb driver?

LithiumNL commented 5 years ago

I contacted the company of the stick last week and got this as a reply?

Unfortunately, this is a known problem, I have sent an RPi 4 to our team for testing and to search for an alternative solution. The current workaround is to use a powered USB 2.0 hub in between RPi4 and the Z-Stick Gen5 at this time.

If I get any more information over this issue, I will let you know.

I asked them what USB hub was needed and got this reply:

It must be an active USB hub. I cannot recommend a special product. We hope to find a solution. Unfortunately we can't give out any details about the problem yet.

Just wanted to let you know.

Gobolin80 commented 5 years ago

I can confirm that with a usb 2.0 hub (like this: https://www.amazon.it/gp/product/B00BWF5U0M/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1) works fine.

At first i tried with this 3.0 hub (https://www.amazon.it/gp/product/B00JX1ZS5O/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1) and it doesn't work

frosso commented 5 years ago

@Gobolin80 weird, i bought what seems to be the same item on amazon.com. It arrived today and I am using it right now.

https://www.amazon.com/gp/product/B00TPMEOYM/

I am currently using it with the wall charger. It doesn't look like on amazon.it they are selling it with the wall charger, although one review seems to be mention it.

Gobolin80 commented 5 years ago

@Gobolin80 weird, i bought what seems to be the same item on amazon.com. It arrived today and I am using it right now.

https://www.amazon.com/gp/product/B00TPMEOYM/

I am currently using it with the wall charger. It doesn't look like on amazon.it they are selling it with the wall charger, although one review seems to be mention it.

@frosso it's realy weird! :)

jsglazer commented 5 years ago

I can confirm that Hassio 64bit (hassos_rpi4-64-3.4.img) on Pi4 16GB will work using an un-powered Sabrent Model HB-UM43 USB 2.0 hub plugged into Pi's USB 2 port. On /dev/ttyACM0. Can't wait to read the technical explanation for this one.

pelwell commented 5 years ago

It's the hub - it insulates the Pi4's USB interface from the out-of-spec resistance of the ZWave module that makes it look like a USB3 device (which it isn't).

skynet01 commented 5 years ago

I can also confirm that this usb 2.0 hub ( https://www.amazon.it/gp/product/B00BWF5U0M/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1) works fine. I tried other ones and they glitched, I got 50 zwave devices on it and it works pretty good.

mattkime commented 5 years ago

I have an older model of this guy (same model number) - https://www.amazon.com/D-Link-including-Charging-Adapter-DUB-H7/dp/B0000B0DL7

Works fine WITHOUT the power supply. Does not work with it. 🤷‍♂

kelnos commented 5 years ago

I just purchased https://www.amazon.com/gp/product/B00BWF5U0M/ (the Sabrent 4-port hub) based on reports in this issue that it would work. However, the model that arrived in the mail didn't come with a power cable/adapter (there's a tiny barrel-type hole next to the USB-A cable, but it's unmarked). Anyone know what adapter might work with it?

Unfortunately, the Zwave stick doesn't work for me with this hub without external power. It is recognized and enumerated, and /dev/ttyACM0 appears, but shortly after OpenHAB starts talking to it, I see:

[ERROR] [ing.zwave.handler.ZWaveSerialHandler] - Got I/O exception Input/output error in writeArray during sending. exiting thread.

in the log, and after checking dmesg I see that the device disconnected and reconnected. So I'm guessing it's an issue of not enough provided power.

skynet01 commented 5 years ago

I turned off all other porta and connected it to usb2.0 port on pi4, without external power to hub, seems to work fine for weeks now

kelnos commented 5 years ago

I turned off all other porta and connected it to usb2.0 port on pi4, without external power to hub, seems to work fine for weeks now

I did the same with no luck :(

fribse commented 5 years ago

Ok, I got a reply from AEOTEC about the issue:

Attached is the electrical tests we have performed. Conclusion: When Z-Stick is plugged into the USB port of RPi4, it causes the voltage of D- to be non-zero and has large noise; this is the main reason that causes the Z-Stick to be unrecognized by RPi4. By comparing other host device, we can conclude that this specific issue does not happen on other USB iterations. ​ We are looking into workarounds based on the data that we have tested with if we have any interesting information we will get back to you.

Z-Stick RPi4 Electrical Test Results.pdf

fribse commented 5 years ago

@kelnos

OpenHAB

I think most of us have tested it on RPi4 on HomeAssistant. I also have a 'powerless' Sabrent 4 port USB3 hub, and for me with RPi4 and HASS.IO it works, but it sounds like it's a different setup than yours.

P33M commented 5 years ago

That's good. They've confirmed my findings (that the D+ pull is incorrect).

pelwell commented 5 years ago

Can you explain why the laptop is showing different results (at an electrical level)?

kelnos commented 5 years ago

I think most of us have tested it on RPi4 on HomeAssistant. I also have a 'powerless' Sabrent 4 port USB3 hub, and for me with RPi4 and HASS.IO it works, but it sounds like it's a different setup than yours.

Strange that there'd be a difference; maybe the HA vs. OpenHAB access patterns are different enough that HA is able to keep it from dropping off the bus. Anyway, I'll see if I can find a plug for the Sabrent hub, or find something similar and powered, and report back for posterity.

P33M commented 5 years ago

Can you explain why the laptop is showing different results (at an electrical level)?

In the VIA case, after the +5V pull is detected by the downstream port then all bets are off. The reduction of the pull to a ~3.3V level suggests that the device itself is either driving J-state or has enabled its own internal pull to 3v3.

The only other odd behaviour is the D- line oscillating between 3.6V and 0V in the VIA case - but these oscillations are also present at a lesser amplitude on the laptop trace. I suspect measurement error as I don't see that when testing here.

scorfman commented 5 years ago

I have tested with this cheap USB 2.0 hub and it works great plugged into a 2.0 port on a Pi 4b 4Gb.

Same good results using this USB 3.0 hub in the 2.0 port

SirAthos commented 5 years ago

For those looking for something more compact and not powered, this hub also works well (plugged into a RPi4 USB3 slot, and using one of the hub's USB2 outlets for the Zwave module): https://smile.amazon.com/gp/product/B071JTSMVQ (Haven't yet done long term testing, but it's been stable for a couple of days now).

Edit: More than two months later, this has been working 24/7 without any problems.

AlexQbc commented 4 years ago

I have bought a RP 4 and found out this problem about the Aeotec stick. Based on that thread, I've just bought the cheapest USB hub (Insignia 4 port USB 2.0 Model Number: NS-PCH5420-C ) that I could find and it's working correctly. The stick appear as /dev/ttyACM0. Will see if it stable over time.

sapnho commented 4 years ago

Sabrent 4-Port USB 3.0 Hub mit einzelnen Power Schalter und LEDs (HB-UM43) https://www.amazon.de/dp/B00JX1ZS5O/ref=cm_sw_em_r_mt_dp_U_SIUsDbGBZTS3Y Now the big question is - will it work or not?!?

The Hub arrived today and I can confirm it is working. It works when plugged into the USB-3 port of the Pi4 - didn't test the USB-2 Ports.

I tried this hub as well and it didn't work. Only a powered hub did the trick in my case.

LennardWesterveld commented 4 years ago

I tried the "Trust 22260 Aiva 4 Port USB 3.1 hub" that did work trough my USB3 port of my PI4 worked longer than a day now.

ruudvaneck commented 4 years ago

I have the same problems on OpenHab2, with Aerotech S2 and Aerotech rev5. both in combination with Pi4.

(Initially i did not have problems with the RPI4 in combination with S2 but after a few days and plugging/unplugging the stick the problems appeared)

aeotec Going to buy a hub tomorrow. (At the Dutch shop Action)

ruudfeen commented 4 years ago

I had the same problem on a Pi4, it did not solve the problem using a HEMA usb hub..

@ruudvaneck did you manage with the Action hub?

TerrorSource commented 4 years ago

I had the same problem on a Pi4, it did not solve the problem using a HEMA usb hub..

@ruudvaneck did you manage with the Action hub?

I can confirm that the cheapest Action usb-hub(2euro, https://www.action.com/nl-nl/p/usb-poort/) works.

ruudvaneck commented 4 years ago

The USB hub i used from Action was not working. But it was a different model than Terrorsource used. https://www.action.com/nl-nl/p/maxxter-usb-hub/ (€3,49)

So it is gooed to know that not all hub's solve the problem.

poudenes commented 4 years ago

I used a check one bought at CoolBlue is working:

https://www.coolblue.nl/product/639364/ewent-4-poorts-mini-usb-2-0-hub.html

prairieapps commented 4 years ago

I ran into this issue, luckily I hoard USB hubs. For any Canadians that use Amazon, this Anker hub worked for me:

https://www.amazon.ca/gp/product/B07L32B9C2

rchl commented 4 years ago

It's nice that there is a simple workaround with using a Hub but that shouldn't be necessary really. Aeotec is not really admitting it's their fault so can PI do something here? Even if it takes new hardware release?

JamesH65 commented 4 years ago

I seriously doubt we would be interested in changing our HW just because some random manufacturer cannot build USB devices correctly. It's VERY expensive to redesign stuff for this sort of minimal use case.

Mastiffen commented 4 years ago

And I seriously don't see the problem, with a workaround to 20 pounds... bilde

rchl commented 4 years ago

Cost of the hub is not an issue but:

I'm not gonna point fingers and blame anyone here but it seems to me that there is a bit of fault on both sides.

I just wanted to air my minor frustration with the experience. Don't want to argue about whose fault is that or anything. :)