EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: USBTMC, Can't get device capability and Can't clear buffers
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: (대학원생) 문석호 (물리학과) <msh3069 at unist.ac.kr>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sun, 17 Oct 2021 13:23:43 +0000
Hi,

You are first getting the "Can't get device capabilities"  message, and then later the "Can't clear buffers" message. That is interesting because the code is this:

         if (getCapabilities(pdpvt, pasynUser) != asynSuccess) {
            libusb_close(pdpvt->handle);
            epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize,
                    "Can't get device capabilities: %s", pasynUser->errorMessage);
            return asynError;
        }
         if (clearBuffers(pdpvt, pasynUser) != asynSuccess) {
            libusb_close(pdpvt->handle);
            epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize,
                            "Can't clear buffers: %s", pasynUser->errorMessage);
            return asynError;
        }

Because it prints the "Can't clear buffers" message that means that getCapabilities() actually did succeed at least one time that it tried.  I suggest that you add some debugging printf() statements in getCapabilities() and clearBuffers() to see what arguments are being passed and what the error is.

The error messages also appear garbled or duplicated which may be a clue as to what is wrong.

Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of (대학원생) 문석호 (물리학과) via Tech-talk <tech-talk at aps.anl.gov>
Sent: Sunday, October 17, 2021 3:35 AM
To: tech-talk at aps.anl.gov
Subject: USBTMC, Can't get device capability and Can't clear buffers
  

Hello, 



I try to make epics control system for dg812(Rf signal generator of RIGOL).
The dg812 supported usb commuincation but the protocol is usbtmc so I used drvAsynusbtmc module of asyn. 
However, I faced  some error like below. 





I did the test in centos7 enviroment and the version of asyn is 4-26 and the version of base is 3.14.12.5 .
I also did the test with rasberrypi3 enviroment with same asyn and base version but it shows same error message. 

'Can clear buffer ~' and 'Can't get device capabilities ~'

The most strange thing is about usb mount. When I plug in the usb cable and check the usb mount at /dev, I can check that the usb is succesfully mounted with name 'usbtmc0'. 
However, after I run epics and see the above error, the usb is diconnected so I can't see the 'usbtmc0' at /dev directory.

 That thing happens at centos 7 environment and also in rasberrypi enviroment. 
Can you give me some advice about this error?

Best Regards 

SeokHoMoon




===============================================

Intense Beam and Accelerator Laboratory
Department of Physics
Ulsan National Institute of Science and Technology (UNIST)


50, UNIST-gil, Ulsan 44919, Republic of Korea


E-mail : msh3069 at unist.ac.kr, msh3069 at naver.com
Phone: +82-10-2767-9398

=============================================== 
       

References:
USBTMC, Can't get device capability and Can't clear buffers (대학원생) 문석호 (물리학과) via Tech-talk

Navigate by Date:
Prev: USBTMC, Can't get device capability and Can't clear buffers (대학원생) 문석호 (물리학과) via Tech-talk
Next: Re: aravisGigE driver for AVT Manta camera Knap, Giles (DLSLtd,RAL,LSCI) via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: USBTMC, Can't get device capability and Can't clear buffers (대학원생) 문석호 (물리학과) via Tech-talk
Next: Re: USBTMC, Can't get device capability and Can't clear buffers Eric Norum via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 18 Oct 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·