[solved] Keysight 82357B with linux - Page 1
Forum section: electronics / testgear

author: claudiux
author_rank: Newbie
timestamp: January 20, 2019, 04:58:09 pm
content: 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 :Code:device descriptor read/64, error -110The way I do is :1. plug usb in, three LED light :Code:$uname -aLinux waka 4.9.0-8-686-pae #1 SMP Debian 4.9.130-2 (2018-10-27) i686 GNU/Linux$ lsusb | grep AgeBus 001 Device 033: ID 0957:0718 Agilent Technologies, Inc.Code:# 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-4Code:$ lsmod | grep agiagilent_82357a 24576 0gpib_common 32768 1 agilent_82357ausbcore 184320 5 usbhid,ehci_hcd,uhci_hcd,agilent_82357a,ehci_pci2. Load the firmware with fxload:Code:# fxload -t fx2 -D /dev/bus/usb/001/039 -I /usr/share/usb/agilent_82357a/measat_releaseX1.8.hexThe 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 :Code:[ 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_hcdSo 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.

author: MarkL
author_rank: Unknown
timestamp: January 20, 2019, 08:43:53 pm
content: It looks like the firmware has already loaded successfully by running fxload twice.You would not see "SerialNumber: MY56153375" if the second fxload was not successful. Also, idProduct=0518 changes to idProduct=0718 after the second fxload. All three LEDs would normally be lit at this point, which is what you're seeing.In this state, it's time for "gpib_config --minor 0" (NOT fxload). After that, only the green READY LED should be lit and the adapter is ready.I tried running fxload three times like you seem to be doing, and I get the same single FAIL LED, and the same "device descriptor" errors.You shouldn't need to manually run fxload anyway. Your hotplug script, /etc/hotplug/usb/agilent_82357a, should be doing everything for you, including the gpib_config.

author: MarkL
author_rank: Unknown
timestamp: January 20, 2019, 08:54:54 pm
content: 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.Code:#!/bin/shexec >> /tmp/hotplug.log 2>&1echo ""dateecho "log output from $0"echo "args: $*"# echo "not doing anything (test)"# exitecho "PATH=$PATH"GPIB_CONFIG_OPTIONS="--minor 0"DATADIR=/usr/shareFXLOAD=fxloadFXLOAD_OPTIONS=export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/binFIRMWARE=echo "PATH=$PATH"# pre-renumeration device IDscase $PRODUCT in# 82357a with firmware already loaded957/107/*)echo "detected 82357a with firmware already loaded"echo "running: gpib_config $GPIB_CONFIG_OPTIONS"gpib_config $GPIB_CONFIG_OPTIONS;;# 82357a without firmware957/7/*)echo "detected 82357a without firmware"FIRMWARE=$DATADIR/usb/agilent_82357a/82357a_fw.hex;;# 82357b with firmware already loaded957/718/*)echo "detected 82357b with firmware already loaded"echo "running: gpib_config $GPIB_CONFIG_OPTIONS"gpib_config $GPIB_CONFIG_OPTIONS;;# 82357b without firmware957/518/*)echo "detected 82357b without firmware"FIRMWARE=$DATADIR/usb/agilent_82357a/measat_releaseX1.8.hexFXLOAD_OPTIONS="-t fx2";;esac# quit unless we were called to download some firmwareif [ "$FIRMWARE" = "" ]; then# OR: restructure to do other things for# specific post-renumeration devicesexit 0fiecho "selected FIRMWARE=$FIRMWARE"# missing firmware?if [ ! -r $FIRMWARE ]; thenif [ -x /usr/bin/logger ]; then/usr/bin/logger -t $0 "missing $FIRMWARE for $PRODUCT ??"fiexit 1fiecho "scanning for fxload..."# missing fxload?if ! which $FXLOAD; thenif [ -x /usr/bin/logger ]; then/usr/bin/logger -t $0 "missing $FXLOAD ??"fiexit 1fiecho "fxload found."if [ -x /usr/bin/logger ]; then/usr/bin/logger -t $0 "load $FIRMWARE for $PRODUCT to $DEVICE"fiecho DEVICE: $DEVICEecho DEVNAME: $DEVNAMEecho running: $FXLOAD -D $DEVNAME $FXLOAD_OPTIONS -I $FIRMWARE$FXLOAD -D $DEVNAME $FXLOAD_OPTIONS -I $FIRMWAREexit

author: claudiux
author_rank: Newbie
timestamp: January 20, 2019, 09:39:49 pm
content: GreatI didn't notice the change of IdProduct in the messagesI've used linux-gpib for a long time on Debian and used to load the firmware twice for the 82357B and once for the 82357A ! I've never seen this hotplug script before ...Things have changed, the firmware is loaded by this script and gpib.conf is now in /usr/local/etc (it was in /etc/ before) ...Well, all works fine now. Thanks for your help !I will try youtr modified script tomorrow