Author Topic: Using a Raspberry PI with linux-gpib - and a Beiming or Agilent USB-GPIB adapter  (Read 78357 times)

0 Members and 1 Guest are viewing this topic.

Offline z01z

  • Regular Contributor
  • *
  • Posts: 151
Thanks a lot for documenting what setup is needed. It seems like even more became standard in later packages, I've noticed that even the udev magic was already there.

Despite this I'm having a problem with using an 82357B on a raspberry pi3.

The adapter seems to be initialized correctly, gpib_config runs without any error (one green LED is lit):
Code: [Select]
[12627.478991] usb 1-1.2: new high-speed USB device number 29 using dwc_otg
[12627.579385] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0518
[12627.579405] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[12627.755720] usb 1-1.2: USB disconnect, device number 29
[12629.529008] usb 1-1.2: new high-speed USB device number 30 using dwc_otg
[12629.629413] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0518
[12629.629431] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[12629.803990] usb 1-1.2: USB disconnect, device number 30
[12631.579035] usb 1-1.2: new high-speed USB device number 31 using dwc_otg
[12631.679905] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0718
[12631.679929] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[12631.679942] usb 1-1.2: Product: 82357B ()
[12631.679954] usb 1-1.2: Manufacturer: Agilent Technologies, Inc.
[12631.679966] usb 1-1.2: SerialNumber: MY48200000
[12631.680945] probe succeeded for path: usb-3f980000.usb-1.2
[12631.713960] gpib0: exiting autospoll thread
[12631.714029] agilent_82357a_detach: detached
[12631.714109] attached to bus interface 0, address 0xb8383600
[12632.099541] agilent_82357a_attach: attached

However when trying to send a command in ibtest (w), there's a timeout:
Code: [Select]
gpib status is:
ibsta = 0xc100  < ERR TIMO CMPL >
iberr= 14
EBUS 14: Bus error

The adapter is working fine on Windows, talking to my equipment (K2000).
I was thinking maybe the gpib config is wrong, I've tried several setting to no avail.
This is the current gpib.conf:
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 */
        master = yes
        name = "agilent"        /* optional name, allows you to get a board descriptor using ibfind() */
        pad = 30        /* primary address of interface             */
        timeout = T3s   /* timeout for commands */
        set-bin = yes /* Compare EOS 8-bit */
}

Any idea what to try?
 

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
Thanks a lot for documenting what setup is needed. It seems like even more became standard in later packages, I've noticed that even the udev magic was already there.

Despite this I'm having a problem with using an 82357B on a raspberry pi3.

The adapter seems to be initialized correctly, gpib_config runs without any error (one green LED is lit):
Code: [Select]
[12627.478991] usb 1-1.2: new high-speed USB device number 29 using dwc_otg
[12627.579385] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0518
[12627.579405] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[12627.755720] usb 1-1.2: USB disconnect, device number 29
[12629.529008] usb 1-1.2: new high-speed USB device number 30 using dwc_otg
[12629.629413] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0518
[12629.629431] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[12629.803990] usb 1-1.2: USB disconnect, device number 30
[12631.579035] usb 1-1.2: new high-speed USB device number 31 using dwc_otg
[12631.679905] usb 1-1.2: New USB device found, idVendor=0957, idProduct=0718
[12631.679929] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[12631.679942] usb 1-1.2: Product: 82357B ()
[12631.679954] usb 1-1.2: Manufacturer: Agilent Technologies, Inc.
[12631.679966] usb 1-1.2: SerialNumber: MY48200000
[12631.680945] probe succeeded for path: usb-3f980000.usb-1.2
[12631.713960] gpib0: exiting autospoll thread
[12631.714029] agilent_82357a_detach: detached
[12631.714109] attached to bus interface 0, address 0xb8383600
[12632.099541] agilent_82357a_attach: attached

However when trying to send a command in ibtest (w), there's a timeout:
Code: [Select]
gpib status is:
ibsta = 0xc100  < ERR TIMO CMPL >
iberr= 14
EBUS 14: Bus error

The adapter is working fine on Windows, talking to my equipment (K2000).
I was thinking maybe the gpib config is wrong, I've tried several setting to no avail.
This is the current gpib.conf:
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 */
        master = yes
        name = "agilent"        /* optional name, allows you to get a board descriptor using ibfind() */
        pad = 30        /* primary address of interface             */
        timeout = T3s   /* timeout for commands */
        set-bin = yes /* Compare EOS 8-bit */
}

Any idea what to try?

I'd change the "Controllers PAD to 0"

        pad = 0                         /* primary address of interface */

/Bingo
 

Offline z01z

  • Regular Contributor
  • *
  • Posts: 151
Thanks for the suggestion, unfortunately I've already tried that and it didn't work either.

I've noticed that the remote and listen indicators are turned on the meter when trying to send a message, so I suppose something gets there.
 

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
Smells of EOI error

Have you seen Dave's new ibterm program , you can set eoi/eot on that one

ibterm -d 5  -i1  -e10 -x1 -r1 -b1
Attempting to open /dev/gpib0
pad = 5, sad = 0, timeout = 10, send_eoi = 1, eos_mode = 0x1c0a
ibterm>ID
HP5384A
ibterm> <ctrl-D> for exit
ibterm: Done.
 

Offline z01z

  • Regular Contributor
  • *
  • Posts: 151
Smells of EOI error

Have you seen Dave's new ibterm program , you can set eoi/eot on that one

ibterm -d 5  -i1  -e10 -x1 -r1 -b1
Sadly this gives the same error for me.

I've also reinstalled everything from scratch in the meantime but the same happens.
I've checked with tcpdump that the GPIB command is not sent out. I've also tried strace (sudo strace -ttT ibterm -d 1  -i1  -e10 -x1 -r1 -b1), the result is attached. It appears that strace shows the same trace when the existing device address is specified and when not, so in reality there is no GPIB communication at all.

I suspect that I do something wrong with building/installation. You've previously mentioned that TiN's NI guide worked for you. Was it a 4.0.x version, or the older 3.2.21 TiN used?
Might it cause a problem that I have a PI 3 B?
 

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
I have used both 3x & 4x kernels , but only tested/used on a Rpi 1 (512MB)

/Bingo
 

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk

Here is a snip from my gpib.config.

Controller & K2015 (should be like your K2000)

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 = "agilent_82357b"
        master = yes                    /*interface board is system controller*/
        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 */

}


device {
        minor = 0               /* minor number for interface board this device is connected to */
        name = "KEITHLEY2015"   /* device mnemonic */
        pad = 16                        /* The Primary Address */
        sad = 0                 /* Secondary Address */
        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 */
}

 

Offline TiN

  • Super Contributor
  • ***
  • Posts: 4543
  • Country: ua
    • xDevs.com
I had similar issues with python binding to linux-gpib with HPAK 4142B. ibtest was working fine, but python app was giving timeouts. Adding \n in write strings fixed the problem.
Tested on both RPI1 and RPI3 with NI GPIB-HS.

I'm still having issue with linux-gpib + python hanging from time to time with NI USB-GPIB-HS.
YouTube | Metrology IRC Chat room | Let's share T&M documentation? Upload! No upload limits for firmwares, photos, files.
 

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
I had similar issues with python binding to linux-gpib with HPAK 4142B. ibtest was working fine, but python app was giving timeouts. Adding \n in write strings fixed the problem.
Tested on both RPI1 and RPI3 with NI GPIB-HS.

I'm still having issue with linux-gpib + python hanging from time to time with NI USB-GPIB-HS.

I haven't experienced any hangups with the Agilent/Beiming USB adapter.
I occationally see a few Kernel driver errors , but they don't cause any noticeable effects.

/Bingo
 

Offline msraya

  • Supporter
  • ****
  • Posts: 107
  • Country: es
  • EA7EE
Hello all!!

After much headache installing and configuring linux-gpib in Raspy2 i succeeded at it  |O

So, my compilation of linux-gpib was not working because a silly problem with svnversion, and after take care of this, the ibtest program doesn't worked well... Nothing strange in linux  :-//

However, the python library is working well, and I've been able to program my Keithley 2015 without problem... I not try serious programing in python yet...

I use the configuration files from Bingo user, linux-4.4.0-1-rp2 kernel, linux-gpib.4.0.3 last version and a not fake Agilent 82357B USB-GPIB Adapter.

Thank You all users that contribute to make this possible...

By the way the python gpib module is lacking documentation..

P.D: I just installed python-ivi and It is working well with my Keithley 2015, I changed init to no send clear instruction that in my setup it timeout..

Manuel

« Last Edit: August 03, 2016, 07:30:17 pm by msraya »
 

Offline Assafl

  • Frequent Contributor
  • **
  • Posts: 600
Hi -

Did you ever figure out what caused the iberr 14?

I am pulling hair trying to resolve it. Tried Ubuntu, tried the Metrology distribution, tried reinstalling again... Works a charm on Windows... an Agilent 82357B (not a clone).

Is it just an RPi2 issue? 

Assaf
 

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
I just tried to build linux-gpib under Raspbian Jessie
I also get the error 14 , something is broken in the new kernels.

That worked under Raspbian Wheezy on my Raspi V1


See here for more info
https://www.eevblog.com/forum/metrology/raspberry-pi23-logging-platform-for-voltnuts/msg1092798/#msg1092798

/Bingo
 

Offline Assafl

  • Frequent Contributor
  • **
  • Posts: 600
Thank you for testing this.
 

Offline niner_007

  • Frequent Contributor
  • **
  • Posts: 256
  • Country: us
I have it working with Raspbian Stretch on a Pi 3 B+, I did not have to recompile the kernel or patch it in any way (so you shouldn't have to touch that either).
 

Offline bitseeker

  • Super Contributor
  • ***
  • Posts: 9057
  • Country: us
  • Lots of engineer-tweakable parts inside!
Wow, it's been a while since there was any activity in this thread. Thanks for the status update, niner. Good to hear that linux-gpib is better supported in Raspbian now.
TEA is the way. | TEA Time channel
 

Offline Zigzar

  • Newbie
  • Posts: 8
  • Country: gb
Heyo,

I know this is a dead thread, but any help would be great.

I'm using a raspberry Pi 3 with the latest version of raspbian.

When ever I try to use "sudo modprobe agilent_82357a"

this error throws up "modprobe: FATAL: Module agilent_82357a not found in directory /lib/modules/4.14.71-v7+"

any suggestions?

Thanks.
« Last Edit: November 20, 2018, 02:37:15 pm by Zigzar »
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
That would mean the linux-gpib modules were not installed for the kernel you are currently running. Any errors during "make install"? Did you update the kernel or reboot to a different kernel version after installing linux-gpib?

Offline Zigzar

  • Newbie
  • Posts: 8
  • Country: gb
Doesn't appear to be!

According to the post a bit above, I shouldn't have to change the kernel?

Thanks for any help!

This is the output when i run make install:

Code: [Select]
pi@raspberrypi:~/linux-gpib/linux-gpib-code/linux-gpib-user $ sudo make install
Making install in include
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include'
Making install in gpib
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include/gpib'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include/gpib'
make[3]: Nothing to be done for 'install-exec-am'.
 /bin/mkdir -p '/usr/local/include/gpib'
 /usr/bin/install -c -m 644 gpib_user.h ib.h '/usr/local/include/gpib'
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include/gpib'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include/gpib'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/include'
Making install in lib
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
make  install-recursive
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
Making install in .
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
make[4]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libgpib.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgpib.so.0.3.0 /usr/local/lib/libgpib.so.0.3.0
libtool: install: (cd /usr/local/lib && { ln -s -f libgpib.so.0.3.0 libgpib.so.0 || { rm -f libgpib.so.0 && ln -s libgpib.so.0.3.0 libgpib.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgpib.so.0.3.0 libgpib.so || { rm -f libgpib.so && ln -s libgpib.so.0.3.0 libgpib.so; }; })
libtool: install: /usr/bin/install -c .libs/libgpib.lai /usr/local/lib/libgpib.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 libgpib.pc '/usr/local/lib/pkgconfig'
make[4]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
Making install in gpib_config
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib/gpib_config'
make[4]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib/gpib_config'
 /bin/mkdir -p '/usr/local/sbin'
  /bin/bash ../../libtool   --mode=install /usr/bin/install -c gpib_config '/usr/local/sbin'
libtool: install: /usr/bin/install -c .libs/gpib_config /usr/local/sbin/gpib_config
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib/gpib_config'
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib/gpib_config'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/lib'
Making install in drivers
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/drivers'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/drivers'
make[2]: Nothing to be done for 'install-exec-am'.
make  install-data-hook
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/drivers'
test -e /usr/local/etc/gpib.conf || \
/usr/bin/install -c -m 644 -D ../util/templates/gpib.conf /usr/local/etc/gpib.conf
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/drivers'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/drivers'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/drivers'
Making install in examples
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/examples'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/examples'
 /bin/mkdir -p '/usr/local/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c ibtest ibterm '/usr/local/bin'
libtool: install: /usr/bin/install -c .libs/ibtest /usr/local/bin/ibtest
libtool: install: /usr/bin/install -c .libs/ibterm /usr/local/bin/ibterm
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/examples'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/examples'
Making install in test
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/test'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/test'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/test'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/test'
Making install in doc
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/doc'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/doc'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/doc'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/doc'
Making install in language
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language'
Making install in python
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language/python'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language/python'
make[3]: Nothing to be done for 'install-exec-am'.
/usr/bin/python setup.py install --prefix=/usr/local
running install
running build
running build_py
running build_ext
running install_lib
copying build/lib.linux-armv7l-2.7/Gpib.py -> /usr/local/lib/python2.7/dist-packages
copying build/lib.linux-armv7l-2.7/gpib.so -> /usr/local/lib/python2.7/dist-packages
byte-compiling /usr/local/lib/python2.7/dist-packages/Gpib.py to Gpib.pyc
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/gpib-1.0-py2.7.egg-info
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language/python'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language/python'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language'
make -C perl all
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language/perl'
Running Mkbootstrap for LinuxGpib ()
chmod 644 "LinuxGpib.bs"
Manifying 1 pod document
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language/perl'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/language'
Making install in usb
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb'
Making install in agilent_82357a
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/agilent_82357a'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/agilent_82357a'
make[3]: Nothing to be done for 'install-exec-am'.
/bin/sed -e 's,[@]sbindir[@],/usr/local/sbin,g' -e 's,[@]datadir[@],/usr/local/share,g' -e 's,[@]hotplug_usb_conf_dir[@],/usr/local/etc/hotplug/usb,g' < ./99-agilent_82357a.rules.in >99-agilent_82357a.rules
/bin/sed -e 's,[@]sbindir[@],/usr/local/sbin,g' -e 's,[@]datadir[@],/usr/local/share,g' -e 's,[@]hotplug_usb_conf_dir[@],/usr/local/etc/hotplug/usb,g' < ./agilent_82357a.in >agilent_82357a
test -e /usr/local/etc/hotplug/usb/agilent_82357a ||\
/usr/bin/install -c -D agilent_82357a /usr/local/etc/hotplug/usb/agilent_82357a
test -e /usr/local/etc/hotplug/usb/agilent_82357a.usermap ||\
/usr/bin/install -c -m 644 -D ./agilent_82357a.usermap /usr/local/etc/hotplug/usb/agilent_82357a.usermap
/usr/bin/install -c -d /usr/local/share/usb/agilent_82357a
test -d /usr/local/etc/udev/rules.d && test -e /usr/local/etc/udev/rules.d/99-agilent_82357a.rules ||\
/usr/bin/install -c -m 644 -D 99-agilent_82357a.rules /usr/local/etc/udev/rules.d/99-agilent_82357a.rules
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/agilent_82357a'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/agilent_82357a'
Making install in ni_usb_gpib
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/ni_usb_gpib'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/ni_usb_gpib'
make[3]: Nothing to be done for 'install-exec-am'.
/bin/sed -e 's,[@]sbindir[@],/usr/local/sbin,g' -e 's,[@]datadir[@],/usr/local/share,g' -e 's,[@]hotplug_usb_conf_dir[@],/usr/local/etc/hotplug/usb,g' < ./99-ni_usb_gpib.rules.in >99-ni_usb_gpib.rules
/bin/sed -e 's,[@]sbindir[@],/usr/local/sbin,g' -e 's,[@]datadir[@],/usr/local/share,g' -e 's,[@]hotplug_usb_conf_dir[@],/usr/local/etc/hotplug/usb,g' < ./ni_usb_gpib.in >ni_usb_gpib
test -e /usr/local/etc/hotplug/usb/ni_usb_gpib ||\
/usr/bin/install -c -D ni_usb_gpib /usr/local/etc/hotplug/usb/ni_usb_gpib
test -e /usr/local/etc/hotplug/usb/ni_usb_gpib.usermap ||\
/usr/bin/install -c -m 644 -D ./ni_usb_gpib.usermap /usr/local/etc/hotplug/usb/ni_usb_gpib.usermap
/usr/bin/install -c -d /usr/local/share/usb/ni_usb_gpib
test -d /usr/local/etc/udev/rules.d && test -e /usr/local/etc/udev/rules.d/99-ni_usb_gpib.rules ||\
/usr/bin/install -c -m 644 -D 99-ni_usb_gpib.rules /usr/local/etc/udev/rules.d/99-ni_usb_gpib.rules
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/ni_usb_gpib'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb/ni_usb_gpib'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb'
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb'
make[3]: Nothing to be done for 'install-exec-am'.
test -d /usr/local/etc/udev/rules.d && test -e /usr/local/etc/udev/rules.d/99-gpib-generic.rules ||\
/usr/bin/install -c -m 644 -D ./99-gpib-generic.rules /usr/local/etc/udev/rules.d/99-gpib-generic.rules
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user/usb'
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-user'
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
That's the user part (application support). What about the kernel part (hardware drivers)? You also need to run bootstrap ... make install there.

Offline bingo600Topic starter

  • Super Contributor
  • ***
  • Posts: 1988
  • Country: dk
What version of linux-gpib are you using ?

I think the latest , at least SVN. Has been modified quite a lot to make a totally new kernel/userspace layer.
That's quite new software

/Bingo
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Not just SVN, also the latest release (4.2.0). Aren't the current changes mostly about moving things around, rather than about substantial changes?

The bottom line is that you need to install both the user and kernel parts. Looks like the installation instructions for each are similar (bootstrap, configure, make, make install). So try doing those steps (as described in the first post) in the linux-gpib-kernel directory now, and then continue with depmod etc.

Offline Zigzar

  • Newbie
  • Posts: 8
  • Country: gb
Installing the kernel parts seems to be having problems.

./bootstrap :
Code: [Select]
pi@raspberrypi:~/linux-gpib/linux-gpib-code/linux-gpib-kernel $ sudo ./bootstrap
configure.ac:19: installing './config.guess'
configure.ac:19: installing './config.sub'
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'

./configure :
Code: [Select]
pi@raspberrypi:~/linux-gpib/linux-gpib-code/linux-gpib-kernel $ sudo ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking Linux kernel directory... configure: WARNING: Linux kernel directory /lib/modules/4.14.79-v7+/build/ does not exist.  Specify using --with-linux-srcdir=DIR.
configure: WARNING: Kernel source tree at /lib/modules/4.14.79-v7+/build/ is not configured.  Copy the
appropriate configuration file to /lib/modules/4.14.79-v7+/build//.config and then run 'make oldconfig'
in the kernel source directory.
ok
checking Linux kernel compile flags... make: *** /lib/modules/4.14.79-v7+/build/: No such file or directory.  Stop.
configure: WARNING: Failed to get compile flags from Linux kernel directory.
ok
checking for depmod... /sbin/depmod
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating drivers/Makefile
config.status: creating config.h

make :
Code: [Select]
pi@raspberrypi:~/linux-gpib/linux-gpib-code/linux-gpib-kernel $ sudo make
make  all-recursive
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel'
Making all in drivers
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make -C /lib/modules/4.14.79-v7+/build/ V=1 modules\
CC=" -I/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel -I/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/compat/include" \
CONFIG_GPIB_ISA="no" \
SUBDIRS="/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers/gpib"
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make[3]: *** /lib/modules/4.14.79-v7+/build/: No such file or directory.  Stop.
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
Makefile:416: recipe for target 'all-local' failed
make[2]: [all-local] Error 2 (ignored)
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel'
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel'
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel'

make install :
Code: [Select]
pi@raspberrypi:~/linux-gpib/linux-gpib-code/linux-gpib-kernel $ sudo make install
Making install in drivers
make[1]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make -C /lib/modules/4.14.79-v7+/build/ V=1 modules\
CC=" -I/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel -I/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/compat/include" \
CONFIG_GPIB_ISA="no" \
SUBDIRS="/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers/gpib"
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make[2]: *** /lib/modules/4.14.79-v7+/build/: No such file or directory.  Stop.
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
Makefile:416: recipe for target 'all-local' failed
make[1]: [all-local] Error 2 (ignored)
make[2]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make[2]: Nothing to be done for 'install-exec-am'.
make  install-data-hook
make[3]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make -C /lib/modules/4.14.79-v7+/build/ V=1 modules_install\
CC=" -I/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel -I/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/compat/include" \
SUBDIRS="/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers/gpib" INSTALL_MOD_DIR="gpib"
make[4]: Entering directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
make[4]: *** /lib/modules/4.14.79-v7+/build/: No such file or directory.  Stop.
make[4]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
Makefile:427: recipe for target 'install-data-hook' failed
make[3]: *** [install-data-hook] Error 2
make[3]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
Makefile:348: recipe for target 'install-data-am' failed
make[2]: *** [install-data-am] Error 2
make[2]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
Makefile:303: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/pi/linux-gpib/linux-gpib-code/linux-gpib-kernel/drivers'
Makefile:364: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

If it wasn't already painfully obvious, i'm a complete newbie to most of this stuff!
So the help is really appreciated.

Thanks!
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
I won't be able to give you step-by-step instructions, since I don't use a Raspberry PI. You are trying to build drivers for the specific kernel you are currently running. Linux is developed with the idea that all drivers will be integrated in the mainline kernel. There is no generic interface that allows the same driver binaries to work on different versions / machines, like the Windows Driver Model. You have to build the binary drivers from source for the exact version and configuration of the kernel you are running. For the drivers to be able to do this, they need headers of the kernel version that you are running.

First try if these instructions work: sudo apt-get install raspberrypi-kernel-headers. That make take quite a while. If that appears to succeed, try to run configure etc again for linux-gpib-kernel.

If that doesn't work, try option #2 from these instructions.
 
The following users thanked this post: Zigzar

Offline Zigzar

  • Newbie
  • Posts: 8
  • Country: gb
That worked!
Modprobe runs happily, thank you!

Now after I update the firmware with fxload twice, the adapter lights come on.

gpib_config is erroring out, like below:
Code: [Select]
pi@raspberrypi:~ $ sudo gpib_config
failed to configure boardtype: ni_pci
failed to configure board
main: Invalid argument

I copied the /etc/gpib.conf from above.
So looks like this:
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 = "agilent_82357b"
        master = yes                    /*interface board is system controller*/
        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 */

}

Any ideas?

As always, thank you so much for the help!
 

Offline z01z

  • Regular Contributor
  • *
  • Posts: 151
Please make sure you don't have an interface section with an 'ni_pci' board in your config file.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf