title: Python: Get device "model" using pyvisa or pyserial
body: <p>I wrote a data acquisition program/script that works with a device developed by our collaboration. The problem is that I can <em>only read</em> from this device. No writing is possible, so it's not possible to use a serial "?IDN*" command to know what device this is.</p>
  
  <p>The only thing that defines this device is its "Model" that can be seen in "Devices and Printers" in Control Panel of Windows. The following figure shows it:</p>
  
  <p><a href="https://i.stack.imgur.com/QXem9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QXem9.png" alt="enter image description here"></a></p>
  
  <p>The guy who designed the device was able to create a labview simple program that extracts this name from the device through NI-VISA through something called "Intf Inst Name", which is called "Interface Information:Interface Description".</p>
  
  <p>If I get this model name and compare it with the pyvisa device name, I'll be able to automatically detect the presence of our device, which is an important thing to have, in case a USB disconnect happens. This is because VISA opens the device through a name that can be different on every computer, but this name "GPS DATA LOGGER" is the same everywhere and always.</p>
  
  <p>I need this solution to be cross-platform. That's why I need to use pyvisa or pyserial. Though any cross-platform alternative is OK.</p>
  
  <p><strong>So my question in brief</strong>: How can I use pyvisa/pyserial to find the model name corresponding to the device model (in my case "GPS DATA LOGGER")?</p>
  
  <p>Please ask for any additional information you may require.</p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>I learned that there's an "attribute" pyvisa with the name "VI_ATTR_INTF_INST_NAME" that would get this name, but I don't know how to use it. Does anyone know how to read these attributes?</p>