Configure NI GPIB-USB-HS based on serial number

[email protected]
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <[email protected]>
Greetings, 

I have multiple NI GPIB-USB-HS controllers that I need to use (Ubuntu
18.04 LTS, linux-gpib-4.3.0). I've attached my /etc/gpib.conf and
/etc/udev/rules.d/98-gpib-generic.rules files to show what I currently
have on my system. I was hoping to have a specific serial number
controller assigned to a specific /dev/gpib port. Instead, what I am
seeing is that the first controller that I plug in gets assigned to
/dev/gpib0 and the second gets assigned to /dev/gpib1. So, either I am
doing something wrong, or I totally misunderstand the idea of
configuring the devices based on their serial numbers. 

FYI, whenever I've made edits to the config files, I reboot the computer
to ensure that everything starts fresh. I am hoping that someone can
assist me with this issue. Is it possible to use the serial numbers to
assign a controller to a specified /dev/gpib port? 

Regards, 

Ron

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
gpib.conf (application/octet-stream, 5 KB)
/***********************************************************************
                 GPIB.CONF IEEE488 library config file
                             -------------------

   copyright            : (C) 2002 by Frank Mori Hess
                          (C) 1994 by C.Schroeter
   email                : [email protected]
 ***************************************************************************/
/***************************************************************************
 *    
 *   Syntax:
 *
 *         interface { ... } starts new interface board section
 *         device {...} device configuration
 *
 ***************************************************************************/

/* 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 index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */
	board_type = "ni_usb_gpib"	/* type of interface board being used */
	serial_number = "011A2CD3"
	name = "violet"	/* optional name, allows you to get a board descriptor using ibfind() */
	pad = 0	/* primary address of interface             */
	sad = 0	/* secondary address of interface           */
	timeout = T3s	/* timeout for commands */

	eos = 0x0a	/* EOS Byte, 0xa is newline and 0xd is carriage return */
	set-reos = yes	/* Terminate read if EOS */
	set-bin = no	/* Compare EOS 8-bit */
	set-xeos = no	/* Assert EOI whenever EOS byte is sent */
	set-eot = yes	/* Assert EOI with last byte on writes */

/* settings for boards that lack plug-n-play capability */
	base = 0	/* Base io ADDRESS                  */
	irq  = 0	/* Interrupt request level */
	dma  = 0	/* DMA channel (zero disables)      */

/* pci_bus and pci_slot can be used to distinguish two pci boards supported by the same driver */
/*	pci_bus = 0 */
/*	pci_slot = 7 */

	master = yes	/* interface board is system controller */
}


interface {
	minor = 1	/* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */
	board_type = "ni_usb_gpib"	/* type of interface board being used */
	serial_number = "011F058B"
	name = "red"	/* optional name, allows you to get a board descriptor using ibfind() */
	pad = 0	/* primary address of interface             */
	sad = 0	/* secondary address of interface           */
	timeout = T3s	/* timeout for commands */

	eos = 0x0a	/* EOS Byte, 0xa is newline and 0xd is carriage return */
	set-reos = yes	/* Terminate read if EOS */
	set-bin = no	/* Compare EOS 8-bit */
	set-xeos = no	/* Assert EOI whenever EOS byte is sent */
	set-eot = yes	/* Assert EOI with last byte on writes */

/* settings for boards that lack plug-n-play capability */
	base = 0	/* Base io ADDRESS                  */
	irq  = 0	/* Interrupt request level */
	dma  = 0	/* DMA channel (zero disables)      */

/* pci_bus and pci_slot can be used to distinguish two pci boards supported by the same driver */
/*	pci_bus = 0 */
/*	pci_slot = 7 */

	master = yes	/* interface board is system controller */
}

interface {
	minor = 2	/* board index, minor = 0 uses /dev/gpib0, minor = 1 uses /dev/gpib1, etc. */
	board_type = "ni_usb_gpib"	/* type of interface board being used */
	serial_number = "0130F6F0"
	name = "yellow"	/* optional name, allows you to get a board descriptor using ibfind() */
	pad = 0	/* primary address of interface             */
	sad = 0	/* secondary address of interface           */
	timeout = T3s	/* timeout for commands */

	eos = 0x0a	/* EOS Byte, 0xa is newline and 0xd is carriage return */
	set-reos = yes	/* Terminate read if EOS */
	set-bin = no	/* Compare EOS 8-bit */
	set-xeos = no	/* Assert EOI whenever EOS byte is sent */
	set-eot = yes	/* Assert EOI with last byte on writes */

/* settings for boards that lack plug-n-play capability */
	base = 0	/* Base io ADDRESS                  */
	irq  = 0	/* Interrupt request level */
	dma  = 0	/* DMA channel (zero disables)      */

/* pci_bus and pci_slot can be used to distinguish two pci boards supported by the same driver */
/*	pci_bus = 0 */
/*	pci_slot = 7 */

	master = yes	/* interface board is system controller */
}



/* This is how you might set up a pcIIa board on /dev/gpib1, uncomment to use. */
/*******************
interface {
	minor = 1
	board_type = "pcIIa"
	pad = 0
	sad = 0
	timeout = T3s

	eos = 0x0a
	set-reos = yes
	set-bin = no

	base = 0x2e1
	irq  = 7
	dma  = 1

	master = yes
}
*********************/

/* Now the device sections define the device characteristics for each device.
 * These are only used if you want to open the device using ibfind() (instead
 * of ibdev() )
 */

device {
	minor = 0	/* minor number for interface board this device is connected to */
	name = "voltmeter"	/* device mnemonic */
	pad = 7	/* The Primary Address */
	sad = 0	/* Secondary Address */

	eos = 0xa	/* EOS Byte */
	set-reos = no /* Terminate read if EOS */
	set-bin = no /* Compare EOS 8-bit */
}

device {
	minor = 0
	name = "scope"
	pad = 8
	sad = 0
}
98-gpib-generic.rules (application/octet-stream, 1.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.