www.linksprite.com 1. Overview 3YV 9%68 ;* MW E ;0%2 1SHYPI [MXL 9%68 WIVMEP MRXIVJEGI LS-UART-WiFi is a WLAN Module with UART serial interface by LinkSprite (www.linksprite.com). 1.1. Main Functions 1.1.1 Summary SOC chip based solution: cost-effective high quality and stable, built-in WiFi protocol stack and •...
www.linksprite.com 1.2.2. Wireless Monitoring and Control System Serial device networking through TCP/IP has been popular for industrial networking. However, with wired communication, deployment of new wires and the following construction often become a bottleneck. In contrast, WLAN can be embedded in the monitoring and control terminals, therefore, reduces the wire deployment and construction cost.
www.linksprite.com Parameter management 2.2. WLAN module provides for user parameters reconfiguration. These parameters are used to control the module operation. Parameters are divided into two types: system parameters and network parameters. System Parameters These parameters are used to control the working mode of the module, it include: Networking Mode: WLAN module supports two modes: automatic networking and manual networking.
www.linksprite.com Connection Mode 2.3. WLAN module supports two connection modes: automatic mode and manual mode for users to choose from. It needs to be noted that in the 1.3 and older versions, when the WLAN module is set to TCP Link Layer format, the process of connection automatically includes the process of connection with the TCP server.
www.linksprite.com In the automatic mode, all connection process is automatically completed by WAN module without any user intervention. This makes it very easy to use for users. To successfully connect the network, users only need to set at least one group of basic parameters in the first use. Then WLAN module will automatically scan the network after each power-on reset.
www.linksprite.com In the manual connection mode, users need to control connection and disconnection of WLAN module through user command. Encryption 2.4. WLAN module supports three encryption modes: WEP, WPI, and CCMP, and the non encrypted OPEN mode. In the WEP encryption mode, user can set 4 sets of key, and choose one set as default key. The length of the key can be 64 bit or 128 bit.
www.linksprite.com 2.5.2. UDP format UDP (User Data Protocol) is a connectionless data transmission protocol in the TCP/IP protocol stack. UDP protocol supports unreliable data transmission, and does not guarantee the integrity of the data. But UDP uses little network source and processes data fast. Therefore, it is suitable for applications that require real-time but low-integrity data transmission, such as audio and video data transmission.
Page 13
www.linksprite.com Transparent Transmission Mode In UDP format, WLAN module also supports transparent transmission mode. Transparent transmission means that the WLAN module transmits “transparently” the data it receives from the serial user port to the network. The data transmission model is as following: The module must meet all the following conditions before it can work in the transparent transmission mode: 、...
www.linksprite.com 、 UDP Link Layer data format is used; WLAN module is in successful connection status; 、 It must be noted that once the WLAN module enters the transparent transmission mode, it cannot receive user’s command from the UART serial port. (In testing or demonstration using the simulation environment, please turn off the WLAN module client software, and use general- purpose serial tools, such as Hyper Terminal, serial debugging assistant etc.
Page 15
www.linksprite.com Disable TCP Monitoring After associating with the AP, the WLAN module automatically connects to the server defined in the network parameters, and returns the message of successful connection to user. If the connection fails, it returns a failure message. The procedure of the WLAN module is the same as that in Version 1.3 and older versions which do not support the TCP Monitoring mode.
www.linksprite.com 3. Testing Guide WLAN cannot work properly until it is embedded in a system. We support the following simulation environment for users to do the functional testing of the module. 3.1. Summary All the testing environments consist of the following devices: Tester 1 It is used to run the client software of WLAN module, and communicates with WLAN module through the computer serial port.
www.linksprite.com It is used to run the server software of WLAN module. This computer must have network connection. The functions include: c onduct the data transmission testing with client software; 、 U se as server for online update of the WLAN module firmware. 、...
www.linksprite.com Sending control command Control commands can be sent to WLAN module by clicking the buttons, the supported commands include scanning network, join network, leave network, parameter configuration, reset. Receiving control message It analyzes the control message it receives, and displays the result in the export window. Parameters configuration It analyzes and modifies the system parameters and the seven groups of network parameters of WLAN module.
www.linksprite.com The server software runs on the computer with a WLAN connection. When the computer and the WLAN module both connect to a network defined by an AP, the server software can do the data transmission testing with the client software. UDP Testing First set up a UDP server and set the Link Layer data format of WLAN module to UDP.
www.linksprite.com 、 Click the “parameter configuration” button (Please do not set the parameter during transmission). Choose parameter index 、 Check the box of encryption setting, and modify the encryption method. 、 Click the “Save” button. 、 Modification is finished. 、 3.4.2.
Page 21
www.linksprite.com Network parameters include the parameters needed to connect to AP and server. This module supports 7 groups of network parameters. These parameters are defined as follows. Parameter Index This is the group number of the network parameter. Channel 、 S SID 、...
Page 22
www.linksprite.com Transparent Transmission Mode This is the transmission format of the serial data. This transmission mode can be set to enabled or closed. It must be noted that the transparent transmission mode can only be supported when automatic connection mode is used and the server data format is UDP. Otherwise, this parameter can be ignored.
Page 23
www.linksprite.com In automatic mode, all process of connection is automatically completed by the WLAN module without user’s intervention. User only needs to set at least one group of network parameters before first use. Then the WLAN module will automatically scan network after power-on reset. If it finds a target network, it automatically connects and sends out an confirmation message of a successful connection, as shown here.
Page 24
www.linksprite.com 、 C lick the “Join” button; C hoose the group number of the network parameters, then click “OK”; 、 C onnect successfully 、 ; Disconnect the connection C lick “Leave” button; 、 D isconnect successfully; 、 Scan the network 24 / 50...
www.linksprite.com c lick “Scan” button; 、 、 r eturn the scan result; 3.7. TCP Monitor Mode Test A ccurately set the network parameters, and enable TCP monitor mode; 、 W LAN module gets in monitor status after a successful connection; 、...
Page 26
www.linksprite.com T ype in random character string in the input window of the client software, click “TXT send”, 、 then click the “TCP connection” button and choose “disconnect” to disconnect the TCP connection, as shown below. I n the Internet Explorer window, the character string that was typed in the client software is 、...
Page 28
www.linksprite.com 3.9. Document Transmission Test The client and server software also support the document transmission. As an example, the process that the client sends a document to the server is shown below. 28 / 50...
Page 29
www.linksprite.com It is noted that when WLAN module uses UDP data format, document transmission is only supported from the client to the server. Due to uncertainty, document transmission may be incomplete. To ensure the transmission reliably, TCP format is suggested. 3.10.
Page 30
www.linksprite.com Scan network manually, be sure the target network can be found; Check if the wireless mode of AP is set to B mode or B/G mixed mode. 、 Network configuration parameters of the AP is not correct Check the configuration of WLAN module, ensure channel, BSSID, SSID, and encryption setting is the same as the setting of AP.
Page 31
www.linksprite.com Check if the encryption method and key setting in network parameters are consistent with the setting of AP; Check if IP address of device, IP address of server and service port in network parameters are set correctly; Check if the firewall of the computer which the server software runs in is turned off; Question: What is the relationship between the IP address of the network card of the computer which the client software runs in and the device IP address defined in the configuration parameters of the WLAN module?
www.linksprite.com 4. Serial Protocol 4.1. Summary Interface Data: The format and transmission mechanism of the data transmitted between a user terminal and a WALN module through UART serial is defined in the corresponding serial protocol. Serial data may include control data and user data. Control Data: The definition and transmission mechanism of control data between a user terminal and a WALN module is defined in the User Serial Control protocol.
Page 33
www.linksprite.com : Synchronized Field, it indicates the start of a data frame, the fixed value is ‘0xAA’. : Control Field, its meaning is as follow, TYPE F rame type, : : : : 000b indicates control data 001b indicates common data 010b indicates the ACK acknowledgement to the previous frame.
www.linksprite.com Send/response Mode The data frame whose A is set to ‘1’ uses this transmission mode. The sender needs to wait for ACK from the receiver after the sender has sent a frame of data. Then it starts to send the next frame as following: Continuous sending mode The data frame whose A is set to ‘0’...
www.linksprite.com flow control n one : 4.3. User Serial Control Protocol 4.3.1. Data Format This protocol is used to define the format of the control data transmitted through UART user serial port. Control data includes the following two types, COMMAND and MESSAGE. COMMAND: The receiver must execute the command it receives.
www.linksprite.com 000100b I nquire the parameters : 000101b R eset/ initialization : 000110b T CP connection : 000111b T CP failed transmission : Others : R eserved PARAMETERS : They are defined differently according to the TYPE and SUBTYPE. 4.3.2. Command to Scan Network 0 x00 :...
www.linksprite.com In versions newer than 1.53, this parameter is defined as signal strength, and is used to return the strength of signal of the target network. The range of its value is 0~255, ‘0’ indicates strongest signal, ‘255’ indicates weakest signal. C hannel number :...
www.linksprite.com SSID S SID of network : 4.3.6. Command to disconnect network 0 x02 : d isconnects normally : , Others d isconnect abnormally. , 4.3.7. Message of Network Disconnected 0 x42 : d isconnects normally : , Others d isconnect abnormally. ,...
Page 39
www.linksprite.com : 0 x03 G roup number of network parameter. The value range is 0xb1~0xb7 representing 1st~7th : group of parameters. Parameter PB is an optional field. It can be ignored when only setting system parameters. P arameter ID d efined in the following table. :...
Page 40
www.linksprite.com 0xa9 Transparent transmission mode 0xaa TCP monitor mode … Reserved (* the parameters set by the manufacturer can only be read by user) L ength of INFO field : INFO : P arameter content 4.3.9. Message of Setting Parameters 0 x43 :...
www.linksprite.com 0 x44 : G roup number of network parameter : P arameter ID. Its definition is same as setting parameter : L ength of INFO field : INFO P arameter content : 4.3.12. Reset Order 0 x05 : N ot defined :...
www.linksprite.com R eset type: 0 h ardware reset, 1 s oftware reset, others n ot defined. : - - - V ersion, value fixed to 0x76 : INFO C haracter strings of firmware version. : 4.3.14. Command to connect a TCP connection :...
www.linksprite.com 0 x47 : N o defined : 4.4. Configuration parameters WLAN module’s configuration parameters are defined as follows. 4.4.1. System parameters Baud rate Its length is 1 byte. It defines the baud rate of the UART serial port in bps, 19200 3 8400 5 7600...
Page 44
www.linksprite.com SSID Its length is variable, but not longer than 32 bytes. It defines SSID of the target network. Privacy Type Its length is 1 byte. It defines the encryption method of WLAN module. Its definition is as following: Value Description Not encrypted CCMP...
www.linksprite.com SubnetGate Its length is 4 bytes. It defines the subnet gate IP address of the network which the WLAN module is in, and its format is as above. It needs to note that, according to the specific SubnetMask value, the valid data filed length of SubnetGate is different and others are ignored.
Page 46
www.linksprite.com The explanation of content is, Example 2: Connect to the target network defined in the first group of parameters. Create the following command, where the highlighted blue part is to connect (01) to first group of parameters (01). The returned message of successful connection is The explanation content is, Connect successfully 46 / 50...
www.linksprite.com Channel : BSSID 0 0-1a-70-35-b9-32 : SSID s tauart_wrv_wep128 : 4.5.2. Example of Parameters Setting Example 1: Set the first group of network parameters as following: BSSID 0 0-1a-70-35-b9-32 : Channel : SSID s tauart_wrv_wep128 : Encryption type W EP :...
www.linksprite.com INT8U GetCrc8(INT8U *ptr, INT32U len) INT8U crc8,data; crc8=0; while(len--!=0) data = *ptr++; crc8=__crc8_tbl[crc8^data]; return crc8; 4.6. Serial Protocol Modification Notes Version 1.3 modification from Version 1.0 T he largest value of LENGTH field in data format definition of UART serial protocol is 、...
Page 50
www.linksprite.com )PIGXVSRMGW GSQ -RG LinkSprite Technologies, Inc. )EWX 4EVO %ZI 'SPYQFMERE 3, 1 410 Cannon Mountain Dr, Longmont, CO 80503 : 720-204-8599 : KIRIVEP$IPIGXVSRMGW Email s ales@linksprite.com : WYTTSVX$IPIGXVSRMGW Support s upport@linksprite.com : [[[ IPIGXVSRMGW w ww.linksprite.com : 50 / 50...
Need help?
Do you have a question about the UART2WF and is the answer not in the manual?
Questions and answers