title: PyVISA: cannot connect via VICP to LeCroy scope
body: <p>I'm trying to connect to a LeCroy Wavesurfer 400 series via their VICP VISA passport (TCP/IP) with PyVISA 1.7 under Windows7/32bit and NI-VISA 5.4.1:</p>
  
  <pre><code>import visa
  rm = visa.ResourceManager()
  scope = rm.open_resource("VICP::169.254.201.2::INSTR")
  print(scope.query("*IDN?"))
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Warning (from warnings module):
     File "C:\Python27\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1378
        alias_if_exists)</p>
    
    <p>VisaIOWarning: VI_WARN_EXT_FUNC_NIMPL (1073676457): The operation succeeded, but a lower level driver did not implement the extended functionality.</p>
    
    <p>Traceback (most recent call last):
     File "C:\path\scopeTest.py", 
    line 4, in  scope = rm.open_resource("VICP::169.254.201.2::INSTR")</p>
    
    <p>File "C:\Python27\lib\site-packages\pyvisa\highlevel.py", 
    line 1614, in >open_resource
       info = self.resource_info(resource_name)</p>
    
    <p>File "C:\Python27\lib\site-packages\pyvisa\highlevel.py", 
    line 1584, in >resource_info</p>
    
    <p>raise ValueError('Could not parse resource: %s (error code %s)' % >(resource_name, ret))</p>
    
    <p><strong>ValueError: Could not parse resource</strong>: VICP::169.254.201.2::INSTR (error code None)</p>
  </blockquote>
  
  <p>Under LabVIEW connection to and communication with the device under this VICP address works. Also, when using <code>TCPIP::</code> instead of <code>VICP::</code> in <code>open_resource()</code> connection is established without warnings and errors and <code>print(scope.ask("*IDN?"))</code> works, but other device commands as <code>scope.write("C1:VDIV .02")</code> do not work</p>
  
  <pre><code>print(scope.query("C1:VDIV .02"))
  WARNING : CURRENT REMOTE CONTROL INTERFACE IS TCPI
  </code></pre>
  
  <p>concluding that for correct device control the VICP passport has to be used.
  When using PyVISA 1.5 but otherwise same configuration and trying to connect via:</p>
  
  <pre><code>scope = visa.instrument("VICP::169.254.201.2::INSTR")   
  </code></pre>
  
  <p>gives:</p>
  
  <blockquote>
    <p>Warning (from warnings module):
     File "C:\Python27\lib\site-packages\pyvisa-1.5-py2.7.egg\pyvisa\ctwrapper\functions.py", line 1208
        alias_if_exists)</p>
    
    <p>VisaIOWarning: VI_WARN_EXT_FUNC_NIMPL (1073676457): The operation succeeded, but a lower level driver did not implement the extended functionality.</p>
    
    <p>Warning (from warnings module):<br>
     File "C:\Python27\lib\site-packages\pyvisa-1.5-py2.7.egg\pyvisa\highlevel.py", line 315
       return Instrument(resource_name, resource_manager=self, **kwargs)</p>
    
    <p>UserWarning: given resource was not an INSTR but Unknown</p>
  </blockquote>
  
  <p>For earlier versions of PyVISA this was discussed for an empty string return of the instrument:</p>
  
  <p><a href="http://osdir.com/ml/python.pyvisa.devel/2007-07/msg00003.html" rel="nofollow">http://osdir.com/ml/python.pyvisa.devel/2007-07/msg00003.html</a><br>
  and<br>
  <a href="http://sourceforge.net/p/pyvisa/bugs/5/" rel="nofollow">http://sourceforge.net/p/pyvisa/bugs/5/</a></p>
  
  <p>I suspect the problem to be the <strong>InterfaceType</strong> in <em>C:\Python27\lib\site-packages\pyvisa\constants.py</em> not to exist for the VICP connection protocol in PyVISA. When <code>resource_info()</code>, the line that throws the error, in <em>C:\Python27\lib\site-packages\pyvisa\highlevel.py</em> is called</p>
  
  <blockquote>
  <pre><code>def resource_info(self, resource_name):  
         """Get the extended information of a particular resource
  
        :param resource_name: Unique symbolic name of a resource.
  
        :rtype: :class:`pyvisa.highlevel.ResourceInfo`
        """
        ret, err = self.visalib.parse_resource_extended(self.session, resource_name)
        if err == constants.StatusCode.success:
            return ret
        raise ValueError('Could not parse resource: %s (error code %s)' %(resource_name, ret))
  </code></pre>
  </blockquote>
  
  <p>seems to result in a mismatch with the <em>interface_type</em>, or might it be a problem with the <em>resource_class</em> and a return issue as with the older versions of PyVISA?</p>