DaveP - 2026-02-24

Hi Patrick,
Thanks for this. Normally even if the driver complains about the unexpected
values it should still work. The only difference is that it spits out the
unexpected data messages.
cheers,
-Dave

On Tue, 24 Feb 2026 at 11:21, Joe godlike3539@users.sourceforge.net wrote:


[patches:#15] https://sourceforge.net/p/linux-gpib/patches/15/ (Fake)
NI-GPIB-HS almost works

Status: unread
Group: Unstable (example)
Created: Tue Feb 24, 2026 10:21 AM UTC by Joe
Last Updated: Tue Feb 24, 2026 10:21 AM UTC
Owner: nobody

When using a fake NI GBIB adapter, I got the same dmesg error as this
https://sourceforge.net/p/linux-gpib/mailman/linux-gpib-general/thread/CAL%3DkjP2bdadNdEqmm613utk-ibc81tR6esQnf-ZDQdyj_kfNqg%40mail.gmail.com/#msg59194313
guy in the mailing list. Specifically,
[ 5.317767] usb 1-1.6: ni_usb_gpib: unexpected data: buffer[6]=0x19,
expected 0x2, 0xe, 0xf or 0x16
[ 5.318304] usb 1-1.6: ni_usb_gpib: unexpected data: buffer[10]=0x59,
expected 0x96, 0x07 or 0x6e.

I was able to get it to work by modifying ni_usb_gpib.c to also accept the
'unexpeted' reply:

//Line 2088 // NI-USB-HS+ sends 0xf or 0x19 here, FAKE sends 0x15 if (buffer[j] != 0x2 && buffer[j] != 0xe && buffer[j] != 0xf && buffer[j] != 0x15 && buffer[j] != 0x16 && buffer[j] != 0x19) { dev_err(&usb_dev->dev, "unexpected data: buffer[%i]=0x%x, expected 0x2, 0xe, 0xf, 0x15, 0x16 or 0x19\n", j, (int)buffer[j]); unexpected = 1; }

//Line 2119 if (buffer[++j] != 0x0) { // [10] MC usb-488 sends 0x7 here, new HS+ sends 0x59 ready = 1; // Fake NI USB GPIB sends 0xa6 if (buffer[j] != 0x96 && buffer[j] != 0x7 && buffer[j] != 0x6e && buffer[j] != 0x59 && buffer[j] != 0xa6) { dev_err(&usb_dev->dev, "unexpected data: buffer[%i]=0x%x, expected 0x96, 0x07, 0x6e, 0x59 or 0xa6\n", j, (int)buffer[j]); unexpected = 1; } }

After this, I did not notice any problems with the adapter talking to an
HP3852A. Maybe consider updating this in the codebase.

Regards,
Patrick


Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/linux-gpib/patches/15/

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

 

Related

Patches: #15