When using a fake NI GBIB adapter, I got the same dmesg error as this 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
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:
Related
Patches: #15