Hello,
I am trying to get a 82357B GPIB/USB interface to work with linux using linux-gpib. I've already done that for this kind of device in the past. But with this new device I get a kernel error when I load the firmware on the device :
device descriptor read/64, error -110
The way I do is :
1. plug usb in, three LED light :
$uname -a
Linux waka 4.9.0-8-686-pae #1 SMP Debian 4.9.130-2 (2018-10-27) i686 GNU/Linux
$ lsusb | grep Age
Bus 001 Device 033: ID 0957:0718 Agilent Technologies, Inc.
# dmesg[ 3461.604020] usb 1-4: new high-speed USB device number 37 using ehci-pci
[ 3461.752384] usb 1-4: New USB device found, idVendor=0957, idProduct=0518
[ 3461.752390] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3461.778800] usb 1-4: USB disconnect, device number 37
[ 3463.548017] usb 1-4: new high-speed USB device number 38 using ehci-pci
[ 3463.696329] usb 1-4: New USB device found, idVendor=0957, idProduct=0518
[ 3463.696335] usb 1-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3463.727620] usb 1-4: USB disconnect, device number 38
[ 3465.496022] usb 1-4: new high-speed USB device number 39 using ehci-pci
[ 3465.644910] usb 1-4: New USB device found, idVendor=0957, idProduct=0718
[ 3465.644917] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 3465.644920] usb 1-4: Product: 82357B ()
[ 3465.644923] usb 1-4: Manufacturer: Agilent Technologies, Inc.
[ 3465.644925] usb 1-4: SerialNumber: MY56153375
[ 3465.645320] probe succeeded for path: usb-0000:00:10.4-4
$ lsmod | grep agi
agilent_82357a 24576 0
gpib_common 32768 1 agilent_82357a
usbcore 184320 5 usbhid,ehci_hcd,uhci_hcd,agilent_82357a,ehci_pci
2. Load the firmware with fxload:
# fxload -t fx2 -D /dev/bus/usb/001/039 -I /usr/share/usb/agilent_82357a/measat_releaseX1.8.hex
The fail LED is now ON, the two others are OFF. And the device is no more listed in lsusb.
And the messages of the kernel :
[ 3796.568275] usb 1-4: USB disconnect, device number 39
[ 3796.568362] agilent_82357a_driver_disconnect: exit
[ 3798.336021] usb 1-4: new high-speed USB device number 40 using ehci-pci
[ 3803.480023] usb 1-4: device descriptor read/64, error -110
[ 3819.096023] usb 1-4: device descriptor read/64, error -110
[ 3819.324029] usb 1-4: new high-speed USB device number 41 using ehci-pci
[ 3824.472022] usb 1-4: device descriptor read/64, error -110
[ 3840.088025] usb 1-4: device descriptor read/64, error -110
[ 3840.196042] usb usb1-port4: attempt power cycle
[ 3840.632017] usb 1-4: new high-speed USB device number 42 using ehci-pci
[ 3845.859229] usb 1-4: device descriptor read/8, error -110
[ 3851.235258] usb 1-4: device descriptor read/8, error -110
[ 3851.460021] usb 1-4: new high-speed USB device number 43 using ehci-pci
[ 3856.611283] usb 1-4: device descriptor read/8, error -110
[ 3861.987306] usb 1-4: device descriptor read/8, error -110
[ 3862.092043] usb usb1-port4: unable to enumerate USB device
[ 3862.348027] usb 3-2: new full-speed USB device number 18 using uhci_hcd
So here I can't load the firmware a second time because the device is not seen by the kernel. I've tried on two machines and get the same error. I don't have a window PC to test.
Does anyone had this error before ? (device descriptor read/64, error -110).
Thanks for any advice. ;)
If it's of any help, here's my /etc/hotplug/usb/agilent_82357a, modified from the 4.0.2 linux-gpib distribution. It appends debug output endlessly to /tmp/hotplug.log. Change it to /dev/null if you don't want it the log building up forever.
This runs on CentOS 6.8, kernel 2.6.32-504.30.3.el6.x86_64, which is fairly old. YMMV.
#!/bin/sh
exec >> /tmp/hotplug.log 2>&1
echo ""
date
echo "log output from $0"
echo "args: $*"
# echo "not doing anything (test)"
# exit
echo "PATH=$PATH"
GPIB_CONFIG_OPTIONS="--minor 0"
DATADIR=/usr/share
FXLOAD=fxload
FXLOAD_OPTIONS=
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
FIRMWARE=
echo "PATH=$PATH"
# pre-renumeration device IDs
case $PRODUCT in
# 82357a with firmware already loaded
957/107/*)
echo "detected 82357a with firmware already loaded"
echo "running: gpib_config $GPIB_CONFIG_OPTIONS"
gpib_config $GPIB_CONFIG_OPTIONS
;;
# 82357a without firmware
957/7/*)
echo "detected 82357a without firmware"
FIRMWARE=$DATADIR/usb/agilent_82357a/82357a_fw.hex
;;
# 82357b with firmware already loaded
957/718/*)
echo "detected 82357b with firmware already loaded"
echo "running: gpib_config $GPIB_CONFIG_OPTIONS"
gpib_config $GPIB_CONFIG_OPTIONS
;;
# 82357b without firmware
957/518/*)
echo "detected 82357b without firmware"
FIRMWARE=$DATADIR/usb/agilent_82357a/measat_releaseX1.8.hex
FXLOAD_OPTIONS="-t fx2"
;;
esac
# quit unless we were called to download some firmware
if [ "$FIRMWARE" = "" ]; then
# OR: restructure to do other things for
# specific post-renumeration devices
exit 0
fi
echo "selected FIRMWARE=$FIRMWARE"
# missing firmware?
if [ ! -r $FIRMWARE ]; then
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "missing $FIRMWARE for $PRODUCT ??"
fi
exit 1
fi
echo "scanning for fxload..."
# missing fxload?
if ! which $FXLOAD; then
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "missing $FXLOAD ??"
fi
exit 1
fi
echo "fxload found."
if [ -x /usr/bin/logger ]; then
/usr/bin/logger -t $0 "load $FIRMWARE for $PRODUCT to $DEVICE"
fi
echo DEVICE: $DEVICE
echo DEVNAME: $DEVNAME
echo running: $FXLOAD -D $DEVNAME $FXLOAD_OPTIONS -I $FIRMWARE
$FXLOAD -D $DEVNAME $FXLOAD_OPTIONS -I $FIRMWARE
exit