openocean icon indicating copy to clipboard operation
openocean copied to clipboard

USB Auto discovery detects every FTDI device as an USB300 gateway

Open fruggy83 opened this issue 7 years ago • 11 comments

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 avatar Dec 23 '18 13:12 fruggy83

I am working on this.

fruggy83 avatar Dec 23 '18 13:12 fruggy83

pushed directly to master to ease the testing

fruggy83 avatar Dec 23 '18 13:12 fruggy83

@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.

fruggy83 avatar Dec 23 '18 13:12 fruggy83

I'll test it tomorrow.

dominikkv avatar Dec 24 '18 10:12 dominikkv

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 avatar Jan 01 '19 12:01 dominikkv

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]

dominikkv avatar Jan 04 '19 00:01 dominikkv

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.

fruggy83 avatar Jan 06 '19 20:01 fruggy83

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

dominikkv avatar Jan 07 '19 00:01 dominikkv

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.

fruggy83 avatar Jan 08 '19 13:01 fruggy83

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!

bodiroga avatar Jan 18 '19 08:01 bodiroga

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.

dominikkv avatar Jan 18 '19 08:01 dominikkv