On Fri, 28 Jun 2013, dr.diesel wrote: > Thanks for the help. That is basically what I've done, expect all I get: > > "System error #110: Connection Timed out" > > I get the same when I cat and echo, but I get the proper response then get > the error: > > [root@dev andy]# echo *IDN?>/dev/usbtmc0 > [root@dev andy]# cat /dev/usbtmc0 > Rigol Technologies,DSA815,DSA8A151449181,00.01.06.00.05 > ***10 second pause **** > cat: /dev/usbtmc0: Connection timed out > [root@dev andy]# > > It appears that it is waiting for more, how to I read only what's there then > exit? > > I've tried a simple Read #hDevice and a While not EOF: > > > Public hDevice As File > Public sLine As String > > > Public Sub Form_Open() > hDevice = Open "/dev/usbtmc0" For Input Output Watch > End > > Public Sub File_Read() > Dim iByte As Byte > > 'Read #hDevice, iByte > 'Print "Got one byte: "; iByte > ' > While Not Eof(hDevice) > Line Input #hDevice, sLine > Print sLine > Wend > End > > Many thanks, any other suggestions? >
I have never seen this error with cat. At least we know for sure that this is not a Gambas problem. Did you read [0]? Regards, Tobi [0] http://www.spinics.net/lists/linux-usb/msg21894.html ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user