1. Get Start USR-K6 is a small module for serial port to Ethernet, which can realize the bi-directed data transparent transmission between RJ45 port and TTL serial port. It can be applied to interface 232 and 485 by level conversion circuit.
Diagram 1-1 Download Page Some question in you using, please refer to the applications:http://www.usr.cn/Faq/cat-46.html Also can be submit to our USR custom supporting: http://h.usriot.com 1.1. Testing Environment 1.1.1. Hardware Prepare USR-K6*1 Jinan USR IOT Technology Limited 6 / 107 inquiry@usriot.com...
Page 7
PC*1 Diagram 1.1.1-1 Testing Tools 1.Test purposes: Test to realize the USR-K6, have a basic understanding of USR-K6 Test to know whether there are some thing wrong with it. 2.Data direction: Diagram 1.1.1-2 Data Direction Jinan USR IOT Technology Limited 7 / 107 inquiry@usriot.com...
2)Shut down net card none-related and reserve only one local connection . 3)For the direct connection between PC and server, please provide a static IP in the same LAN with the IP of K6. Jinan USR IOT Technology Limited 8 / 107...
User name admin Key word admin IP address 192.168.0.7 Subnet masks 255.255.255.0 Default network gateway 192.168.0.1 Default work mode TCP client Default local port Default target port 8234 Default local port 20108 Jinan USR IOT Technology Limited 9 / 107 inquiry@usriot.com...
② Select the TCP server mode in the “Net Setting” . Fill the PC IP into the server IP, server port 8324, click to start listen and build TCP client. Baud rate:115200, serial parameters:None/8/1, then click to open the serial port. Diagram 1.4-1 Default Parameters Testing Jinan USR IOT Technology Limited 10 / 107 inquiry@usriot.com...
2.1. Brief Introduction USR-K6 is a tiny size serial port to Ethernet module which can realize the bi-direct data transparent transmission between RJ45 port and TTL serial port. It can be applied to RS232 and RS485 by level conversion circuit.
Parameter Value Input Voltage DC3~3.6V Working Current 136mA@3.3V Net port Rj45, 10/100mMbps Serial port 600~460.8K(bps) Software parameters Network protocol IP, IPV4, TCP/UDP, ARP, ICMP Access way to IP Static IP, DHCP Jinan USR IOT Technology Limited 12 / 107 inquiry@usriot.com...
USR-K6 User Manual www.usriot.com Diagram 3.2-1 Dimension 4. Product Function Here are the functions of K6, below is the overall block diagram. Jinan USR IOT Technology Limited 16 / 107 inquiry@usriot.com...
Advantage: accessing the device that can not distribute IP address can be searched via UDP broadcast. Disadvantage: different net segment in the different LAN can not communicate normally. DHCP Jinan USR IOT Technology Limited 17 / 107 inquiry@usriot.com...
Page 18
No device such as router and no setting, keep the default. 4. Related AT command. command name instr AT+WAN Setting and query the access way of K6 IP, IP/subnet masks/gateway parameters From4.1.1-1 Related AT Command 5. Software setting: Jinan USR IOT Technology Limited 18 / 107 inquiry@usriot.com...
In static IP mode, the default DNS server address is 208.67.222.222, and in DHCP mode, the DNS server address is obtained automatically. Version 4015 above support domain name server address can be set. Jinan USR IOT Technology Limited 19 / 107...
Fill the user name and key word in the login webpage, default is admin, click to enter. TX Count: the data count sent from K6 to the external RX Count: the data count received by K6 from thee net. Jinan USR IOT Technology Limited 20 / 107 inquiry@usriot.com...
Webpage upgrading firmware, stable and simple. Using this new function meets the custom requirement. If you need to upgrade, you can query us from the USR support:http://h.usriot.com and asking firmware from supply. The way to upgrade please reference5.1.1. 4.2. Socket Jinan USR IOT Technology Limited 21 / 107 inquiry@usriot.com...
Page 22
Note: Default IP address and type is static IP at 192.168.0.201. Default remote port:8234 Related AT command: command name instr AT+sock Setting the work mode/target IP/ target port Form 4.2-1 Related AT Command Jinan USR IOT Technology Limited 22 / 107 inquiry@usriot.com...
,change remote IP to 172.16.11.8) remote port:8234, then save it. Research to make sure the parameters are right. Also you can set work mode, remote IP and remote port in the webpage then save and restart. Jinan USR IOT Technology Limited 23 / 107...
Page 25
Note : default remote IP is192.168.0.201.But in order to keep the device and PC in the same network segment to make the communication correct so we change IP type as DHCP. Just likes the above picture. ③ Click send to receive the bi-direction data. Jinan USR IOT Technology Limited 25 / 107 inquiry@usriot.com...
5) If the number of the TCP client is more than 16, default kick the old one, and this function can be set via webpage. 6) TCP server example ① Set K6 as a TCP server via software setting, local port is 20108, then save. Also you can set via webpage. Jinan USR IOT Technology Limited 27 / 107 inquiry@usriot.com...
Page 29
Diagram 4.2.2-3 TCP Server Webpage Setting ② Testing software set to be TCP client, server IP is IP of K6 and the server port is port of the K6, then connect. Jinan USR IOT Technology Limited 29 / 107 inquiry@usriot.com...
Page 31
4) In UDP Client Mode, if target IP is set as 255.255.255.255, it can realize function of entire network broadcast, also can receive broadcast data. 4015and the later vision support broadcast. e.g.xxx.xxx.xxx.255. 5) Example ① Set the K6 as UDP client, remote port 8234 Diagram 4.2.3-2 UDP Client Software Setting Jinan USR IOT Technology Limited 31 / 107 inquiry@usriot.com...
Page 32
Send the send of the serial and receive the data,testing software remote IP and remote port change into the IP and port of K6, then click the net send, send data to serial port. Jinan USR IOT Technology Limited 32 / 107...
No need for paying attention to the process of data conversion between the serial data and net data package. Simple parameter setting can realize the requirement serial device sent to HTTP server. Jinan USR IOT Technology Limited 34 / 107...
Page 36
4.Click save, then restart to work. 5.Open serial port to send data, then the data of the serial port will submit to your webpage, meanwhile the serial port will receive the reply. Jinan USR IOT Technology Limited 36 / 107 inquiry@usriot.com...
② Click sure, observe if the connection is established, if the connection has established, and you can test the data transport transmission. 3.More information reference the below: http://www.usr.cn/Search/getList/keyword/%E8%99%9A%E6%8B%9F%E4%B8%B2%E5%8F%A3/ 4.3. Serial Port Function Jinan USR IOT Technology Limited 37 / 107 inquiry@usriot.com...
Enable this function, using USR-VCOM can open this function,which can realize the serial baud of the PC software and K6 automatically match. No need to pay attention to serial port baud rate setting. Jinan USR IOT Technology Limited 39 / 107...
Page 40
USR-K6 User Manual www.usriot.com Diagram 4.3.3-1 Similar RFC2217 Function Jinan USR IOT Technology Limited 40 / 107 inquiry@usriot.com...
Page 41
01 C2 00 9600, N,8,1 55 AA 55 00 25 80 Form4.3.3-1 RFC 2217 Function Protocol A no. instr value Describe data bits select 5 data bits 6 data bits 7 data bits Jinan USR IOT Technology Limited 41 / 107 inquiry@usriot.com...
Page 42
⑤ E.g. Protocol command: 55AA5501C2008346 setting serial port parameter is 115200 N,8,1 55AA550025808328 setting serial port parameter is 9600 N,8,1 Jinan USR IOT Technology Limited 42 / 107 inquiry@usriot.com...
Diagram 4.4.2-1 Building the Connection to Send Registration Package Data carries the registration package: sending data in the front of the data access to the registration package,mainly for protocol transmission application diagram is as follows: Jinan USR IOT Technology Limited 45 / 107 inquiry@usriot.com...
USR-Cloud software is a platform for communication between devices and PC software. The cloud software is mainly used for data transmission or monitoring remotely. This function only works in TCP client mode. Login link of USRIOT Cloud: http://console.usriot.com Remote server address: console.usriot.com Jinan USR IOT Technology Limited 46 / 107 inquiry@usriot.com...
Page 47
USR-K6 User Manual www.usriot.com Communications Code: Pass word generated after adding the device to cloud software The following is test account of USR-Cloud: Account: jin321_ Password: 1987322 Jinan USR IOT Technology Limited 47 / 107 inquiry@usriot.com...
Page 48
USR-K6 User Manual www.usriot.com Diagram 4.4.3-2 USR-cloud Software Setting Note: Module needs work at TCP client Also can be set in the webpage as fellows: Jinan USR IOT Technology Limited 48 / 107 inquiry@usriot.com...
Diagram 4.4.4-1 Package Upgrade webpage need to notes that, destination IP set to be the IP address of K6, the final name of file is “fs”,product choose the”M0”, then click the upgrade. Jinan USR IOT Technology Limited 49 / 107 inquiry@usriot.com...
Here we take the default number is 16 as example. Server send data to 16 clients, or the server receive the data from 16 clients, open the Index, mark to divide the different clients and user can recognize the data sources according to the mark, meanwhile send different data to special clients. Jinan USR IOT Technology Limited 50 / 107 inquiry@usriot.com...
Page 51
Diagram 4.4.7-1 Index Function Diagram 4.4.7-2 Index Software Setting 1.After the server receive data, output 'I' 'N' data…… to user MCU via server serial port. I means receive; N means Jinan USR IOT Technology Limited 51 / 107 inquiry@usriot.com...
Page 52
4.When there are 16 client to connected,if there is new connection to ask, input F,F to MCU. 5.Break off it, K6 server input 'D' 'N' 'M' to user MCU, N means the original number of connections deleted, and remaining M connections. Data transmission as the below: Jinan USR IOT Technology Limited 52 / 107 inquiry@usriot.com...
4.4.8. The number of the connected client USR-K6 works in the TCP server mode, the max number of client to connect is 16, default is 4, the max number can be configuring as you want, which is be convenient for using. When the the number connecting clients more than 4, we should control the total data flow in 2.5KB/s if we need to send and receive meanwhile(not more than 200 bite/s).
TCP short connection can sued in the TCP client, open it and send message. The connection will be broken automatically. This function default disable, the interval of disconnect can be configured after enable it, the range from 2 to 255s, default is 3s, the diagram is as fellow: Jinan USR IOT Technology Limited 54 / 107 inquiry@usriot.com...
800K byte, after the TCP built, you can select is clear the cached data. Default disable. Under the Httpd client mode or the TCP client mode, enable the short connection and this function do not work. Jinan USR IOT Technology Limited 55 / 107 inquiry@usriot.com...
The normal work time of this function set 60~65535s, default is 3600s. if setting time less than 60s, default to be 0 and turn off this function. The setting is as fellow: Jinan USR IOT Technology Limited 56 / 107...
1.When using setting software to setting parameter, K6 and the PC of the setting software are in a LAN. 2.Close the antivirus software and firewall software. 3.Close the irrelevant network card. 5.1. Net Protocol Setting Parameters Jinan USR IOT Technology Limited 57 / 107 inquiry@usriot.com...
Fill them and enter. Default username and password:admin(software setting default username and password are admin, so under default condition,the setting software will not pop-up the window. Jinan USR IOT Technology Limited 58 / 107 inquiry@usriot.com...
Page 59
Click the searching device and you can see the basic parameters needed to set, combined with the function introduction of the third chapter, setting the parameter you need, then click the save. Then you are succeed to modify the parameters you have change, others keep default. Jinan USR IOT Technology Limited 59 / 107 inquiry@usriot.com...
Page 60
Subnet masks: default is 255.255.255.0 Gateway: usually is the router IP, after correct setting you can communicate across the LAN and do the domain name resolution. 3. Serial port parameters Jinan USR IOT Technology Limited 60 / 107 inquiry@usriot.com...
Page 61
When you upgrade it,connect directly the device and PC and notice that PC upgrading module is forbidden. Select the device and right click, then upgrade the firmware. Jinan USR IOT Technology Limited 61 / 107 inquiry@usriot.com...
Build a UDP socket, remote IP :255.255.255.255, remote port:1500, lower is in front. ② Setting command steps Send searching order on the internet. K6 return the IP address, MAC, device name and version. Jinan USR IOT Technology Limited 62 / 107 inquiry@usriot.com...
Page 64
6E + 00, from 4th to 9th is the address of the MAC, the last 12 bits in front add the parity is the user name and password. These are 6 bits, add 0 if less than 6 bits. Note: the last one of the username and password is 0,below are same. Jinan USR IOT Technology Limited 64 / 107 inquiry@usriot.com...
Page 65
Uc User Flag Not enable,reserve the protocol Ul Static IP 07 00 A8 C0 Static IP Ul Gateway IP C9 00 A8 C0 Gateway Ul Subnet Mask 00 FF FF FF Subnet Mask Jinan USR IOT Technology Limited 65 / 107 inquiry@usriot.com...
Page 67
0: TCP Server mode do not click the order one. 1: TCP Server mode click the order one. Uc Flags is 0: close MAC registration package: 1: MAC do as registration package: Jinan USR IOT Technology Limited 67 / 107 inquiry@usriot.com...
Page 71
00 00 00 00 (this value can be ignore) checksum Check sum initial value is 0x00, reduce every bits of TAG_STATUS in order,till the last bit, and the result is Jinan USR IOT Technology Limited 71 / 107 inquiry@usriot.com...
5.2. Webpage Setting Parameters Open the browser and enter the IP of K6, default is (192.168.0.7). filled the user name: admin and password: admin, then login and you can enter the login page. Jinan USR IOT Technology Limited 74 / 107 inquiry@usriot.com...
Page 75
Click the English or Chinese on the right upper to switch the language. 1. Current status Diagram 5.2-2 Current Status This page show song information of the K6 Module name Current IP address MAC address Jinan USR IOT Technology Limited 75 / 107 inquiry@usriot.com...
Page 76
Modify the parameters and save,then modify the parameter in next page. If the parameter need not to modify ,click the restart and work. Static IP Subnet masks Gateway DNS server 3. Serial port Jinan USR IOT Technology Limited 76 / 107 inquiry@usriot.com...
Page 77
USR-K6 User Manual www.usriot.com Diagram 5.2-4 Serial Port Baud rate Data Parity Stop Local port Remote port Work mode Remote server address Special functions Jinan USR IOT Technology Limited 77 / 107 inquiry@usriot.com...
Page 78
Short connection: enable under the TCP client and the time can be customize Clear buffer data: whether or not TCP server-kick off old connection Serial port parameter setting: open with webpage and setting with serial port parameter 5. Miss configure Jinan USR IOT Technology Limited 78 / 107 inquiry@usriot.com...
Page 79
USR-K6 User Manual www.usriot.com Diagram 5.2-6 Miss configure Module name Webserver port Username Password MAC address Max client connected to TCP server Reset timeout 6. Reboot Jinan USR IOT Technology Limited 79 / 107 inquiry@usriot.com...
Fill “+++”in the UART. After the module receive the “++++”,it will send a “a” to confirm; Fill the confirming “a” in the UART, after the module receive and send “+ok”, enter the command mode. Jinan USR IOT Technology Limited 80 / 107 inquiry@usriot.com...
Page 81
Detail requirement are as fellows. Diagram 5.3.1-2 Time Tree Time requirement: T1>the interval of serial port package T2<300ms T3<300ms T5<3s The order change into temporary command mode from transparent transport mode: Jinan USR IOT Technology Limited 81 / 107 inquiry@usriot.com...
Error code Instr Invalid format Invalid order Invalid operator Invalid parameter Not allow Form 5.3.2-1 Error Code List 5.3.3. AT Command command Instr Enable/disable the echo function restart module Query the vision Jinan USR IOT Technology Limited 82 / 107 inquiry@usriot.com...
Page 83
Setting/ query registration package mechanism REGTCP Setting/ query registration package perform mechanism REGCLOUD Setting/ query USR-cloud username and password REGUSR Setting/ query the content of registration package that customized Httpd client function Jinan USR IOT Technology Limited 83 / 107 inquiry@usriot.com...
Page 84
Setting/ query clear serial port cache before module build connection function enable/disable RSTIM Setting/ query timeout reset time MAXSK Setting/ query maximum client connections in TCP server mode Setting/ query module name Query help message (V4017 supporting command) Jinan USR IOT Technology Limited 84 / 107 inquiry@usriot.com...
OFF: under AT command mode, the entered command do not echo. E.g.: AT+E=0N 2. AT+Z Function: restart module Format: setting: AT+Z<CR> <CR><LF>+OK<CR><LF> Parameters: none <note>: after perform this command correctly, module restart and exit the AT command mode. Jinan USR IOT Technology Limited 85 / 107 inquiry@usriot.com...
Page 86
<note>: after perform this command correctly, module change into command mode from transparent transmission mode. 5. AT+RELD Function: module reset Format: setting: AT+RELD<CR> <CR><LF>+OK<CR><LF> parameters: none. 6. AT+MAC Function: query module MAC Format: query: Jinan USR IOT Technology Limited 86 / 107 inquiry@usriot.com...
Page 87
<CR><LF>+OK=< username,password ><CR><LF> setting: AT+WEBU=< username,password ><CR> <CR><LF>+OK<CR><LF> Parameters: username: username, support 5 bytes at longest and can not be none: password: password, support 5 bytes at longest. E.g.: AT+WEBU=admin,admin 9. AT+WANN Jinan USR IOT Technology Limited 87 / 107 inquiry@usriot.com...
Page 92
AT+ SOCKPORT =< sta ><CR> <CR><LF>+OK<CR><LF> Parameters: Sta: 0 is using port randomly. 1-65535 is using the local port of the socket. E.g.: AT+SOCKPORT=20108: 17. AT+RFCEN Function: enable/ disable RFC221 7function Jinan USR IOT Technology Limited 92 / 107 inquiry@usriot.com...
Page 93
E.g.: AT+RFCEN=ON 18. AT+PDTIME Function: query produce time Format: query: AT+PDTIME<CR> <CR><LF>+OK=< time ><CR><LF> Parameters: time: produce time, e.g.: 2016-10-18 11:20:02 19. AT+REGEN Function: setting query registration package mechanism Format: query: Jinan USR IOT Technology Limited 93 / 107 inquiry@usriot.com...
Page 94
Function: setting query tcp client mode registration package perform mechanism Format: query: AT+REGTCP<CR> <CR><LF>+OK=< status ><CR><LF> setting: AT+REGTCP =< status ><CR> <CR><LF>+OK<CR><LF> Parameters: Status: first: send a registration package when connected the server at first time Jinan USR IOT Technology Limited 94 / 107 inquiry@usriot.com...
Page 96
AT+HTPTP =< status ><CR> <CR><LF>+OK<CR><LF> Parameters: Status: GET: is the http asking way POST: is the http asking way E.g.: AT+HTPTP=GET 24. AT+HTPURL Function: setting /query Httpd 的 URL. Format: query: AT+HTPURL<CR> Jinan USR IOT Technology Limited 96 / 107 inquiry@usriot.com...
Page 97
199 bytes. And using <<CRLF>> translating the characters in stead of the enter. E.g.: AT+HTPHEAD=Accept:text<<CRLF>> 26. AT+HTPCHD Function: setting /query filter the package head of the return information of Http Format: query: AT+ HTPCHD <CR> Jinan USR IOT Technology Limited 97 / 107 inquiry@usriot.com...
Page 99
Function: setting /query time of heartbeat package Format: query: AT+ HEARTTM <CR> <CR><LF>+OK=< time ><CR><LF> setting: AT+ HEARTTM =< time ><CR> <CR><LF>+OK<CR><LF> Parameters: Time: heartbeat time ,default is 30s, range from 1 to 65535s. Jinan USR IOT Technology Limited 99 / 107 inquiry@usriot.com...
Page 100
Function: setting /query Socket connected status instructions function (connection status instructions pin change or not according to the connection status) Format: query: AT+ SCSLINK <CR> <CR><LF>+OK=< sta ><CR><LF> setting: AT+ SCSLINK =< sta ><CR> <CR><LF>+OK<CR><LF> Parameters: sta: status ON: enable link function Jinan USR IOT Technology Limited 100 / 107 inquiry@usriot.com...
Page 101
OFF: disable TCP Client reset function E.g.: AT+CLIENTRST =ON 33. AT+ INDEXEN Function: setting /query index function Format: query: AT+ INDEXEN <CR> <CR><LF>+OK=< sta ><CR><LF> setting: AT+ INDEXEN =< sta ><CR> <CR><LF>+OK<CR><LF> Jinan USR IOT Technology Limited 101 / 107 inquiry@usriot.com...
Page 102
ON: enable short connection function OFF: disable short connection function E.g.: AT+SOCKSL =ON 35. AT+ SHORTO Function: setting /query short connection time Format: query: AT+ SHORTO <CR> <CR><LF>+OK=< time ><CR><LF> setting: Jinan USR IOT Technology Limited 102 / 107 inquiry@usriot.com...
Page 103
ON: clear the serial port cache before connected OFF: do not clear the serial port cache before connected E.g.: AT+UARTCLBUF =ON 37. AT+ RSTIM Function: setting /query restart timeout Format: query: AT+ RSTIM <CR> <CR><LF>+OK=< time ><CR><LF> setting: Jinan USR IOT Technology Limited 103 / 107 inquiry@usriot.com...
Page 104
Function: setting /query module name Format: query: AT+ MID <CR> <CR><LF>+OK=< name ><CR><LF> setting: AT+ MID =< name ><CR> <CR><LF>+OK<CR><LF> Parameters: name: module name, maximum 15 bytes and can not be none. Jinan USR IOT Technology Limited 104 / 107 inquiry@usriot.com...
Page 105
Function: setting ping the remote IP and operate the “ping”1 time. Format: query: AT+ PING=< IP ><CR> <CR><LF>+OK<CR><LF> Parameters: IP: ping the remote IP or the domain name automatically, maximum 30 bytes E.g.: AT+PING=www.baidu.com Jinan USR IOT Technology Limited 105 / 107 inquiry@usriot.com...
USR-K6 User Manual www.usriot.com The document provides information about USR-K6 module, it doesn’ t grant any license to the intellectual property rights. Except the responsibility declared in the product sale clause, USR does not assure any other responsibilities. In addition, USR does not make any warranties for the sale and use of this product, including the suitability of products for a particular purpose, merchant ability or fitness for any patent, copyright or other intellectual property infringement.
Need help?
Do you have a question about the USR-K6 and is the answer not in the manual?
Questions and answers