From: Michael J. <mgj...@gm...> - 2024-11-11 20:44:03
|
Yes, there is quite a bit in the console log. I have the debug turned on (and added some statements in myself), but this is pretty much what happens when I plug in the device: [ 9748.976545] usb 1-1.4: new high-speed USB device number 5 using xhci-hcd [ 9749.084858] usb 1-1.4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7 [ 9749.095353] usb 1-1.4: New USB device found, idVendor=3923, idProduct=709b, bcdDevice= 1.01 [ 9749.103769] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 9749.111094] usb 1-1.4: Product: GPIB-USB-HS [ 9749.115289] usb 1-1.4: Manufacturer: National Instruments [ 9749.120690] usb 1-1.4: SerialNumber: 01D9F4A4 [ 9749.210590] Linux-GPIB 4.3.6 Driver [ 9749.386255] ni_usb_gpib driver loading [ 9749.402265] ni_usb_gpib: probe succeeded for path: usb-xhci-hcd.1.auto-1.4 [ 9749.414241] usbcore: registered new interface driver ni_usb_gpib [ 9749.423413] gpib: registered ni_usb_b interface [ 9749.927552] gpib debug: pid 0, gpib: opening minor 0 [ 9749.935625] gpib debug: pid 0, gpib: request module returned 256 [ 9749.942207] gpib debug: pid 0, minor 0, ioctl 39, interface=, use=0, onl=0, arg=f523e908 [ 9749.970918] gpib debug: pid 0, minor 0, ioctl 39, interface=, use=0, onl=0 [ 9749.978472] gpib debug: pid 0, gpib: closing minor 0 [ 9808.492473] gpib debug: pid 0, gpib: opening minor 0 [ 9808.500324] gpib debug: pid 0, gpib: request module returned 256 [ 9808.506433] gpib debug: pid 0, minor 0, ioctl 39, interface=, use=0, onl=0, arg=fb3f8278 When I try to run "gpib_config", it only shows this line: [11325.680770] gpib debug: pid 0, gpib: opening minor 0 [11325.688909] gpib debug: pid 0, gpib: request module returned 256 [11325.695036] gpib debug: pid 0, minor 0, ioctl 39, interface=, use=0, onl=0, arg=ef9596d8 [11325.723526] gpib debug: pid 0, minor 0, ioctl 39, interface=, use=0, onl=0 [11325.730940] gpib debug: pid 0, gpib: closing minor 0 Best Regards, Michael On Mon, Nov 11, 2024 at 1:28 PM dave penkler <dpe...@gm...> wrote: > Hi Michael, > The gpib.conf looks perfect. Somewhere during the configure we are getting > an EFAULT - Bad address. This would point to some incompatibility between > user space gpib_config and the gpib_common kernel module. Is there anything > in the console log (dmesg) ? > cheers, > -dave > > > > On Tue, 12 Nov 2024, 05:28 Michael Jaggers, <mgj...@gm...> wrote: > >> Hey Dave, >> >> I went back and double checked on the configure argument you asked for, >> and I did provide the path to it. I also checked it by putting a syntax >> error into the gpib.conf file and that output an error and the path it was >> pointing to. >> >> Here is the conf file that I'm using: >> >> /* This section configures the configurable driver characteristics >> * for an interface board, such as board address, and interrupt level. >> * minor = 0 configures /dev/gpib0, minor = 1 configures /dev/gpib1, etc. >> */ >> >> interface { >> minor = 0 >> board_type = "ni_usb_gpib" >> name = "gpib0" >> pad = 2 >> timeout = T1s >> eos = 0x0A >> set-reos = yes >> set-bin = no >> master = yes >> >> } >> >> Thanks! >> Michael >> >> On Sat, Nov 9, 2024 at 2:24 AM dave penkler <dpe...@gm...> wrote: >> >>> Hi Michael, >>> It looks like a gpib.conf problem. Did you provide a sysconfdir argument >>> to .configure ? >>> Please send me your gpib.conf file. >>> cheers, >>> -dave >>> >>> On Sat, 9 Nov 2024, 04:38 Michael Jaggers, <mgj...@gm...> wrote: >>> >>>> Dave, >>>> >>>> I've run the gpib_config, but no luck on that end. Here is what happens >>>> to me: >>>> 1. First, I restart the device without plugging in the gpib (drivers >>>> aren't loaded). >>>> root@tester0:~/git/linux-gpib-git# gpib_config >>>> failed to open device file '/dev/gpib0' >>>> main: No such file or directory >>>> >>>> 2. Now, I plug the gpib dongle in. >>>> root@tester0:~/git/linux-gpib-git# gpib_config >>>> failed to bring board offline >>>> failed to configure board >>>> main: Bad address >>>> >>>> 3. Finally, I unplug the gpib dongle. >>>> root@tester0:~/git/linux-gpib-git# gpib_config >>>> failed to bring board offline >>>> failed to configure board >>>> main: Bad address >>>> >>>> To me, this looks like the dongle isn't attaching to /dev/gpib0. I know >>>> the driver recognizes the device, it correctly starts the ni_usb_gpib >>>> driver, and probes the correct location on the device tree, and the driver >>>> in the device tree points to the correct place the dongle is attached to. >>>> What's got me scratching my head is why it's not attached to gpib0 (or even >>>> how to circumvent the need to attach to gpib0). >>>> >>>> Could it be related to my udev? In the rules, in file >>>> "/etc/udev/rules.d/98-gpib-generic.rules" I added: >>>> ACTION=="add|change", >>>> DEVPATH=="/devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4:1.0", >>>> ENV{GPIB_CONFIG_OPTIONS}="--minor 0" >>>> >>>> That's the path that udev recognizes. When I run udevadm monitor, I get >>>> this after plugging in the dongle: >>>> KERNEL[1122.600699] add >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4 >>>> (usb) >>>> KERNEL[1122.650504] add >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4:1.0 >>>> (usb) >>>> KERNEL[1122.671551] bind >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4:1.0 >>>> (usb) >>>> KERNEL[1122.671684] bind >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4 >>>> (usb) >>>> UDEV [1122.676333] add >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4 >>>> (usb) >>>> UDEV [1122.769461] add >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4:1.0 >>>> (usb) >>>> UDEV [1122.772939] bind >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4/1-1.4:1.0 >>>> (usb) >>>> UDEV [1122.777553] bind >>>> /devices/platform/axi/ff9d0000.usb/fe200000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.4 >>>> (usb) >>>> >>>> Could the version of udev be the cause? >>>> root@tester0:~/git/linux-gpib-git# udevd --version >>>> 251.8+ >>>> root@tester0:~/git/linux-gpib-git# udevadm --version >>>> 251 >>>> >>>> Thanks for your responses! >>>> Michael >>>> >>>> On Thu, Nov 7, 2024 at 9:04 PM dave penkler <dpe...@gm...> wrote: >>>> >>>>> It looks like the board is not attached. Did you run # gpib_config ? >>>>> Normally the supplied udev scripts do this for you. >>>>> cheers, >>>>> -dave >>>>> >>>>> On Fri, 8 Nov 2024, 05:24 Charles Lane, <la...@dc...> wrote: >>>>> >>>>>> Setting up the /dev/gpib* devices is something that >>>>>> you might want to look at udev for...but as I recall >>>>>> there's some problems. That isn't necessarily in the >>>>>> linux-gpib git project, maybe in linux-gpib-packaging >>>>>> project....where the idea is to wrap the linux-gpib >>>>>> code in an rpm package (so that installation deals >>>>>> with udev scripts, protection issues, etc) >>>>>> >>>>>> On Thu, 7 Nov 2024 09:51:32 -0700 >>>>>> Michael Jaggers <mgj...@gm...> wrote: >>>>>> >>>>>> > Hello, >>>>>> > >>>>>> > I'm working on installing the gpib kernel drivers to the Petalinux >>>>>> > platform. So far, I've managed to get the headers and get the gpib >>>>>> > drivers compiled + installed. The modules show up with modprobe, and >>>>>> > when I plug my gpib dongle in the driver loads properly and it seems >>>>>> > to recognize it. Below is the message I get when plugging in the >>>>>> > dongle: [19163.768240] usb 1-1.4: new high-speed USB device number >>>>>> 11 >>>>>> > using xhci-hcd [19164.020393] usb 1-1.4: config 1 interface 0 >>>>>> > altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7 >>>>>> > [19164.030876] usb 1-1.4: New USB device found, idVendor=3923, >>>>>> > idProduct=709b, bcdDevice= 1.01 >>>>>> > [19164.039247] usb 1-1.4: New USB device strings: Mfr=1, Product=2, >>>>>> > SerialNumber=3 >>>>>> > [19164.046560] usb 1-1.4: Product: GPIB-USB-HS >>>>>> > [19164.050739] usb 1-1.4: Manufacturer: National Instruments >>>>>> > [19164.056138] usb 1-1.4: SerialNumber: 01D9F4A4 >>>>>> > >>>>>> > Here is where the issue comes up. When ibopen goes to set things up >>>>>> > with the dongle, the /dev/gpib0 doesn't seem to be properly >>>>>> > configured. I get this message when I run the ibtest utility: >>>>>> > [84391.688217] gpib debug: pid 0, gpib: opening minor 0 >>>>>> > [84391.696029] gpib debug: pid 0, gpib: request module returned 256 >>>>>> > [84391.702071] gpib debug: pid 0, minor 0, ioctl 3, interface=, >>>>>> use=0, >>>>>> > onl=0, arg=d8a171a0 >>>>>> > [84391.710090] gpib: no gpib board configured on /dev/gpib0 >>>>>> > [84391.715398] gpib debug: pid 0, minor 0, ioctl 3, interface=, >>>>>> > use=0, onl=0 [84391.722212] gpib debug: pid 0, minor 0, ioctl 5, >>>>>> > interface=, use=0, onl=0, arg=d8a17120 >>>>>> > [84391.730218] gpib: no gpib board configured on /dev/gpib0 >>>>>> > [84391.735527] gpib debug: pid 0, minor 0, ioctl 5, interface=, >>>>>> > use=0, onl=0 [84391.742357] gpib debug: pid 0, minor 0, ioctl 5, >>>>>> > interface=, use=0, onl=0, arg=d8a17180 >>>>>> > [84391.750363] gpib: no gpib board configured on /dev/gpib0 >>>>>> > [84391.755673] gpib debug: pid 0, minor 0, ioctl 5, interface=, >>>>>> > use=0, onl=0 [84391.762675] audit: type=1701 >>>>>> > audit(1730996390.861:20): auid=0 uid=0 gid=0 ses=2 pid=10840 >>>>>> > comm="ibtest" exe="/usr/local/bin/ibtest" sig=6 res=1 [84391.764574] >>>>>> > gpib debug: pid 0, gpib: closing minor 0 >>>>>> > >>>>>> > I've been debugging this for a week or so now. I'm fairly confident >>>>>> > that the probing of the dongle works. In fact, when I find the >>>>>> dongle >>>>>> > in the sys path, I see that the module driver is in that path of the >>>>>> > device itself: root@tester0:~# ls -ll >>>>>> > /sys/bus/usb/drivers/ni_usb_gpib/1-1.4\:1.0/ total 0 >>>>>> > -rw-r--r-- 1 root root 4096 Nov 7 16:25 authorized >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 bAlternateSetting >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 bInterfaceClass >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 bInterfaceNumber >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 bInterfaceProtocol >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 bInterfaceSubClass >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 bNumEndpoints >>>>>> > lrwxrwxrwx 1 root root 0 Nov 7 16:25 driver -> >>>>>> > ../../../../../../../../../../bus/usb/drivers/ni_usb_gpib >>>>>> > drwxr-xr-x 3 root root 0 Nov 7 16:25 ep_02 >>>>>> > drwxr-xr-x 3 root root 0 Nov 7 16:25 ep_06 >>>>>> > drwxr-xr-x 3 root root 0 Nov 7 16:25 ep_81 >>>>>> > drwxr-xr-x 3 root root 0 Nov 7 16:25 ep_84 >>>>>> > drwxr-xr-x 3 root root 0 Nov 7 16:25 ep_88 >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 modalias >>>>>> > drwxr-xr-x 2 root root 0 Nov 7 16:25 power >>>>>> > lrwxrwxrwx 1 root root 0 Nov 7 16:18 subsystem -> >>>>>> > ../../../../../../../../../../bus/usb >>>>>> > -r--r--r-- 1 root root 4096 Nov 7 16:25 supports_autosuspend >>>>>> > -rw-r--r-- 1 root root 4096 Nov 7 16:18 uevent >>>>>> > >>>>>> > root@tester0:~# grep ^ >>>>>> > /sys/bus/usb/drivers/ni_usb_gpib/1-1.4\:1.0/modalias >>>>>> > usb:*v3923p709B*d0101dc00dsc00dp00icFFisc00ip00in00 >>>>>> > >>>>>> > The driver itself tells me that the interface registers properly too >>>>>> > (my apologies for the extra debug messages): >>>>>> > [85375.091233] ni_usb_gpib driver loading >>>>>> > [85375.098301] ni_usb_driver_probe >>>>>> > [85375.101436] set bus interface 0 to address 0x00000000bca009b3 >>>>>> > [85375.107200] ni_usb_gpib: probe succeeded for path: >>>>>> > usb-xhci-hcd.1.auto-1.4 >>>>>> > [85375.119145] usbcore: registered new interface driver ni_usb_gpib >>>>>> > [85375.128308] gpib: registered ni_usb_b interface >>>>>> > >>>>>> > However, everywhere I look in the code doesn't indicate to me where >>>>>> > the disconnect occurs. I'm fairly certain the issue is that the >>>>>> > /dev/gpib* section isn't pointing to the dongle area and that's my >>>>>> > problem. I've been trying to create a workaround to this that shows >>>>>> > the device working at all, but I'm not having any luck there. >>>>>> > So I'm at a loss for where to go next. Any suggestions? RIght now, >>>>>> I'm >>>>>> > trying to figure out why I'm getting "interface=". I feel like >>>>>> that's >>>>>> > the underlying problem, but I can't confirm it. >>>>>> > Just in case, here is some extra information about he system I'm on: >>>>>> > Operating System: PetaLinux 2023.2+update-61_04172258- (langdale) >>>>>> > Kernel: Linux 6.1.30-xilinx-v2023.2 >>>>>> > Architecture: arm64 >>>>>> > >>>>>> > Thanks, >>>>>> > Michael >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Drexel University |/ / · ν · Chuck Lane |D >>>>>> ======]--->---C-----π+--< Disque 911 |U >>>>>> Particle Physics \ \ ~~ e+~~ 215-895-1545 |N >>>>>> la...@dc... -μ+--+νν |E >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Linux-gpib-general mailing list >>>>>> Lin...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general >>>>>> >>>>> _______________________________________________ >>>>> Linux-gpib-general mailing list >>>>> Lin...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general >>>>> >>>> |