 maydamp2002
		
			maydamp2002
		
		
		
		
		
		
		
		
	
			el 06-25-2007 08:30 AM
 
					
				
		
 jr_2005
		
			jr_2005
		
		
		
		
		
		
		
		
	
			el 06-25-2007 09:16 AM
If you are expecting binary data in your buffer but you are examining it as if it was a string, then a received 0x00 would appear to truncate the buffer at that point. If the function says it is receiving 244 bytes I would tend to believe it.
JR
 Mert_A.
		
			Mert_A.
		
		
		
		
		
		
		
		
	
			el 06-25-2007 12:52 PM
el 06-26-2007 01:58 AM
 
					
				
		
 RobertoBozzolo
		
			RobertoBozzolo
		
		
		
		
		
		
		
		
	
			el 06-26-2007 05:48 AM
How are you determining that there are less than 244 bytes in the string? As JR suggested, if you are using strlen () and in the received string there are some NUL bytes strlen will return a value less than 244 (exactly the position of the first NUL byte in the string).
I suggest you place a breakpoint immediately after ComRd and examine your read_data variable enabling Options >> Display entire buffer and Format >> Decimal options in string display window: this way you will see the entire buffer and be able to examine all the received message eventually beyond the NUL bytes received.
el 06-26-2007 07:30 AM
 
					
				
		
 RobertoBozzolo
		
			RobertoBozzolo
		
		
		
		
		
		
		
		
	
			el 06-26-2007 08:14 AM
Are you sure you activated Options >> Display entire buffer option? 'cause what I see is that of 25000 bytes read_data is made of only the first 94 are shown (up to first nul byte) and nothing else...
As far as I can see you are reading data in blocks of 16 bytes [ read_data[i-1] + (read_data[i] << 😎 ] so your equipment seems to be sending binary data in which values up to 256 are represented as 0+xxx: that is every very little measure introduces a nul byte in the string. It is still possible that JR hipothesys is true.
Anyway, despite the fact that you have determined that less than 244 bytes are available, have you tried to proceed with your decodification loop (where you put the breakpoint)? Did you get erroneous results or some errors?
 
					
				
		
 jr_2005
		
			jr_2005
		
		
		
		
		
		
		
		
	
			el 06-26-2007 08:45 AM
 
					
				
		
 jr_2005
		
			jr_2005
		
		
		
		
		
		
		
		
	
			el 06-26-2007 09:04 AM