Menu

#25 Raspberry Pi 3 B+ and NI USB-GPIB-HS communication using linux gpib

v1.0 (example)
open
DaveP
None
9
2019-06-21
2019-06-07
No

Hi,

I am trying to get a communication between a Raspberry Pi 3 B+ and NI USB-GPIB-HS.

I have downloaded the latest linux gpib 4.2.0 and my pi is running on the latest 4.19.46-v7+ kernel. I have been through tons of tutorial but none could get my communication working properly, as it turns out that they might have been out-dated by now.

Do you have any specific procedure I can follow in order to make this working?

Thanks,

GT18

Related

Support Requests: #25

Discussion

  • Frank Mori Hess

    Frank Mori Hess - 2019-06-10

    You'll have to provide more detailed information about what errors you are encountering. One thing is, I believe the udev scripts in your version fail to run gpib_config unless the ni_usb_gpib kernel module is already loaded when the gpib adapter is plugged in.

     
  • Giorgos Tsapparellas

    Hi Frank,

    Thanks for getting back.

    So I have managed to get the linux-gpib installed and recognize my device.

    However, I am now getting the error of Segmentation fault when promtping the command gpib_config.

    Any thoughts why this is caused?


    Edit: I run dmesg command and outptut is in screen shot. Problem is coming from ni_usb_hs_wait_for_ready function from ni_usb_gpib.c file.

    Hope that helps!

     

    Last edit: Giorgos Tsapparellas 2019-06-13
    • Frank Mori Hess

      Frank Mori Hess - 2019-06-14

      Not sure, there was an arm dma issue but it should have already been fixed
      in 4.2.0. Do you see any kernel oops/backtrace in the output of dmesg
      after the segfault?

      On Thu, Jun 13, 2019, 06:44 Giorgos Tsapparellas gtsapparellas18@users.sourceforge.net wrote:

      Hi Frank,

      Thanks for getting back.

      So I have managed to get the linux-gpib installed and recognize my device.

      However, I am now getting the error of Segmentation fault when promtping
      the command gpib_config.

      Any thoughts why this is caused?

      Status: open
      Group: v1.0 (example)
      Created: Fri Jun 07, 2019 04:05 PM UTC by Giorgos Tsapparellas
      Last Updated: Mon Jun 10, 2019 08:17 PM UTC
      Owner: DaveP

      Hi,

      I am trying to get a communication between a Raspberry Pi 3 B+ and NI
      USB-GPIB-HS.

      I have downloaded the latest linux gpib 4.2.0 and my pi is running on the
      latest 4.19.46-v7+ kernel. I have been through tons of tutorial but none
      could get my communication working properly, as it turns out that they
      might have been out-dated by now.

      Do you have any specific procedure I can follow in order to make this
      working?

      Thanks,

      GT18

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/linux-gpib/support-requests/25/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #25

  • Frank Mori Hess

    Frank Mori Hess - 2019-06-14

    Ok, I just built and tried linux-gpib 4.2.0 on a raspberry pi using a 4.19.42-v7+ kernel (the raspberrypi-kernel and raspberrypi-kernel-headers packages in Raspberrian). I was unable to reproduce your problem, gpib_config worked fine with a gpib-usb-hs+.

    Can you zero in on where the NULL dereference is happening in the ibioctl function? You could add some printk to debug ibioctl() in drivers/gpib/sys/osfuncs.c.

     
  • Giorgos Tsapparellas

    Ok, so I was trying to debug using gdb and it seems that device (gpib-usb-hs) cannot be configured propoerly. See attached photo for the backtrace.

    I am also using linux-gpib 4.2.0 on a raspberry pi using a 4.19.50-v7+ kernel (the raspberrypi-kernel and raspberrypi-kernel-headers packages in Raspberrian).

    By the way, I have also tried communicating with the gpib-usb-hs on Windows with NI VISA tool and is working fine (so this is not a hardware fault!!).

     
  • Frank Mori Hess

    Frank Mori Hess - 2019-06-21

    The null dereference is happening in the kernel, gdb isn't going to be able to see anything after the call to ioctl(). The ioctl call will result in the ibioctl function getting called in the kernel module, that is why I suggested adding some printk in osfuncs.c. Judging by your gdb output, you should see ibioctl() getting called with cmd parameter set to IBMUTEX, which should then result in a call to mutex_ioctl().

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.