Poll

Interested/Instrument/Interface

Yes,3458A,GPIB
17 (23.9%)
Yes,3458A,Prologix
10 (14.1%)
Yes,K2001/K2002,GPIB
11 (15.5%)
Yes, post type of instrument and type of interface (GPIB,Prologix,USB,LAN, RS232)
29 (40.8%)
Not interested, why?
4 (5.6%)

Total Members Voted: 44

Voting closed: December 13, 2016, 11:12:53 am

Author Topic: Raspberry Pi2/3 logging platform for Voltnuts  (Read 146144 times)

0 Members and 1 Guest are viewing this topic.

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #425 on: November 23, 2023, 09:44:42 am »
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: [Select]
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

Offline electronomicon

  • Contributor
  • Posts: 34
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #426 on: November 23, 2023, 11:29:50 am »
Yes, this shows up when I plug in the USB:
Code: [Select]
[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

Just noticed there are errors in the log … they were black on black on my terminal, so I haven’t noticed them before  |O.
« Last Edit: November 23, 2023, 11:33:06 am by electronomicon »
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #427 on: November 23, 2023, 12:34:03 pm »
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.

Offline electronomicon

  • Contributor
  • Posts: 34
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #428 on: November 23, 2023, 12:51:38 pm »
I tried lsusb -vv, but don’t see anything looking like a fw version number. Here’s the result:
Code: [Select]
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

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.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #429 on: November 23, 2023, 04:38:49 pm »
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?
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`).

The installation works fine, but when I try to run ibtest and connect to a device, it fails:
Code: [Select]
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

I then followed the trouble-shooting guide, where
Code: [Select]
sudo ldconfig && sudo gpib_config failed, too:
Code: [Select]
failed to bring board online
failed to configure board
main: Input/output error

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
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).

but when I tried to communicate with any device (via ibtest) I always got another error:
Code: [Select]
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

My devices run on addresses 1, 2 and 3. I tested the whole setup successfully with the Agilent IO suite on windows.
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.


I'm also using a gpib_conf that user bingo600 has noted to work on this adapter:
Code: [Select]
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 */
}
Looks good, that's not the problem.  If you could share the syslog, then we might get further.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #430 on: November 23, 2023, 04:41:32 pm »
I tried lsusb -vv, but don’t see anything looking like a fw version number. Here’s the result:
Code: [Select]
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

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.
The 82537 changes it's device id when the firmware is uploaded.  0x718 is the one when it is, so that's good.

Oh, btw, is the adapter LED lit green or red?
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #431 on: November 23, 2023, 05:12:12 pm »
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`).
Are you sure about that for the Beiming? The information here suggests differently.

Looks good, that's not the problem.  If you could share the syslog, then we might get further.
See this post.
 
The following users thanked this post: electronomicon

Offline electronomicon

  • Contributor
  • Posts: 34
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #432 on: November 23, 2023, 05:53:25 pm »
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`).

As alm pointed out, this seems to be only the case for the Agilent adapter.

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.

I tried all sorts of different combinations, even every device on its own, directly connected to the adapter. Always the same issue. Current setup is the same as tested successfully on Windows (all three devices connected with two cables and all tuned on).
A higher power adapter (2.4 A max. at 5 V) also didn’t help. I currently cannot test a different USB power cable and micro USB to USB adapter (which the GPIB-Interface is connected to) as I don’t have spares for them.

There’s also no CPU related logs in /var/log/syslog, but there are GPIB related ones (when running ibtest):
Code: [Select]
Nov 23 18:47:32 raspberrypi kernel: [  221.387706] gpib: ioctl 3 invalid for offline board
Nov 23 18:47:32 raspberrypi kernel: [  221.387907] gpib: ioctl 5 invalid for offline board
Nov 23 18:47:32 raspberrypi kernel: [  221.387985] gpib: ioctl 5 invalid for offline board
Nov 23 18:49:49 raspberrypi kernel: [  358.658488] gpib: ioctl 3 invalid for offline board
Nov 23 18:49:49 raspberrypi kernel: [  358.658666] gpib: ioctl 5 invalid for offline board
Nov 23 18:49:49 raspberrypi kernel: [  358.658744] gpib: ioctl 5 invalid for offline board

The 82537 changes it's device id when the firmware is uploaded.  0x718 is the one when it is, so that's good.

Oh, btw, is the adapter LED lit green or red?
The S82357 doesn’t. It already has the 0x718 when plugged in and stayed that way when I still tried to upload the firmware.
it also doesn’t have indicator LEDs (probably because of that).
« Last Edit: November 23, 2023, 05:55:35 pm by electronomicon »
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #433 on: November 23, 2023, 09:02:04 pm »
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`).
Are you sure about that for the Beiming? The information here suggests differently.
Oh, right, the Beiming is more different from the Agilent than I expected, given that Agilent sold also models made by Beiming (and bears the same USB product id).

Looks good, that's not the problem.  If you could share the syslog, then we might get further.
See this post.
No, I was hoping for the syslog, but was chiefly looking for the fxload entries (which I now understand won't be there) and potential power problems, which we were now assured didn't occur.
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #434 on: November 23, 2023, 10:01:08 pm »
Oh, right, the Beiming is more different from the Agilent than I expected, given that Agilent sold also models made by Beiming (and bears the same USB product id).
Based on what someone claiming to be the designer of the Beiming adapter writes here, Beiming never made adapters for Agilent/Keysight.
 
The following users thanked this post: guenthert

Offline electronomicon

  • Contributor
  • Posts: 34
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #435 on: November 23, 2023, 11:55:49 pm »
No, I was hoping for the syslog, but was chiefly looking for the fxload entries (which I now understand won't be there) and potential power problems, which we were now assured didn't occur.
Correct, no fxload entries in the syslog.

But I found some udev related stuff I hadn’t seen before, maybe this is of any help?
Code: [Select]
raspi-config[331]: Error opening '/dev/input/event*': No such file or directory
[…]
systemd-udevd[141]: regulatory.0: Process '/lib/crda/crda' failed with exit code 249.
systemd-udevd[135]: event0: Process '/usr/sbin/th-cmd --socket /var/run/thd.socket -- passfd --udev' failed with exit code 1.
systemd-udevd[141]: regulatory.0: Process '/lib/crda/crda' failed with exit code 249.
[…]
/usr/local/lib/udev/gpib_udev_config:entered for Product: 957/718/0 Devpath: /devices/platform/soc/20980000.usb/usb1/1-1/1-1:1.0 Serial: CP1001xxxx
/usr/local/lib/udev/gpib_udev_config: gpib_config options: --board-type agilent_82357a
[…]
systemd-udevd[136]: 1-1:1.0: Process '/usr/local/lib/udev/gpib_udev_config' failed with exit code 255.
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 712
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #436 on: November 24, 2023, 09:11:37 am »
Oh, right, the Beiming is more different from the Agilent than I expected, given that Agilent sold also models made by Beiming (and bears the same USB product id).
Based on what someone claiming to be the designer of the Beiming adapter writes here, Beiming never made adapters for Agilent/Keysight.

Thanks, that was an interesting read.  So he was forbidden to mention Agilent in the eBay listing, but got away using their USB vendor id.  Looks like a mess, oh well.  And since that fellow stopped selling those devices eight years ago for it being too much of a hassle for little gain, there is only a slim hope getting him to help with the Linux side.
 

Offline electronomicon

  • Contributor
  • Posts: 34
  • Country: de
Re: Raspberry Pi2/3 logging platform for Voltnuts
« Reply #437 on: December 09, 2023, 10:30:09 pm »
Small update from me: I never heard back from the Beiming guy. I ended up getting a used Agilent 82357B and it’s working now. Everything was perfectly set up already from my previous attempts, basically I just had to plug it in. Going to pass on the Beiming adapter, as it’s still perfectly usable under Windows.
 
The following users thanked this post: guenthert


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf