[Gambas-user] Serial Port : Binary

Daniel daniel.campos at ...338...
Fri Aug 6 16:41:18 CEST 2004


El vie, 06-08-2004 a las 05:02, Budi Arief Gusandi escribió:
> Dear,
> 
> How can i send and receive data in binary mode ? I just bought a new  
> smartcard reader and there're no ascii command protokol, There are only  
> Binary Hexa commands. Can you help me how to send data like 0xBA, 0x2D etc  
> ? Sending it using ASCII doesnt work.
> 

You can do it easily:

Dim Buffer As String

Buffer= Chr(&HBA) & Chr(&2D) ...

WRITE #MySerial,Buffer,Len(Buffer)

Regards,

Daniel Campos



> Thanks
> 
> Budi





More information about the User mailing list