|  |  |  | @ -16,8 +16,7 @@ int main(int argc, char* argv[]) | 
		
	
		
			
				|  |  |  |  |     req.connection = CONNECTION_WIFI_AP; | 
		
	
		
			
				|  |  |  |  |     req.protocol = 0; | 
		
	
		
			
				|  |  |  |  |     req.ip_address = 0; | 
		
	
		
			
				|  |  |  |  |     //req.port = 10010;
 | 
		
	
		
			
				|  |  |  |  |     req.port = 10242; | 
		
	
		
			
				|  |  |  |  |     req.port = 10010; | 
		
	
		
			
				|  |  |  |  |     const Message msg = set_sdk_connection_req_new(session, &req); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     int sockfd = socket(AF_INET, SOCK_DGRAM, 0); | 
		
	
	
		
			
				
					|  |  |  | @ -43,14 +42,10 @@ int main(int argc, char* argv[]) | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // check footer crc
 | 
		
	
		
			
				|  |  |  |  |     uint16_t expected_crc16 = crc16(recvbuff, recvb - 2); | 
		
	
		
			
				|  |  |  |  |     uint16_t actual_crc16 = ntohs(*(uint16_t*)(recvbuff + recvb - 2)); | 
		
	
		
			
				|  |  |  |  |     uint16_t actual_crc16 = *(uint16_t*)(recvbuff + recvb - 2); | 
		
	
		
			
				|  |  |  |  |     if(actual_crc16 != expected_crc16) | 
		
	
		
			
				|  |  |  |  |         fprintf(stderr, "expected crc16 %d got %d", actual_crc16, expected_crc16); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // check hostbyte
 | 
		
	
		
			
				|  |  |  |  |     if(resp->header.receiver != session->hostbyte) | 
		
	
		
			
				|  |  |  |  |         fprintf(stderr, "expected receiver %d got %d", session->hostbyte, resp->header.receiver); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     return 0; | 
		
	
		
			
				|  |  |  |  | } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
	
		
			
				
					|  |  |  | 
 |