[Gambas-user] Help binding to /dev/usbtmc0?

Tobias Boege taboege at ...626...
Sat Jun 29 20:03:29 CEST 2013


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 at ...2809... andy]# echo *IDN?>/dev/usbtmc0
> [root at ...2809... andy]# cat /dev/usbtmc0 
> Rigol Technologies,DSA815,DSA8A151449181,00.01.06.00.05
> ***10 second pause ****
> cat: /dev/usbtmc0: Connection timed out
> [root at ...2809... 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




More information about the User mailing list