fruggy83 / openocean

27 stars 11 forks source link

USB Auto discovery detects every FTDI device as an USB300 gateway #38

Open fruggy83 opened 5 years ago

fruggy83 commented 5 years ago

The USB dicovery just checks the vendor and product id => each FTDI device is detected as an USB300 gateway. The manufacturer should be added to this check.

fruggy83 commented 5 years ago

I am working on this.

fruggy83 commented 5 years ago

pushed directly to master to ease the testing

fruggy83 commented 5 years ago

@bodiroga, @dominikkv could you do me favor and test this commit with your USB300 devices. I already tested it with a FTDI serial programmer. This device was not recognized as an USB300 gateway. However my EnOcean stick got recognized as expected.

dominikkv commented 5 years ago

I'll test it tomorrow.

dominikkv commented 5 years ago

Auto discovery does not work with rfc2217, right? I'll have to change my docker config to expose USB to OpenHAB again, that's why I haven't tested yet. Plans are to do it on Thursday :-)

dominikkv commented 5 years ago

Test was not successful. Manufacturer name and product name do not match! Here is my UsbSerialDeviceInformation:

01:02:35.208 [DEBUG] [.EnOceanUsbSerialDiscoveryParticipant] - New device found: UsbSerialDeviceInformation [vendorId=0x0403, productId=0x6001, serialNumber=xxxxxxxx, manufacturer=FTDI, product=FT232R USB UART, interfaceNumber=0x00, interfaceDescription=FT232R USB UART, serialPort=/dev/ttyUSB0]
fruggy83 commented 5 years ago

Hi @dominikkv,

thanks a lot for your test. What kind of USB dongle do you own. Really interesting that your dongles does not have EnOcean as manufacturer.

dominikkv commented 5 years ago

https://www.amazon.de/d/B01DRO7B2U Maybe not the official stick :-D

fruggy83 commented 5 years ago

Hi @dominikkv,

as your stick just provides generic FTDI information and nothing specific about EnOcean, I would like to stick with the current solution. Drawback: Auto discovery of these sticks is not working.

bodiroga commented 5 years ago

Hi @fruggy83!

Excuse me for being so late, I don't know if this issue is resolved or I can do anything to fix it. And sorry for not checking the manufacturer ID in the USBDiscovery part of the code, my check was too generic :cry:

Thanks for your work!

dominikkv commented 5 years ago

Drawback: Auto discovery of these sticks is not working.

That's fine, but then we should mention it in the docu with a guide to add them manually.