From: dave p. <dpe...@gm...> - 2022-01-24 17:56:10
|
On Mon, 24 Jan 2022 at 16:01, Matt Huszagh <hus...@gm...> wrote: > dave penkler <dpe...@gm...> writes: > > > It looks like your setup is still using the default gpib.conf file which > > indeed calls the board by the name "violet". > > If you run gpib_config with a gpib.conf argument different from the > > --sysconfdir path used in your build (default /usr/local/etc) you must > set > > the IB_CONFIG environment variable. > > > > This worked for me: > > > > $ sudo gpib_config -f /home/dave/gpib/gpib.conf > > $ export IB_CONFIG=/home/dave/gpib/gpib.conf > > $ ibtest > > Do you wish to open a (d)evice or an interface (b)oard? > > (you probably want to open a device): b > > enter name of interface board (or device) you wish to open: gpib0 > > trying to open board named 'gpib0' > > You can: > > w(a)it for an event > > write (c)ommand bytes to bus (system controller only) > > send (d)evice clear (device only) > > change remote (e)nable line (system controller only) > > (g)o to standby (release ATN line, system controller only) > > send (i)nterface clear (system controller only) > > ... etc > > > > The default file in my setup in /etc also has "violet" as the board name. > > Not sure why it is not working for you. > > Thanks for the response Dave. > > Unfortunately this is what I tried. Do I possibly need to reload the > kernel module? > > No, that has no effect. The default gpib.conf file (from the template, not the one I select with > IB_CONFIG or gpib_config -f) is read-only on my distribution. Is it ok > that linux-gpib cannot edit this file? > > Yes, it is used only for reading Also, I tried patching linux-gpib to substitute the template > configuration for my own configuration. This achieved the desired > result, but it's not a great solution. > > I can only think that there is an issue with the environment variable IB_CONFIG. Perhaps you can add some printf statements in linux-gpib-user-4.3.4/lib/ibutil.c in the function ibParseConfigFile() line 157 to print out the actual filename it is using and check that it is taking the environment variable into account. You will of course need to rebuild and install the library before testing it. cheers, -Dave |