Seeking testers with ines board
dave penkler <[email protected]> Mon, 9 Oct 2023 18:27:20 +0200
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <CAL=kjP0DdOW6StcmyxXZ8kEQse0c-kozVoGoUYvmHdjSLgUDSg@mail.gmail.com> |
Subsequent to some testing in regard to the issue INES GPIB-PCI board: bugs in ver. 4.3.4 and above, I have become suspicious of the implementation of iblines in the ines driver. To confirm or alleviate my suspicions would you please be so kind as to run the following tests: With a device capable of receiving commands attached to the bus please send the output of 1) findlisteners findlisteners: Scanning pads from 0 to 30 on minor 0 Listener at pad 0 (board) Listener at pad 7 findlisteners: 1 device found. and the following attached programme line_test.c. 2) line_test ibsta 0x0120 ibgts ibsta 0x0120 ibsic ibsta 0x0120 lines 0x10ff ibsta 0x0170 ibcac ibsta 0x0170 lines 0x52ff ibsta 0x0120 ibgts ibsta 0x0120 lines 0x10ff To compile the attached programme: cc -o line_test line_test.c -lgpib If your ines board is not at minor 0 both programs take the -m option to specify an alternative minor. Thanks, -Dave _______________________________________________ Linux-gpib-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
line_test.c
(text/x-csrc, 1.5 KB)
/* Agilent/Keysight 82357B ibsta test programme Version 2 */
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/time.h>
#include <getopt.h>
#include <gpib/gpib_user.h>
#include <gpib/ib.h>
char *myProg;
static void myError(char * mess) {
int erc = ThreadIberr();
fprintf(stderr,"error: %s\n", mess);
fprintf(stderr," - %s\n", gpib_error_string(erc));
if (erc == 0) fprintf(stderr," system error: %s\n",strerror(ThreadIbcnt()));
exit(1);
}
void usage(int brief) {
fprintf(stderr,"Usage: %s [-h] [-m <minor>]\n",
myProg);
if (brief) exit(1);
fprintf(stderr," Default <minor> is 0\n");
exit(0);
}
int main(int argc, char **argv) {
int c,ibsta;
int minor = 0;
short lines;
myProg = argv[0];
while ((c = getopt (argc, argv, "m:h")) != -1) {
switch (c) {
case 'm': minor = atoi(optarg); break;
case 'h': usage(0); break;
default: usage(1);
}
}
ibsta = ibgts(minor,0);
printf("ibsta 0x%04x ibgts\n",ibsta);
ibsta = ibsic(minor);
printf("ibsta 0x%04x ibsic\n",ibsta);
usleep(1000);
ibsta = iblines(minor,&lines);
printf("ibsta 0x%04x lines 0x%04hx\n",ibsta,lines);
ibsta = ibcac(minor,0);
printf("ibsta 0x%04x ibcac\n",ibsta);
ibsta = iblines(minor,&lines);
printf("ibsta 0x%04x lines 0x%04hx\n",ibsta,lines);
ibsta = ibgts(minor,0);
printf("ibsta 0x%04x ibgts\n",ibsta);
ibsta = iblines(minor,&lines);
printf("ibsta 0x%04x lines 0x%04hx\n",ibsta,lines);
exit(0);
}