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
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.
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
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:
Related
Support Requests: #25
Yes, in fact I'm getting an internal error Oops: 17 [#1] SMP ARM
See attachements for full output of dmesg after the segmentation fault.
Thanks,
GT
Related
Support Requests:
#1Ok, 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.
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!!).
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().