Re: Detecting the absence/removal of board (USB device)

dave penkler <[email protected]> Sun, 27 Feb 2022 18:47:35 +0100
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAL=kjP3K3ce10iwvew=gB5_MOEBc0D2GgkfqtPRX5+NNRzSuLg@mail.gmail.com>
Normally I would suggest using  iblines(). But the agilent driver has a bug
returning no error even if there is no board.
It is fixed in the SVN and now returns ibcntl = 19 which is ENODEV
Here is a log of ibtest with the "board" disconnected:

$ 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: hpusb
trying to open board named 'hpusb'
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)
        ta(k)e control (assert ATN line, system controller only)
        get bus (l)ine status (board only)
        go to local (m)ode
        change end (o)f transmission configuration
        (q)uit
        (r)ead string
        perform (s)erial poll (device only)
        change (t)imeout on io operations
        request ser(v)ice (board only)
        (w)rite data string
        send group e(x)ecute trigger (device only)
: l
gpib status is:
ibsta = 0x8120  < ERR CMPL CIC >
iberr= 0
EDVR 0: OS error

ibcntl = 19
You can:...

On Sun, 27 Feb 2022 at 16:43, Michael K via Linux-gpib-general <
[email protected]> wrote:

> I'm using an Keysight 82357B "board" (USB device).
> If the drivers (gpib_common and agilent_82357a) are loaded, ibfind will
> always find the device even after the USB device has been removed.
> (the drivers are loaded upon connection but do not unload when the USB
> device is removed)
> Is there a way to determine if the board is still connected using the API?
> _______________________________________________
> Linux-gpib-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general