High-Flying Electronics Technology Co. Ltd HF-A11X Manual De Usuario

Descargar
Página de 62
HF-A11x V3.1 User Manual 
Shanghai High-Flying Electronics Technology Co., Ltd 
www.hi-flying.com 
22

 u32 
cksum=0; 
 
 
 u16 
*p=data; 
 
while (len > 1) 
 { 
   cksum 
+= 
*p++; 
   len 
-=2; 
 } 
 if 
(len) 
 { 
 
 
cksum += *(u8 *)p; 
 } 
 
cksum = (cksum >> 16) + (cksum & 0xffff); 
 
cksum += (cksum >>16); 
 return 
~cksum; 
--------------------------------------------- 
1.4.3. Configuration 
Mode 
In configuration mode, user can finish HF-A11x module configuration management and 
parameters setting work. In work mode (Transparent Transmission or Agreement Transmission), 
user can switch to the configuration mode through AT+instruction, detailed switch operation refer 
to “AT+ instruction set” chapter. 
1.4.4.  Multi-TCP Link Connection 
When HF-A11x module configured as TCP Server, it supports Multi-TCP link connection, and 
maximum 32 TCP clients permit to connect to HF-A11x module. User can realize multi-TCP link 
connection at each work mode.  
 
Multi-TCP link connection will work as following structure: 
Upstream: All dates from different TCP connection or client will be transmitted to the serial port as 
a sequence. 
Downstream: All data from serial port (user) will be duplicate and broadcast to every TCP 
connection or client. 
Detailed multi-TCP link data transmition structure as following figure: 
 
 
Figure 14.  Multi-TCP Link Data Transmition Structure