Electronics > Metrology

Raspberry Pi2/3 logging platform for Voltnuts

<< < (86/88) > >>

alm:
Is there anything in dmesg output regarding GPIB or the agilent_82357a driver? Like the USB device getting plugged in, the agilent_82357a detecting them, etc. There are some examples of what logs might look like in the first post of this thread:

--- Code: ---Nov 11 20:28:22 raspberrypi-3 kernel: [  560.873199] usb 1-1.3: new high-speed USB device number 7 using dwc_otg
Nov 11 20:28:23 raspberrypi-3 kernel: [  561.205274] usb 1-1.3: New USB device found, idVendor=0957, idProduct=0718
Nov 11 20:28:23 raspberrypi-3 kernel: [  561.205304] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Nov 11 20:28:23 raspberrypi-3 kernel: [  561.205321] usb 1-1.3: Product: S82357 ()
Nov 11 20:28:23 raspberrypi-3 kernel: [  561.205337] usb 1-1.3: Manufacturer: BEIMING Technologies, Inc.
Nov 11 20:28:23 raspberrypi-3 kernel: [  561.205352] usb 1-1.3: SerialNumber: CP1001xxxx
Nov 11 20:28:23 raspberrypi-3 kernel: [  561.215169] probe succeeded for path: usb-bcm2708_usb-1.3
Nov 11 20:29:37 raspberrypi-3 kernel: [  635.696267] gpib0: exiting autospoll thread
Nov 11 20:29:37 raspberrypi-3 kernel: [  635.696388] agilent_82357a_detach: detached
Nov 11 20:29:37 raspberrypi-3 kernel: [  635.696526] attached to bus interface 0, address 0xda1b7000
Nov 11 20:29:37 raspberrypi-3 kernel: [  635.715456] agilent_82357a_attach: attached
--- End code ---

electronomicon:
Yes, this shows up when I plug in the USB:

--- Code: ---[67387.885647] usb 1-1: new high-speed USB device number 7 using dwc_otg
[67387.885885] Indeed it is in host mode hprt0 = 00001101
[67388.126204] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 511
[67388.127062] usb 1-1: New USB device found, idVendor=0957, idProduct=0718, bcdDevice= 0.00
[67388.127106] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[67388.127124] usb 1-1: Product: S82357 ()
[67388.127137] usb 1-1: Manufacturer: BEIMING Technologies, Inc.
[67388.127151] usb 1-1: SerialNumber: CP1001xxxx
[67388.146127] probe succeeded for path: usb-20980000.usb-1
[67388.495567] usb 1-1: bus 1 dev num 7 attached to gpib minor 0, agilent usb interface 0
[67389.505770] agilent_82357a_write_registers: agilent_82357a_receive_bulk_msg returned -110, bytes_read=0
[67389.505810] agilent_82357a_dump_raw_block:

[67389.505825] agilent_82357a_init: agilent_82357a_write_registers() returned error
[67390.545741] agilent_82357a_write_registers: agilent_82357a_receive_bulk_msg returned -110, bytes_read=0
[67390.545785] agilent_82357a_dump_raw_block:

[67390.545800] agilent_82357a_go_idle: agilent_82357a_write_registers() returned error
[67390.545822] agilent_82357a_detach: detached
[67390.545833] gpib: interface attach failed
--- End code ---

Just noticed there are errors in the log … they were black on black on my terminal, so I haven’t noticed them before  |O.

alm:
So clearly the agilent_82357a driver is not very happy. I haved used the Beiming adapter myself, but I'd start by checking the firmware version. Maybe lsub -vv will show something useful? Instructions I've read were to contact Beiming for a new firmware version. I'm not sure if this person is still supporting them since they stopped selling then a while ago. See this old post.

electronomicon:
I tried lsusb -vv, but don’t see anything looking like a fw version number. Here’s the result:

--- Code: ---Bus 001 Device 007: ID 0957:0718 Agilent Technologies, Inc. S82357 ()
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0957 Agilent Technologies, Inc.
  idProduct          0x0718
  bcdDevice            0.00
  iManufacturer           1 BEIMING Technologies, Inc.
  iProduct                2 S82357 ()
  iSerial                 5 CP1001xxxx
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          3 (error)
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         0
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x01ff  1x 511 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1

--- End code ---

Also found an e-mail address on google groups that should be contacted to get updated firmware (that post was even older than the one you linked, though). I wrote to that already, but no response so far. I’ll try it through the forum, too, maybe that will work.

guenthert:

--- Quote from: electronomicon on November 23, 2023, 08:03:47 am ---Hi!

I hope this is the right place to ask for some help …

I’m trying to get the setup from MiDi running on a Raspberry Pi Zero with a Beiming S82357 adapter.
I read in the forum that the adapter should be well supported, linux-gpib also lists support, albeit only from firmware version 1.20. Is there a way to check the firmware version of the adapter?

--- End quote ---
Not that I know of.  It's my understanding that the Beiming/Agilent 82357 holds only a minimal boot ROM and the actual firmware is uploaded when connecting to the USB bus.  So it's actually the host OS which provides the firmware via the fxload executable in user space (/usr/sbin/fxload).  In the log files (/var/log/syslog) there should be a note regarding which file is being uploaded (`grep fxload /var/log/syslog`).


--- Quote from: electronomicon on November 23, 2023, 08:03:47 am ---The installation works fine, but when I try to run ibtest and connect to a device, it fails:

--- Code: ---ibtest
Do you wish to open a (d)evice or an interface (b)oard?
(you probably want to open a device): d
enter primary gpib address for device you wish to open [0-30]: 1
trying to open pad = 1 on /dev/gpib0 ...
libgpib: IBOPENDEV ioctl failed
libgpib: error in is_cic()!
ibdev error

ibsta = 0x8000  < ERR >
iberr= 0
EDVR 0: OS error

ibcntl = 22
Aborted
--- End code ---

I then followed the trouble-shooting guide, where
--- Code: ---sudo ldconfig && sudo gpib_config
--- End code ---
failed, too:

--- Code: ---failed to bring board online
failed to configure board
main: Input/output error
--- End code ---

I tried uploading the Agilent 82357A driver, despite this being noted not necessary on the linux-gpib supported hardware site, as it seemed to have helped in this case.
Afterwards, gpib_config indeed ran without errors

--- End quote ---
That's good news actually.  I'd think you're mostly there then.  You might want to verify the udev rules, perhaps the firmware was not uploaded on connect as it ought to be (again, there should be hints in the syslog file).


--- Quote from: electronomicon on November 23, 2023, 08:03:47 am --- but when I tried to communicate with any device (via ibtest) I always got another error:

--- Code: ---enter a string to send to your device: *IDN?
sending string: *IDN?

gpib status is:
ibsta = 0xc100  < ERR TIMO CMPL >
iberr= 14
EBUS 14: Bus error

ibcntl = 0

--- End code ---

My devices run on addresses 1, 2 and 3. I tested the whole setup successfully with the Agilent IO suite on windows.

--- End quote ---
Sure nothing has changed?  The GPIB cable is tightly connected?  The majority of the devices on the bus are on?  The Raspberry Pi gets enough power (don't laugh: poor (USB) power cable is a major issue with Raspberry Pi, recent Linux kernels at least log (you find it in /var/log/syslog) when the CPU determines that there is barely enough juice, which might not be enough of USB devices to work correctly.


--- Quote from: electronomicon on November 23, 2023, 08:03:47 am ---
I'm also using a gpib_conf that user bingo600 has noted to work on this adapter:

--- Code: ---interface {
minor = 0 /* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */
board_type = "agilent_82357a" /* type of interface board being used */
name = "usb_gpib" /* optional name, allows you to get a board descriptor using ibfind() */
pad = 0 /* primary address of interface             */
sad = 0 /* secondary address of interface           */
timeout = T3s /* timeout for commands */

eos = 0xa /* EOS Byte, 0xa is newline and 0xd is carriage return */
set-reos = yes /* Terminate read if EOS */
set-bin = yes /* Compare EOS 8-bit */
set-xeos = no /* Assert EOI whenever EOS byte is sent */
set-eot = yes /* Assert EOI with last byte on writes */

/* settings for boards that lack plug-n-play capability */
  /* base = 0 */    /* Base io ADDRESS                  */
      /* irq  = 0 */    /* Interrupt request level */
      /* dma  = 0 */    /* DMA channel (zero disables)      */

      master = yes /* interface board is system controller */
}

--- End code ---

--- End quote ---
Looks good, that's not the problem.  If you could share the syslog, then we might get further.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod