I am writing a program to interface with a serial to USB chip with reference CP2102N.
I am using the USBserial library (2.40) and it works well 95% of the time.....but not 100%
The code I use is quite simple <code>
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
The problem is that sometimes I get extra bytes in the interface and taking into account that what I get are communications frames, I am in trouble.
1) How does this library manage an accurate work-flow with the CP2102N chip?
2) How can I get reliable data all the time?
Thanks!
			
			I am using the USBserial library (2.40) and it works well 95% of the time.....but not 100%
The code I use is quite simple <code>
			
				B4X:
			
		
		
		Public usb1 As UsbSerial
…
Dim dev As Int
dev = usb1.Open(460800, 1)
If dev <> usb1.USB_NONE Then
    Log("Connected!")
    astreams1.Initialize(usb1.GetInputStream, usb1.GetOutputStream, "astreams1")
End If
	The problem is that sometimes I get extra bytes in the interface and taking into account that what I get are communications frames, I am in trouble.
1) How does this library manage an accurate work-flow with the CP2102N chip?
2) How can I get reliable data all the time?
Thanks!