From: Igor Filippov <igorf777@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: driver
Date: Wed, 4 Mar 2020 14:19:24 +0300 [thread overview]
Message-ID: <00931b5b-a8f0-3876-8762-e18ecdee7be4@gmail.com> (raw)
In-Reply-To: <20200304090905.GD1429273@kroah.com>
[-- Attachment #1: Type: text/plain, Size: 4396 bytes --]
The i-7565H1 device has a driver installation script from the device
manufacturer. This script contains the instruction "modprobe usbserial".
If this is not correct, could you tell me which driver we should use? I
attach the script to the message. The link to where we got the software:
http://www.icpdas.com/root/product/solutions/industrial_communication/fieldbus/can_bus/converter/i-7565-h1h2.html
thanks,
igor
04.03.2020 12:09, Greg KH пишет:
> On Fri, Feb 28, 2020 at 07:37:40PM +0300, Igor Filippov wrote:
>> I apologize for my carelessness. I will try to send it to everyone...
> You can't send html email to the list, that will cause it to get
> rejected :(
>
> Anyway, I think this is the device, right:
>
>> Bus 002 Device 004: ID 1b5c:0201
>> Couldn't open device, some information will be missing
>> Device Descriptor:
>> bLength 18
>> bDescriptorType 1
>> bcdUSB 2.00
>> bDeviceClass 2 Communications
>> bDeviceSubClass 0
>> bDeviceProtocol 0
>> bMaxPacketSize0 64
>> idVendor 0x1b5c
>> idProduct 0x0201
>> bcdDevice 1.00
>> iManufacturer 4
>> iProduct 38
>> iSerial 74
>> bNumConfigurations 1
>> Configuration Descriptor:
>> bLength 9
>> bDescriptorType 2
>> wTotalLength 67
>> bNumInterfaces 2
>> bConfigurationValue 1
>> iConfiguration 0
>> bmAttributes 0x80
>> (Bus Powered)
>> MaxPower 250mA
>> Interface Descriptor:
>> bLength 9
>> bDescriptorType 4
>> bInterfaceNumber 0
>> bAlternateSetting 0
>> bNumEndpoints 1
>> bInterfaceClass 2 Communications
>> bInterfaceSubClass 2 Abstract (modem)
>> bInterfaceProtocol 0 None
>> iInterface 104
>> CDC Header:
>> bcdCDC 1.10
>> CDC Call Management:
>> bmCapabilities 0x01
>> call management
>> bDataInterface 1
>> CDC ACM:
>> bmCapabilities 0x02
>> line coding and serial state
>> CDC Union:
>> bMasterInterface 0
>> bSlaveInterface 1
>> Endpoint Descriptor:
>> bLength 7
>> bDescriptorType 5
>> bEndpointAddress 0x81 EP 1 IN
>> bmAttributes 3
>> Transfer Type Interrupt
>> Synch Type None
>> Usage Type Data
>> wMaxPacketSize 0x0010 1x 16 bytes
>> bInterval 32
>> Interface Descriptor:
>> bLength 9
>> bDescriptorType 4
>> bInterfaceNumber 1
>> bAlternateSetting 0
>> bNumEndpoints 2
>> bInterfaceClass 10 CDC Data
>> bInterfaceSubClass 0 Unused
>> bInterfaceProtocol 0
>> iInterface 104
>> Endpoint Descriptor:
>> bLength 7
>> bDescriptorType 5
>> bEndpointAddress 0x02 EP 2 OUT
>> bmAttributes 2
>> Transfer Type Bulk
>> Synch Type None
>> Usage Type Data
>> wMaxPacketSize 0x0040 1x 64 bytes
>> bInterval 0
>> Endpoint Descriptor:
>> bLength 7
>> bDescriptorType 5
>> bEndpointAddress 0x82 EP 2 IN
>> bmAttributes 2
>> Transfer Type Bulk
>> Synch Type None
>> Usage Type Data
>> wMaxPacketSize 0x0040 1x 64 bytes
>> bInterval 0
>
> Can you confirm that the vendor/product id is 1b5c/0201 for this?
>
> If so, what is wrong with the "normal" cdc driver here? Why does the
> usb-serial generic driver need to be used instead?
>
> Do you have a pointer to where you got the instructions to usb the
> usb-serial generic driver instead of the built-in kernel driver?
>
> thanks,
>
> greg k-h
[-- Attachment #2: I7565H1H2_install --]
[-- Type: text/plain, Size: 1490 bytes --]
#!/bin/sh
BLACKLIST=/etc/modprobe.d/blacklist.conf
USB_GENERIC_NEWID=/sys/bus/usb-serial/drivers/generic/new_id
VENDOR='1b5c'
H1_PRODUCT='0201'
H2_PRODUCT='0202'
if [ "$1" = 'help' ]; then
echo "----------------------------------------"
echo "usage: ./I7565H1H2_install"
echo " Install I7565-H1/H2 module driver automatically"
echo "usage: ./I7565H1H2_install remove"
echo " Remove I7565-H1/H2 driver"
echo "usage: ./I7565H1H2_install cdc_acm"
echo " Remove cdc_acm from blacklist."
exit
elif [ "$1" = 'remove' ]; then
modprobe -r usbserial
exit
elif [ "$1" = 'cdc_acm' ]; then
sed -i '/cdc_acm/d' $BLACKLIST
exit
fi
#check i-7565-H1/H2 Vendor ID first
cat `find /sys -name idVendor` | grep $VENDOR > /dev/null 2>&1
RETURN="$?"
if [ "$RETURN" = '1' ]; then
echo "No i-7565-H1/H2 found!"
exit;
fi
CDC_ACM=`grep cdc_acm "$BLACKLIST"`
if [ "$CDC_ACM" = "" ]; then
echo "blacklist cdc_acm" >> $BLACKLIST
modprobe -r cdc_acm
fi
#install driver "usbserial" first
modprobe usbserial
#check i-7565-H1 Product ID
cat `find /sys -name idProduct` | grep $H1_PRODUCT > /dev/null 2>&1
RETURN="$?"
if [ "$RETURN" = '0' ]; then
echo "Install driver for i-7565-H1."
echo "$VENDOR $H1_PRODUCT" > $USB_GENERIC_NEWID
fi
#check i-7565-H2 Product ID
cat `find /sys -name idProduct` | grep $H2_PRODUCT > /dev/null 2>&1
RETURN="$?"
if [ "$RETURN" = '0' ]; then
echo "Install driver for i-7565-H2."
echo "$VENDOR $H2_PRODUCT" > $USB_GENERIC_NEWID
fi
echo "success."
next prev parent reply other threads:[~2020-03-04 11:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5e5941d6.1c69fb81.92ce2.f6a5@mx.google.com>
2020-03-04 9:09 ` driver Greg KH
2020-03-04 11:19 ` Igor Filippov [this message]
2020-02-28 14:26 driver Igor Filippov
2020-02-28 14:33 ` driver Greg KH
-- strict thread matches above, loose matches on Subject: below --
2017-06-19 2:44 driver Mohan Baral
2014-02-16 0:42 Driver MHD HA
2014-02-16 1:36 ` Driver Rafał Miłecki
2011-01-29 7:57 driver Sharon Weller
2011-01-29 17:09 ` driver John W. Linville
2002-09-15 12:35 driver parintele
2002-09-16 6:46 ` driver Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00931b5b-a8f0-3876-8762-e18ecdee7be4@gmail.com \
--to=igorf777@gmail.com \
--cc=greg@kroah.com \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.