Page 3
3.2. Local port operation: at + CLport ................14 3.3. Set the serial port: at + uart ..................14 3.4. Set DHCP: at + dhcpc ....................14 3.5. Set WiFi connection mode: at + netmode ..............15 3.6. Set TCP connection mode: at + mode ................. 15 3.7.
TCP / IP protocol stack. With the HLK-B30 module, traditional serial devices can transmit their own data over the Internet without changing any configuration, providing a complete and fast solution for users' serial devices to transmit data over the network.
Pin Introduction 1.4. Table 2 Module pin interface Network name Type Descriptions Chip enabled, highly effective P26_PWM5 P26,PWM5 P24_PWM4 P24,PWM4 P23_TDO_F_S0 P23,ADC3 ES0, enter at command mode / restore factory P22_TDI_F_SI settings, please pull up if not used, same as P28 P21_TMS_F_CS P20_TCK_F_SC VBAT...
1.7 Base plate description Diagram 3 Baseboard illustration Power requirements Power requirements Power input voltage DC:3.3±0.3V No-load running current 130±50mA Supply current requirements ≥1000mA 1.9. WiFi Transmit power consumption Transmit power consumption WiFi Mode Rate Transmit power Current(ma) 11Mbps 17.5dbm 54Mbps 11dbm MCS7...
1.10. WiFi received power consumption Mode Rate Current (ma) 11Mbps 54Mbps MCS7 100.5 1.11. WiFi power consumption in each working mode Average current Status Descriptions Max current (3v3) Unit (3v3) WiFi initialization RF off, MCU full speed 45.2 46.3 Keep WiFi connected Keep connected router After connecting to the Udp send...
802.11n OFDM Mode MCS7 2. Functional description HLK-B30 supports serial port to WiFi STA, serial port to WiFi AP, and serial port to BLE mode. 2.1. The description of flashing WiFi indicator The module is indicated by the flashing LED indicator in different modes, so that you can quickly and easily know the module's operating status.The module's WiFi indicator has the following...
2.2. One-click network configuration mode For the IOT WiFi module, based on cost and performance considerations, there is no touch screen interactive interface like a mobile phone. The user can see the ap list on the mobile phone and click on the password to connect to the network. What should I do? One-click configuration is that the WiFi module is in promiscuous mode (can capture all 802.11 frames in the air), the APP sends the SSID and password to the WiFi module through UDP broadcast or multicast with certain coding rules, the module parses them out, and then connects to the router.
When the module is configured in one-click mode, you need to set the module to one-click mode.You can use the serial configuration tool to set the module to one-click mode. Diagram 5 Set to one-click network mode 2.3. Serial to WiFi STA Serial device Diagram 6 Module as STA...
WiFi, and serial devices can transmit data through the B30 module and other WiFi devices. 2.5. Serial working state conversion After HLK-B30 is powered on, the default mode is transparent transmission mode. By pulling down the ES0 (PIN5) pin for more than 50ms to enter the at command mode, the module will regard the received data as an at command and send the at command to let the module enter the transparent transmission mode.
2.6. Serial to Network Data Conversion 2.6.1. Module as TCP Server TCP Client TCP Client TCP Server TCP Server TCP Client Diagram 9 TCP Server In this mode, the module monitors the designated port and waits for the TCP Client to connect. After the connection, all TCP data are sent directly to the serial port, and the data at the serial port is sent to all TCP Clients.
2.6.3. Module as UDP Server UDP Client UDP Server Diagram 11 UDP Server In this mode, the module opens the local designated port. Once receiving the data sent to this port, the module will send the data to the serial port and record the remote IP and port. The module will only record the remote information on the last connection, and the data sent by the serial port will be directly sent to the recorded remote IP and port.
Example: "at + ver =?" The module will return: HLK-B30 (b.1.00.120191206180224) Query instruction format: at + [command] =? 3.1. Query the current module version: at + ver...
3.2. Local port operation: at + CLport Command type Grammar/ Syntax Return and description at+CLport=8080 at+CLport=8080 Description: Set the local port to port 8080 Executing command at+CLport=? at+CLport=? 8080 Description: Query local port 3.3. Set the serial port: at + uart Command type Grammar/ Syntax Return and description...
3.5. Set WiFi connection mode: at + netmode Command type Grammar/ Syntax Return and description at+netmode=3 Executing command at+netmode=3 Description: Set the module to ap mode at+netmode=? Query command at+netmode=? Description: 1: One-click distribution network 2: sta mode 3: 2.4G ap mode 3.6.
3.8. Set the remote port when the module as client: at + remoteport Command type Grammar/ Syntax Return and description at+remoteport=1234 Executing command at+remoteport=1234 Description: Set the remote IP address of the module at+remoteport=? Query command at+remoteport=? 1234 Description: Query remote IP 3.9.
3.12. Set the socket connection protocol: at + remotepro Command type Grammar/ Syntax Return and description at+remotepro=tcp Executing command at+remotepro=tcp Description: Set the module socket protocol to tcp at+remotepro=? Query command at+remotepro=? Description: Query module socket connection protocol 3.13. Set network connection parameters: at + net_ip Command type Grammar/ Syntax Return and description...
3.16. Set the framing length: at + uartpacklen Command type Grammar/ Syntax Return and description at+uartpacklen=64 Executing command at+uartpacklen=64 Description: Set the framing length of the module to 64 bytes at+uartpacklen=? Query command at+uartpacklen=? Description: Query the frame length of the module is 64 bytes 3.17.
+ ver =? \ r \ n \ // Query firmware version number "; Com_send (query); // Send these data from the serial port Running returns: at+netmode=? 0 at+WiFi_conf=? Hi-Link,wpa2_aes,12345678 at+dhcpd=? 0 at+dhcpc=? 1 at+net_ip=? 192.168.15.254,255.255.254.0,192.168.11.1 at+remoteip=? 192.168.11.245 at+remoteport=? 8080...
* commands_WiFi_client_static = "\\ at + netmode = 2 \ r \ n \ // Set to wireless network card sta mode at + WiFi_conf = HI-LINK, wpa2_aes, 12345678 \ r \ n \ // Set WiFi, encryption method and password at + dhcpc = 0 \ r \ n \ // Use static IP method at + net_ip = 192.168.11.254,255.255.255.0,192.168.11.1 \ r \ n \ // Set the module's IP...
Running returns: at+netmode=2 ok at+WiFi_conf=HI-LINK,wpa2_aes,12345 678 ok at+dhcpc=1 ok at+remoteip=192.168.11.245 ok at+remoteport=8080 ok at+remotepro=tcp at+mode=server at+uart=115200,8,n,1 ok at+uartpacklen=64 ok at+uartpacktimeout=10 ok at+net_commit=1 4.3. Serial port to WiFi server (dynamic IP address) Code: char * commands_WiFi_ap = "\ at + netmode = 2 \ r \ n \ // Set to wireless network card mode...
+ reconn = 1 \ r \ n \ "; // Restart the module Com_send (commands_WiFi_ap); Running returns: at+netmode=2 ok at+WiFi_conf=HI-LINK,wpa2_aes,12345678 ok at+dhcpc=1 at+remoteip=192.168.11.245 ok at+remoteport=8080 ok at+remotepro=tcp at+mode=server at+uart=115200,8,n,1 ok at+uartpacklen=64 ok at+uartpacktimeout=10 ok at+net_commit=1 4.4. Restore factory settings Code: char *commands_device_default="\\...
4.5. Configuration Software Instructions Serial configuration interface Diagram 13 1: Command window to be sent 2: Serial port number selection 3: Work mode selection 4: WiFi name and password 5: Network protocol selection 6: Serial parameters 7: Commit configuration 8: Query configuration 9: Enter transparent transmission mode 10: Factory reset 11: Serial port return command...
Firmware upgrade The module is upgraded through the serial port.Before the upgrade, please connect according to the following figure: Serial configuration interface Diagram 14 Open the upgrade software, select the corresponding serial port, set the baud rate to 115200, and complete the settings before the upgrade: Upgrade configuration Diagram 15...
Page 28
1. Burn Diagram 16 Then short press the reset button again, and the upgrade begins. 2. Short press the reset button Diagram 17 In progress of upgrading: Page 25 / 30...
Upgrading Diagram 18 Method of restoring factory settings Press and hold the ES0 key on the baseboard for 6 seconds to restore the factory settings. Bluetooth data transmission Bluetooth data transmission is that after the Bluetooth connection is successful, the module will send the data received from Bluetooth through the serial port, and the data received by the module serial port will be sent through Bluetooth.
Page 30
Bluetooth search list Diagram 19 Then select the last item Diagram 20 Bluetooth attribute list Page 27 / 30...
Then enter the data to be sent in the send box, and then click Send. The data will be received on the serial port and the data sent by the serial port will be received on the app. Diagram 21 Bluetooth transmission test Bluetooth distribution network Bluetooth network configuration is to connect the Bluetooth, send the WiFi name and password...
Page 32
Diagram 22 Bluetooth distribution network interface First enter the WiFi name and password, and then click the "Start Configuration" button. The phone will send the hotspot name and password to the module via Bluetooth. After receiving, the module will save and then restart it, and connect to the WiFi according to the hotspot name and password sent by the mobile phone.
Appendix A Document Revision Record Version number Scope of revision Date V1.00 First edition 2019-6-27 First edition Modify the description of the V1.01 2019-12-27 serial port upgrade tool Page 30 / 30...
Need help?
Do you have a question about the HLK-B30 and is the answer not in the manual?
Questions and answers