the following parts are needed to test the unit: Arduino UNO R3 Arduino Wifi shield And reciever 5V adapter Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield: 1
An Introduction HLK RM04 is a low cost embedded UART ETH WiFi (Serial Ethernet Wireless Network) module. This product is based on the universal serial interface, in line with standard embedded networking module, built in TCP / IP protocol stack, enabling users to serial, Ethernet, wireless networks (WiFi) 3 interfaces between conversions. By HLK RM04 module, the traditional serial devices do not need to change any configuration in the case of transmission through the Internet to their own data. For the user to transfer data via Ethernet serial device provides a fast solution. Functional structure shown below. The main function of the completion kit as shown below: (1) Arduino serial data and Phone / Other WiFi Data communications equipment; (2) PC serial port (RS232 devices) Data and Phone / other WiFi devices for data communication; Two Serial to WiFi (AP) configuration Serial WiFi (AP mode) model as shown below: 2
At this point you can directly use the serial port to WiFi (AP mode), as follows: 1) connect the board to 5V with the 5V adapter. Serial RS 232 Connector connected PC's serial port (direct serial line). Wait module startup. 2) using a mobile phone or a computer's WiFi scanning space of the WiFi signal. To find HI LINK_XXXX (neutral version of the name: Serial WIFI). 3) Add to HI LINK_XXXX (or Serial WIFI). Password is: 12345678, cell phone or computer will automatically obtain IP. 4) Open the phone or computer testing software testing tools for TCP. Connect IP: 192.168.16.254, port: 8080. Send characters: HLK RM04. 3
Note: iphone or android phone search: EasyTCP tool (see Annex), PC software Baidu search: TCP UDP helper (see Annex). 5) PC client opens serial debugging assistant, as shown below: Note: The factory default WiFi, Ethernet are all turned on, then power is relatively large. If Just use the serial to WiFi (AP mode) the conversion, you can configure the following two methods. 4
Configuration Method one: through the serial port configuration 1) first make sure the module is the factory default. Restore factory settings approach to the module is powered up, wait 35 seconds. Then hold down the expansion board RST button more than 6 seconds. 2) re power on to the module, wait 35 seconds, until the flashing lights on the module. With DB9 serial port and the computer's serial port connection directly connected. Or directly with a USB to serial cable to the expansion board. As shown below: 3) Press the "Reset (RST)" button for not more than 5 seconds, and open the configuration software, select the serial number, click on the search module, execute the command and reply back box with>: at (: Found Device at COM8 (115200)! message appears to prove find modules. 5
4) Configuration Parameters Operating mode selection: Wireless AP mode. Network protocol options: we instantiate inside select TCP server. Remote IP: IP as the server when the remote does not work. Port: TCP service listening port open. Serial port parameters: according to their needs revise their required parameters. Network parameters: IP: 192.168.11.254. The default IP and different. The default is 192.168.16.254, Subnet Mask: 255.255.255.0. As shown below. Choose a good configuration parameters, commit the configuration. 6
5) PC WiFi WiFi signal within the search space will find: 7
6) Open the TCP Tools and serial tools Serial port to the network to send and receive normal. 8
Configuration Method Two: Web configuration via WiFi 1) First, restore the factory values. Press and hold any of the buttons on the bottom than six seconds, waiting to start (about 30 Sec). Started using the computer's WiFi scanning space of the WiFi signal, adding WiFi, the password is 12345678. 2) In the browser, enter 192.168.16.254, will pop up to enter a user name and password dialog. Username and password are admin. 9
3) After landing has the following interfaces: 4) we choose WiFi (AP) SERIAL mode. IP into 192.168.11.254. 10
After configuring these parameters and click Apply, commit your changes. 5) After modification, in accordance with a fifth step configuration methods can operate. 11
Three typical applications PC WIFI Mobile (AP Mode) First, according to the following chart the kit connected. Note: WiFi working current of about 300mA, USB interface, power supply may be insufficient, you need to connect the adapter. See all the core modules of the three led lights, and a start blinking, the WiFi to work. Open serial debugging assistant (see Annex), set the baud rate to 115200, N, 8,1 (this is the default frequency), enter the pre sent data transmission area Open the phone WiFi, find HI LINK XXXX signal, click the link, the default password: 12345678. 12
Open EasyTCP software, click connect to the server, enter the default address: 192.168.16.254:8080, appear disconnected words, which means that the connection is successful. Serial port and send data to mobile Internet, communication is normal. As shown 13
Arduino WIFI Mobile The first module of the package according to the following diagram connected. Open the Arduino 1.0.2, the new program, select board: UNO, serial: XX, proceed as follows: void setup () { / / Set baud 9600. Serial.begin (115200); } / / The loop routine runs over and over again forever: void loop () { delay (1000) ;/ / delay 1S while (Serial.available ()) {/ / phone > arduino arduino test phone to send to Serial.write (Serial.read ()) ;/ / show what serial received } delay (3000); / / Serial.write ("arduino wifi test"); / / arduino > phone test arduino Send to Phone } Download process. Remember: Download the program, will be allocated to the expansion board switch O (outside) state, the next Load is completed, the expansion board toggle switch to the C (inside) state. Because arduino download programs because there is an external device serial download fails. In accordance with a program to open the phone on WiFi and EasyTCP software, comment out the red part of the program to test the phone to send to the arduino; turn the blue part of the comment, to test the arduino sent to your phone. arduino serial monitor window in the upper right, open, remember the lower right corner of the new window is adjusted to 115200 baud. Will find that communication is successful, as shown below: 14
Three serial to Ethernet configuration method (requires network interface, see shop) Serial to Ethernet model as shown below: 22
Through the serial port configuration 1) first make sure the module is the factory default. Restore factory settings approach to the module power on, wait 35 seconds. Then Press and hold the two buttons on the bottom of any one of more than 6 seconds. 2) re power on to the module, wait 35 seconds, until the flashing lights on the module. With DB9 serial port and the computer's serial port directly connected Line connected. Or directly with a USB to serial cable to the expansion board. 3) Press the "Exit passthrough / Restore Default" button to not more than 5 seconds, and open the configuration software, select the serial number, click on the search module, execute the command and reply back box with>: at (: Found Device at COM8 (115200)! message appears to prove find modules. 4) Configuration Parameters Operating mode selection: Serial Ethernet. Network protocol options: we instantiate inside select TCP server. Remote IP: IP as the server when the remote does not work. Port: TCP service listening port open. Serial port parameters: according to their needs revise their required parameters. Tips: Enable DHCP: DHCP is enabled, the module from the router access to IP, this time to log into the router. Find module's IP, to communicate. This time if you want to use the network cable directly connected with the PC is no way to communicate. 23
Do not enable DHCP: fill needs its own IP address, you need to know the IP address of the router specifications. By way of example routing for example, IP address rule is: 192.168.11.xxx.; 255.255.255.0; 192.168.11.1 router settings according to their corresponding IP parameters. The module can be connected to the router through a network cable, can also be To directly connected with the PC, if directly connected with the computer, the computer's IP need to be manually configured 192.168.11.xxx; 255.255.255.0 form. Configuration parameters as shown below: In the instance is not enabled DHCP, configure a static IP. Submit configuration, the module will turn off WiFi, LAN port will be shut down. 5) implement TCP to serial data to each submit the parameters, the module will restart. Modules starts with one end of the network cable computer network port and the other end HLK RM04 module WAN port. Configure a fixed IP to the computer as shown below: 24
Use the ping tool to see whether the module can ping. Ping Address: 192.168.11.254. If the ping succeeds, proof has been properly connected to the computer module. Opens serial debugging tools, and network debugging tools to send data to do a test. 25
each serial and Ethernet can send the data. 26