Re: driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
#!/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."

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux