USR K7 User Mannual V1.0.1
USR K7 User Mannual V1.0.1
USR K7 User Mannual V1.0.1
com
Contents
2. Overview....................................................................................................................................................................... 12
3.2. Dimension.......................................................................................................................................................... 17
1. Get Start
K7 is a module that can realize data transmission between the Network and TTL serial port, which is equipped with
ARM cortex-M4 processor. No need to care of the details, the module realize the protocol converse.parameters can be
set in the software and webpage, configure one time and save forever.
This character aimed at get start and the user are advised to operation one time according to the instr to
understand K7 completely.
Questions occur in the testing, you can refer to our application case and answers:
https://www.usriot.com/support/faq/ethernet-series/
Also you can submit the problem into the support: http://h.usriot.com/
Related software:
(also, it can be used in the industrial serial to Ethernet Converter:USR-N668,USR-N510, USR-N520, USR-N540,
USR-TCP232-410S, USR-TCP232-419 and industrial ethernet modules: USR-TCP232-E2, USR-TCP232-ED2.)
USR-K7*1
USR-Kx-EVK*1
Cable*1
PC *1
1.Testing purpose:
2.Data direction
To test the communication converse from serial port to net, connect the USR-K7 with evaluation board, and
connected with the PC using serial cable, then connect the net port of K7 and PC. Power on the it. The diagram is as
fellow:
To prevent from searching nothing, not ping and not opening the webpage, you should testing the below contents
before using.
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 K7,
e.g.192.168.0.201.
Item Content
Username admin
Password admin
IP address of K7 192.168.0.7
After the above steps, the K7 can realize the bi-direction between the serial port and ethernet, operation steps are
as fellows:
2) Net setting change into TCP Client, enter the 192.168.0.7 into IP address, server port is 23. then click to build
TCP connection. serial baud rate:115200, Serial port parameters: none/8/1 then open the serial port.
From now, we can have the data transmit testing from the serial port to network.
As the below:
2. Overview
Super port module K7 is a new serial Ethernet module. It is a module that can realize data transmission between
the network and TTL serial port. This module is equipped with ARM cortex- M4 processor, which has the advantages of
low power consumption, fast speed and high stability.
In terms of the volume, the width of the device is equal to the common RJ45 port, and the length is less than twice
length of the common network port, with the industry- leading ultra-small volume, and the current is only 130mA when
This product is developed on the basis of the hardware and software of serial to ethernet M4 series. The internal
integration of TCP/IP protocol stack, user can use it to complete the embedded device networking function easily,saving
the development process of human, material and development cycle, so that products can be faster into the market,
enhance competitiveness.
Passed the strict testing, K7 has successful case in Banks, highways, large corporate networks, busy webcam
networks and complex network environments such as fiber-optic to Ethernet.
2.2. Features
Equipped with ARM cortex-M4, industrial width of temperature,TCP/IP protocol stack, more stable and reliable.
Supports TCP server, TCP client, UDP server, UDP client and HTTPD client work mode
Build-in webpage where can set the parameters, also can customize webpage. The port of the webpage can be
defined
Supports RTS/CTS hardware flow control and Xon/Xoff software flow control
Supports USR-VCOM
Baud rate:600bps~1Mbps; and five parity way:none, odd, even, mark, space
RJ45 have Link/Data indicator, in the net port, there is Isolating transformer,1.5KB ESD
The unique MAC in the world, and the user can self-defined
Supports two websocket to realize the bi-direction transparent transmission between serial port and webpage.
Parameter Value
Hardware parameters
Software parameters
Network protocol IP, IPV4, TCP, UDP, DHCP, DNS, HTTP, ARP,
ICMP, Web socket
DDNS Support
others
3. Hardware Parameters
Diagram 3.1-1Pin
4 RST I Module reboot(200ms or above low level pulse to make the module reboot)
5 RTS O Default 485 receive and send control, high level pulse send. Configured into
hardware flow control.(request to send)
6 Reload I Module can restore to factory setting, under power off(or reboot)put down reload
then power on, keep the reload down for 5s, after 5s put up and then reload to
factory setting.
3.2. Dimension
4. Product Function
This character instruct all the function of the K7, below is the details.
1.IP address is the identity representation of the module in the LAN, which is unique in the LAN, so please be sure there
is no another device same as it in the LAN.
Static IP
Handle to setting. Note fill the IP, subnet masks and gateway.
Static IP adopted to the environment that required to statistics the IP and the device and makes them correspond
one to one.
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
Get IP address , gateway address, DNS server and other information from the gateway server to easy the step for
setting IP address, DHCP adopted to the environment that have no special requirement to IP.
Advantage: accessing the device equipment with the DHCP server such as router can communicate directly.
Reduce the hassle of setting IP address and subnet masks.
Disadvantage: accessing the device with no DHCP server such as computer directly, K7 can not work.
2.Subnet masks is a 32 address, used to determine the host number and the network number by shielding some IP
address, indicates the number of subnet and determine the flag within the subnet. Using combine with the IP address.
The subnet masks needed to set, usually we use the subnet masks: 255.255.255.0. The number of IP addresses in the
subnet is 2 to the eighth power minus 2, that is, 256-2=254, and the general host addresses are all 0 or 1 (binary) has its
special role.
3.Gateway is the net port of the LAN. If you connect the router to access the internet, the gateway is the router IP
address, setting wrong and can not access into the net. No device such as router and no setting, keep the default.
4.Related AT command.
Name Instr
AT+WANN Setting and query the access way,IP, subnet masks and gateway
parameters for K7
5.Setup software
DNS address of the K7 can be set. When K7 need DNS, it will quest for the address that you set.(3010 and above
version support self-define DNS address.)
The default DNS server address is the gateway. In DHCP, default DNS address is acquired automatically.
DNS address can be set, which means that if the domain name server are imperfect,user also can realize the
domain name analyze referred to AT command.
Name Instr
Powered off and put down the reload. Then power on and keep the reload down for 5s. After put up, restore to
factory setting successfully.
Steps:
Put down the reload →power on →reload keep for 5s→ put up
Reload > 5S
VCC
When there are wronged parameters or forget the password, you can use hardware restore.
Name Instr
The build-in webpage of the K7 same as the common webpage. User can check the related status of the module
via webpage. Default port of the web server:80(can be modify, after modify, you can access the webpage via other port.
4) Conn status(eth)A: connection status of the A to determine which status that K7 stay.
IDLE: initial status, no connection and no listening. e.g. waiting connection of the short connection or original
status.
LISTEN: under TCP server mode, listening and wait being connected.
Net upgrade firmware is stable and easy. New function can be enjoyed in the last firmware to meet the high
requirement. Ask for new firmware from supply or from the USR support: http://h.usriot.com, details please refer to
5.1.1 firmware upgrade.
4.2. Socket
There are five work modes for K7:TCP server, TCP client, UDP server, UDP client and HTTPD client. Setting from the
setup software or the webpage.
Name Instr
1. TCP client provides client connection for TCP net server. Build connection automatically and connect to server
to realize the data transmit between serial port and server port. According to related rule of TCP, TCP client has
difference between connecting and disconnecting, to confirm the data transport reliable. Usually used in the data
interaction between device and server, which is the commonest communication way.
2. Under TCP client mode, K7 supports recognize the abnormal connection automatically. About 15s internal to
send Keep Alive to keep active after build. If there is abnormal disconnection, k7 will find it and reconnection.K7
connects the server as a TCP, remote port is 0, connecting with random port every time.
3. connecting the remote IP automatically, but do not receive any other connecting quest.
4. Supporting the similar RFC2217, USR-cloud and modbus TCP. In LAN, if the K7 is static IP, please be sure that
set the IP of K7 in the same LAN and set gateway correctly, or K7 is can not communication.
5. Note: keep alive, similar RFC2217, USR-cloud and modbus TCP are instructed in the bellow.
① K7 work in TCP client mode, remote IP:172.16.11.8, remote port:8234, click to save then search the K7 again
and check the parameters.
Also you can set in the webpage, remote IP and port are as above, then save and restart.
② connecting the TCP server, the IP of my computer:172.16.11.8, local host port:8234(can be modify), testing
software show the connection information:172.16.11.68:24( if the local port of K7 is 0, here will distribute a port
randomly for K7, e.g.172.16.11.68:49155).
③ setting the correct serial port parameters, click the serial port and the sent, receive the bi-direction data
transmission.
1. Under TCP server mode ,module monitoring the local port, receive and build connection when there is
connecting quest, receive the data and sent all to the client connected. If access the TCP server of K7 across the public
net, user should build termination mapping on the router.( mapping way: http://www.usr.cn/Download/155.html) also
TCP server supports Keepalive to monitoring connection timely.
2. Used in communicating with the TCP client in LAN. Adopt to the situation where is no server and several PC
and phone sending quest. And same as TCP client , TCP server has different between connecting and disconnecting to
confirm data transport stable.
4. At most K7 can receive 8 client to connect when work as TCP server. The max number of the client can be
connected can be set.
5. Under TCP server,K7 listens the local port and do not monitoring, if the questing number more than max
number you set, kick off the oldest one.
6. communication case:
K7 work in CP server mode, local port 23. Open the testing software and have the mode to be TCP client, writing
the remote IP and remote local port, the click connection and testing data transporting.
2. UDP client is a wireless transport protocol, provide the transmission service that easy and not reliable. No
difference between the disconnecting and connecting, make the IP and port then send data to it. No requirement for
drop package. Small data package and fast frequency, send data to point IP.
3. Under UDP client mode ,K7 communicate with the remote port of the remote IP, if the data comes from other
tunnel, it will not be received by K7.
4. Under the UDP client, K7 can realize the UDP broadcast if the remote address is 255.255.255.255; meanwhile,
it also can receive the broadcast data. 3010 and above firmware supports broadcast in LAN, like xxx.xxx.xxx.255.
5. Communication case:
③ Click the serial port send. Received data, the testing software remote IP and port change into IP and port for K7,
then click net send and send data to serial port.
1. Do not check the original IP address basic on the common UDP, under UDP server mode, K7 received the UDP
data package and change the remote IP change into data original IP and port, the turn back to the last IP and port.
2. Used in communicating with several device and do not want to use the TCP for the high speed.
3. Application case:
② Click two testing software, work mode:UDP; remote IP and port is the IP and port of K7. then click send, the
serial port will receive the data , click serial port send, the testing software will display the data that received by the
recent one communicating with K7.
1. Under the HTTPD client mode, user’s device send questing data to appointed HTTP server via K7, then K7
received the data from HTTP serve and analyze it and send to serial device.
2. No need to care of the data converse between the serial port data and net data package, easy parameters
configuring and can realize the serial device send questing data to HTTP server.
3. When sending data to HTTP server, the URL, header, remote IP, remote port and other information can be set
via K7, then save them. Every time send data, K7 will add URL and header. In terms of the returned data, user can
choose whether to drop the header.
4. Application case:
1. Set into HTTPd client mode via webpage, and set correspond remote IP and port.
2. Setting the HTTPD type, HTTPD URL and httpd client header
3. Hook whether remove HTTPD head when the data send back.
5. Open the serial port to send data and the serial data will submit to your webpage, meanwhile the serial device
also received the information that server return.
4.2.6. Websocket
Webpage to serial port function can realizes the interaction between the serial port and webpage forK7. user’s
device data display to webpage, and realize the interaction between the webpage and device.
2. Enter webpage, click the web to serial, bond out “connect success” and means that you can receive and send.
Open the Testing software, configuring the serial parameters then open the serial port.
3. Click to send ASCII code, serial receive the data. Click send in testing software, the webpage receive the data.
Webpage to serial port, user should possess of some web program, design the webpage, asking their device data
and deal with the data. Then the result will display on the web. After design the webpage, download the webpage to K7
according to the defined webpage to realize the development.
function connectx(){
try{
socket=new WebSocket('ws://'+window.location.host+':6432');
socket.binaryType = "arraybuffer";
}catch(e){
alert('error');
return;
socket.onopen = sOpen;
socket.onerror=sError;
socket.onmessage=sMessage;
socket.onclose=sClose
function sMessage(msg)
3. Send data
function send()
Browser Version
4.2.7. USR-VCOM
Receive the data assigned VCOM data, and send it in the data of net data using VCOM to solve the PC as a serial
port and can not connect with device,which is convenient for users.
E.g.
1. Take K7 in TCP Server mode as a server, which is convenient for user to change the computer and connected.
① Open the VCOM and add the serial port, choose the port: COM2(avoid the exist COM port) protocol use the TCP
client, remote IP set to the IP of the K7, remote port is the port of the K7. note fill the device name.
② Click sure, observe if the connection is established, if the connection has established, and you can test the data
transport transmission.
http://www.usr.cn/Search/getList/keyword/%E8%99%9A%E6%8B%9F%E4%B8%B2%E5%8F%A3/
Serial basic parameters includes: baud rate, parity, data and stop
1. Baud rate: serial communication rate, can be set from:600~1Mbps, baud rate supports random baud rate.
Via setting serial port parameters, keep consistent with the device to make sure communicating.
Flow control: the way for serial port flow control, users can choose to enable 485 or not, control the receive and
send for 485, 3010 and later default enable 485 control mode, under the condition that no hardware flow control,
enable 485.
1. NONE: default serial port mode, under this mode, 3010 and later version enable 485
2. RTS/CTS: hardware flow control. The hardware flow control for K7 supports RTS/CTS.
3. Xon/Xoff: software flow control. 3010 and later version enable the software flow control.
Hardware or software flow control deal the serial port data for better. When the serial port received buffer data
out than the threshold value, inform the remote port stop sending data until complete buffering, then inform to deal
with data.
按时间成帧
5 ms 8ms 5 ms
20ms 4ms (10ms)
AA AA AA BB BB BB AA AA AA BB BB BB
串口 网络
按长度成帧
5 ms 8ms
20ms
5 ms 4ms (长度5字节)
AA AA AA BB BB BB AA AA AA BB BB BB
串口 网络
The serial packing time and length of K7 can be set. Packing the serial port data according to the packing time and
packing length under the transparent transmission mode .
The frame mechanism of serial port is based on the packaging time and the packaging length. The case are as
fellow.
If the internal time for serial received the data more than 10ms, or the length more than 512, K7 send packing to
net when the serial port receive data.
2. If the packing time is 0 and the packing length is not 0, only the packing length work; and if the packing length is
0 and he packing time is not 0, only the packing time work.
When the packing time is 0ms, K7 works the default packing time: if the interval that serial port received data more
than packing time for send 4 byte, K7 send packing. E.g. baud rate 115200, 4 bytes packing time is:
T=0.4ms, (if the value less than 0.1ms. Packing time calculates as 0.1ms.
T=1/baud rate*10*4
4. For the limit of the serial port speed, users should control the flow when K7 receive the data from net and send
to serial, or there will be data over flow in serial. So when send net data to serial, user should calculate the data flow.
E.g.
Calculate way: if sending M bytes need N s. the way to check for possible overflow methods (if the net situation is
ok, the time can be ignored ). The time for M bytes:
T=1/baud rate*10*m
N>2T is require for K7 to work properly. If the baud rate is less than 9600, keep n>T.
Similar RFC2217 is a simple RFC2217 protocol, working with the VCOM and changing serial port parameters
candynamically to realize the communication with variable serial port parameters.
Enable this function, using USR-VCOM can open this function,which can realize the serial baud of the PC software
and K7 automatically match. No need to pay attention to serial port baud rate setting.
For the encryption of data transmission in some industrial situation, some device will change the data length, baud,
parity and other parameters in the transmission, and K7 supports this function.
Protocol length is 8 bytes, details are as fellows. The value in example are in HEX type.
bytes 3 3 1 1
instr 3 byte to reduce High in front, and the data/stop/parity, Four sum except the
miscalculation minimum is 600( 00 02 58 ) next chart package head .
115200,N,8,1 55 AA 55 01 C2 00 03 C6
9600, N,8,1 55 AA 55 00 25 80 03 A8
01 6 data bits
10 7 data bits
11 8 data bits
2 stop 0 1 stop
1 2 stop
1 Enable parity
01 EVEN
10 Mark
11 Clear
Enable Note:
1) When using RFC2217, click setting software RFC2217 to enable this function.
2) When the serial port parameters change, send the RFC2217 package, after K7 received the RFC2217 command,
modify the serial parameters and can not transparent transmission.
Under Transparent transmission, have the K7 sent heartbeat package to net server or the serial port
Heartbeat package send to the net to keep connecting with server and works in TCP client and UDP client mode.
Send heartbeat package to serial port and instead of the query command from net to reduce the communication
flow.
3010 and above version supports heartbeat function which can send to serial and net.
Note: net heartbeat package and serial heartbeat package can be not used.
Modbus gateway includes modbus RTU transmission, modbus ASCII transmission, modbus RTU to TCP, modbus
polling and serial query.
Modbus RTU and modbus TCP: can realize the modbus serial port protocol and modbus net protocol convert.
Modbus polling:supports more than one master PC query the data of slave PC, the timeout can be set. 3010 and
above version supports this function.
Under the net transparent transmission mode, user can have the module sent registration package to server to
recognize the original of the data or work as the authorization code for server function.
Registration can be sent when the connection build between the module and server, also it can inset a registration
package data in front of the data package. The data registered can be MAC address or the definition registration
package(at most the definition registration can be 40 byte.)
Send registration package when building connection usually used in the situation that connecting the server
needed to register.
Carrying the registration package:insert the package in front of the registration and used in the protocol
transmission.
4.4.4. USR-cloud
USR-cloud aim to solve the problem of the communication between device and device, device and upper
machine( android, IOS,PC).USR-cloud used to transparent transport the data, the device connected can access remote
data without modify.USR-cloud can used in remote monitor, the internet of things, the internet of cars and intelligent
house, so the K7 installed USR-cloud. More information can be scan http://console.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 and supports the
devices with firmware 3009 and later versions.
Local port: The port of device, Remote port: Cloud software’s port
Communications Code: Password generated after adding the device to cloud software
Account:jin321_
Password:1987322
K7 can connect with the serial printing, operating the printing via net, and change the serial printer into net printer,
3010 and above version supports this function.
Testing way:
K7 supports customize webpage. The user can upgrade their webpage into K7 via customize webpage. To be more
convenient for user, we have prepared upgrade webpage package
Including webpage code(K7 default webpage code and medium webpage code), webpage tools can be download.
1. If you will customize webpage, please contact with the USR supports or the sale.
Modify the webpage code, open “UpgradeHtml.exe”, destination IP is the IP of K7, the final name of file is “fs”,
product choose the”M4”, then click the upgrade.
The unique MAC in the world for K7, can be check in the webpage. If the user have special demand, can set instant
MAC via webpage. Please do not all F. restore to the factory setting and the MAC will be back to the factory MAC.
Restart timeout( no data restore) used to keep K7 long time stable work. When net port can not receive the data,
or have note receive data for long time, K7 will restart in the time to prevent the communication from the abnormal.
The time can be set via webpage and AT command, range from 60~65536s, default value is 3600s. When the time less
than 60s, default is 0 which means that disable this function.
Before data connection, data serial port received will be put in the buffer zone. K7 serial received buffer:2Kbyte.
After connecting the TCP connection, clear the buffer data or not can be choose in the webpage, default do not clear. If
user enable the short connection, this function will do not work.
Used to save the server resource, used in the situation that several point to one. Short connection make sure all
the connection can work, do not need any extra way to filtrate.
TCP short connection can used under the TCP client mode. Enable the short connection and send data, if there is
no data received any data in serial port or the net port, it will disconnect.
Default disable, the interval time can be set, range from 2~255s, default 3s. setting diagram are as fellow:
5. Parameters Setting
The way to set K7 including setup software, webpage setting and serial port setting.
Configuring steps:
Modify the user name and password→ setting the access way to the IP address→ serial parameter→ the related
parameters for working method.
To ensure the normal using of software, the following steps are necessary
1.When using setting software to setting parameter, K7 and the PC of the setting software are in a LAN.
Click setup software and search K7, searched all K7. Display the device IP, device name, MAC and version for K7.
1. Click the K7 you searched. At first you should check the password, if the password is correct, there will show the
information for K7, if the password is error, software will bond out the window that you should enter the username and
password, the click enter. Both default username and password are admin. All the default parameters setting and there
will not bond out username and password.
Click Tidy Show and you will see all the basic parameters we can set, setting the parameters you need, and then
base save, and you can save the parameters you set, keep others in default.
Websocket port: refer to the character “ webpage to serial”, this port is the webpage to serial port
Username: the username forK7 to log in, the certification code to modify the parameters which can prevent other
user in the same LAN from changing K7 parameters.
Module static IP: the static IP for K7, keep it in the same LAN with your router.
Gateway: usually is the IP for router, setting correctly and user can communicating across the LAN and DDNS.
3. Port setting
Baud rate: serial port communication baud rate, can be the standard baud rate or customize.
Parity/ data/ stop:serial parameters: parity:none, odd, even, mark, space; data:5,6,7,8; stop:1,2.
Flow control: None/RS485/Hardware, Hardware means hardware flow control, none or RS485 means no flow
control.
Work mode: TCP Server /TCP Client/ Httpd Client/UDP Client/UDP Server
Remote IP/remote port:the IP and port of server connected when K7 work as a client including TCP Client/ Httpd
Client/UDP Client
Local port: the port that K7 build connection, recommend set to be 0 when K7 work as TCP client, which means
build in random connection.
Modbus TCP: setting when using the modbus TCP to modbus RTU
4. Firmware upgrade:
If the module firmware need to upgrade to the high vision,user can consult with sales to get the upgraded
firmware and click the device, upgrade the vision. When you upgrade it, connect directly the device and PC and notice
that PC upgrading module is forbidden.
Via the protocol, you can complete: search, set, save parameters, restore. For user to make their own setup parameters.
① Built socket:
Combine the MAC address the username, password and the parameter that need setting to be a setting
command.
Restart command.
① Command query
search FF 01 01 - - - 02
[usrname]
restore FF xx 02 [MAC] - xx
[password]
[usrname]
Read setting FF xx 03 [MAC] - xx
[password]
Storage [usrname]
FF xx 04 [MAC] - xx
setting [password]
[usrname] basic
basic setting FF xx 05 [MAC] xx
[password] parameters
[usrname]
USR-cloud 0x10 [MAC]
[password]
Note: the parity is sum parity: begin at the length add to the first digit of the parity. The sum is the value to parity,
and reserve the lower bits.
Search command
Restore command
FF 13 02 D8 B0 4C C0 0D 65 61 64 6D 69 6E 00 61 64 6D 69 6E 00 2D
parity sum:
2D = 13 + 02 + ... + 6E + 00
Note: username and password are 5 bytes+00, fill the blanks with 0
Send (16bits): FF 13 03 D8 B0 4C C0 0D 65 61 64 6D 69 6E 00 61 64 6D 69 6E 00 2E
Send (16bits):FF 13 04 D8 B0 4C C0 0D 65 61 64 6D 69 6E 00 61 64 6D 69 6E 00 2F
IP address type
Uc Flags 1 80
8th is 0: DHCP: 1: static IP
Ul Static IP 4 38 00 A8 C0 Static IP
Ul Gateway IP 4 01 00 A8 C0 Gateway
55 53 52 2D 54 43 50
Uc Mod Name 16 32 33 32 2D 45 00 00 Name for K7
00 00
Username 6 61 64 6D 69 6E 00 username
password 6 61 64 6D 69 6E 00 password
Ui Id 2 01 00 device ID
Device ID type(0~3)
0:no use
3:both
ucReserved 8 Unused
e.g.
FF 56 05 D8 B0 4C C0 0D 65 61 64 6D 69 6E 00 61 64 6D 69 6E 00 04 78 03 00 20 19 50 00 02 07 00 A8 C0 01 00 A8 C0
00 FF FF FF 55 53 52 2D 4B 33 00 00 00 00 00 00 00 00 00 00 61 64 6D 69 6E 00 61 64 6D 69 6E 00 02 01 00 00 D8 B0
4C C0 0D 65 10 0E 00 00 01 00 00 00 31
31 39 32 2E 31 36 38 2E
30 2E 31 00 00 00 00 00 Send the IP address or domain name in ASCII code,
Ui Telnet URL 30
00 00 00 00 00 00 00 00 e.g:92.168.0.1
00 00 00 00 00 00
Special selection
Work mode:
E.g.
FF 52 06 D8 B0 4C C0 0D 65 61 64 6D 69 6E 00 61 64 6D 69 6E 00 00 C2 01 00 08 01 01 01 00 00 00 00 17 00 17
00 31 39 32 2E 31 36 38 2E 30 2E 32 30 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 09 03 00
00 00 00 00 00 81 01 01 01 01 85
TAG_STATUS 0 FF
Packet_length 1 24
CMD_DISCOVER_TARGET 2 01
Board_type 3 00
Board_ID 4 00
55 53 52 2D 54 43
Application_title 19~34 50 32 33 32 2D 35 device name
30 30 00 00
checksum.
e.g.
FF 24 01 00 00 C0 A8 01 6B D8 B0 4C C0 0D 65 C3 0B 01 00 55 53 52 2D 4B 33 00 00 00 00 00 00 00 00 00 00 8E
Parity is minus the sum parity, original value is 0x00, then minus every bytes one by one as below:
0x8E = 00 - FF - 24 - 01 - 00 - 4B - ... - 31 - 00 - 00
Return all the parameters of K7 net, totally 180 bytes without parity
Correct:
FF 01 04 4B
⑤ Other return
Open the browse and enter the IP of K7,( default is 192.168.0.7) and user can open the K7 login windows. Enter
username:admin, password:admin, then click enter and enter the webpage.
Current IP address: default is static IP(192.168.0.7),here using DHCP to connect the PC.
NAC address
2. Local IP config
Static IP
Gateway:gateway address
3. TTL1
Baud rate
Data
Parity
Stop bits
Port mapping: UART packet time and length can be set here
Similar RFC2217
Work mode: TCP server,TCP client, UDP server,UDP client, HTTPD client
4. Web to serial
5. Misc Config
Websocket port
Net port
Username
Password
Reset timeout: after set time interval, serial or net have not receive the data, K7 will reset, and 0 means this
function disable.
6. Reboot
5.3. AT Command
Net AT command, the command collection that delivery via net port and module under the command mode,
details are like the serial port command.
Net AT command mode: keep the module and PC in the same LAN, and the user can setting via AT command.
Send www.usr.cn via UDP, if the module and PC in the same LAN, PC will receive the return data from K7, which
means module have enter the net AT command and can configure it.
Under AT command mode, if there is no command for 30s, K7 will exit the AT command.
AT+ command is the command collection that perform the command transport using UART and module under the
order mode. Later we will interpret the type in detail.
The default UART port parameters of the module are: baud rate1152000, no parity, data 8 and stop 1.
Instr
AT command test tools.UART interface commend to use secureCRT software tool or USR pro APP. Below are using
the secureCRT with UART to perform.
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.
Fill “+++”and “a” need to achieve in the time to reduce the chance of entering command mode while working
normally accidentally. Detail requirement are as fellows.
Time requirement:
T2<300ms
T3<300ms
T5<3s
The order change into temporary command mode from transparent transport mode:
1. Serial mode device send “+++”to module continuously. The module receive and send “a” back. Before sending“+++”is
the packaging time and can not send any data.
3. After the module receive “a, send “ok”to the device, and enter “AT”command
4. After the device receive “+ok” and know the module enter the AT command mode, then send AT command.
The order change into net transparent transport from AT command mode:
2.After the module receive the command, feedback “+ok”, then back to the previous working mode.
-1 Invalid format
-2 Invalid order
-3 Invalid operator
-4 Invalid parameter
-5 Not allow
5.3.4. AT Command
2 Z restart module
20 REGUSRN Setting/ query the content of registration package that customized, support
ASCII
22 HTPTPN Setting/ query in httpd client mode, the asking way of the http
37 UARTCLBUF Setting/ query clear serial port cache before module build connection function
enable/disable
43 UDPONN Setting/query not detect the remote IP and port under UDP mode
46 HEARTUSERN Setting/query port N customize heartbeat package, supports ASCII and HEX
47 REGUSERN Setting/query port N customize registration package, supports ASCII and HEX
1. AT+E
Format:
query
AT+E <CR>
<CR><LF>+OK=<on/off><CR><LF>
setting
AT+E=<on/off><CR>
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+E=0N
2. AT+Z
Format:
setting
AT+Z<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
3. AT+VER
Format:
query
AT+VER<CR>
<CR><LF>+OK=<ver><CR><LF>
Parameters:
4. AT+ENTM
Format:
setting
AT+ENTM<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
Perform this function, module enter the transparent transmission from AT command mode
5. AT+MAC
Format:
query
AT+MAC<CR>
<CR><LF>+OK=<mac><CR><LF>
Parameters:
6. AT+RELD
Format:
setting
AT+RELD<CR>
<CR><LF>+OK<CR><LF>
Parameters: none
7. AT+WANN
Format:
query
AT+WANN<CR>
<CR><LF>+OK=<mode,address,mask,gateway><CR><LF>
setting
AT+WANN=<mode,address,mask,gateway><CR>
<CR><LF>+OK<CR><LF>
Parameters:
static:static IP
address: IP address
mask:subnet masks
gateway:gateway address
E.g. : AT+WANN=static,192.168.0.7,255.255.255.0,192.168.0.1
8. AT+DNS
Format:
query
AT+DNS<CR>
setting
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+DNS=208.67.222.222
9. AT+WEBU
Format:
query
AT+WEBU<CR>
<CR><LF>+OK=<username,password><CR><LF>
setting
AT+WEBU<CR>
<CR><LF>+OK =<username,password><CR><LF>
Parameters:
E.g. : AT+WEBU=admin,admin
10. AT+WEBPORT
Format:
query
AT+WEBPORT<CR>
<CR><LF>+OK=<port><CR><LF>
setting
AT+WEBPORT<CR>
<CR><LF>+OK =<port><CR><LF>
Parameters:
E.g. : AT+WEBPORT=80
11. AT+SEARCH
Function: setting/query the searching port and keyword of the module in LAN
Format:
query
AT+SEARCH<CR>
<CR><LF>+OK=<port,keywords><CR><LF>
setting
AT+SEARCH =<port,keywords><CR><LF>
<CR><LF>+OK<CR><LF>
Parameters:
keywords:searching keyword of the module.default: www.usr.cn (at most for 20 bytes length)
12. AT+PLANG
Format:
query
<CR><LF>+OK=<language><CR><LF>
setting
AT+PLANG =<language><CR>
<CR><LF>+OK<CR><LF>
Parameters:
language:
E.g. : AT+PLANG=CN
13. AT+UARTN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
AT+UARTN<CR>
<CR><LF>+OK=<baudrate,data_bits,stop_bit,parity,flowctrl ><CR><LF>
setting :
AT+UARTN=<baudrate,data_bits,stop_bit,parity,flowctrl ><CR><LF>
<CR><LF>+OK<CR><LF>
Parameters:
baudrate:baud rate
data_bits:data: 5、6、7、8
parity:parity
NONE
EVEN
ODD
MARK
SPACE
E.g. : AT+UART=115200,8,1,NONE,NFC
14. AT+UARTTLN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query
AT+ UARTTLN<CR>
<CR><LF>+OK=<time,length><CR><LF>
setting
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+UARTTL1=0,0
15. AT+SOCKMN
(M: the port number of the socket, A~H. N:serial port number, 1~8. single socket please ignore the MN)
Format:
query
AT+SOCKMN<CR>
<CR><LF>+OK=<protocol,IP,port ><CR><LF>
setting
<CR><LF>+OK<CR><LF>
Parameters:
Protocol:protocol type
IP:if the module work in client mode, the IP address is server IP.
E.g. : AT+SOCKA1=TCPC,192.168.0.201,8234
16. AT+SOCKLKMN
(M: the port number of the socket, A~H. N:serial port number, 1~8. single socket please ignore the MN)
query
AT+ SOCKLKMN<CR>
<CR><LF>+OK=<sta><CR><LF>
Parameters:
17. AT+WEBSOCKPORT1
Format:
query
AT+ WEBSOCKPORT1<CR>
<CR><LF>+OK=<port><CR><LF>
setting
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+WEBSOCKPORT1=123
18. AT+REGENN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query
AT+REGENN <CR>
<CR><LF>+OK=<status><CR><LF>
setting
AT+REGENN =<status><CR>
<CR><LF>+OK<CR><LF>
Parameters:
status:
E.g. : AT+REGEN1=USR
19. AT+REGTCPN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting query under TCP client mode, registration package perform mechanism
Format:
query
AT+REGTCPN<CR>
<CR><LF>+OK=< status><CR><LF>
setting
<CR><LF>+OK<CR><LF>
Parameters:
status:
ALL: both
E.g. : AT+REGTCP1=all
20. AT+REGUSRN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query
AT+ REGUSRN<CR>
<CR><LF>+OK=<data><CR><LF>
setting
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+REGUSR1=12345
21. AT+REGCLOUDN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query
AT+REGCLOUDN<CR>
<CR><LF>+OK=<ID,CODE><CR><LF>
setting
AT+REGCLOUDN=<ID,CODE><CR>
<CR><LF>+OK<CR><LF>
Parameters:
ID:device ID
22. AT+HTPTPN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: setting/query the questing way under the HTTPD Client mode
Format:
query
AT+HTPTPN<CR>
<CR><LF>+OK=< status><CR><LF>
setting
AT+HTPTPN=< status><CR>
<CR><LF>+OK<CR><LF>
Parameters:
status:
GET
POST
E.g. : AT+HTPTP1=GET
23. AT+HTPURLN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query
AT+HTPURLN<CR>
<CR><LF>+OK=<URL><CR><LF>
setting
AT+HTPURLN =<URL><CR>
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+HTPURL1=1/PHP
24. AT+HTPHEADN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query
AT+HTPHEADN<CR>
<CR><LF>+OK =<string><CR><LF>
setting
AT+HTPHEADN =<string><CR>
<CR><LF>+OK<CR><LF>
Parameters:
There is a <<CRLF>> fellow the HTTPD, how many HTTPD and how many <<CRLF>>.
E.g. : AT+HTPHEAD=Accept:text<<CRLF>>
25. AT+HTPCHDN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters: Sta:
ON:enable
OFF:disable
E.g. :AT+HTPCHD1=ON
26. AT+HEARTENN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=< status><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
status:
E.g. : AT+HEARTEN1=ON
27. AT+HEARTTPN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=< type><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
status:
E.g. : AT+HEARTTP=NET
28. AT+HEARTTMN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=< time><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
E.g. : AT+HEARTTM=30
29. AT+HEARTDTN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=< data><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
E.g. :AT+HEARTDT=www.usr.cn.
30. AT+PDTIME
Format:
query :
AT+PDTIME<CR>
<CR><LF>+OK=<time><CR><LF>
Parameters:
31. AT+MID
Format:
query :
setting :
<CR><LF>+OK<CR><LF>
Parameters:
32. AT+USERMAC
Format:
setting :
<CR><LF>+OK<CR><LF>
Parameters:
E.g.: AT+USERMAC=002233445566
33. AT+RFCENN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
AT+RFCENN<CR>
<CR><LF>+OK=<status><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
ON:enable RFC2217
OFF:disable RFC2217
E.g. : AT+RFCEN=ON
34. AT +SOCKSLN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
sta:status
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<time><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
36. AT+RSTIM
Format:
query :
<CR><LF>+OK=<time><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
37. AT+UARTCLBUF
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
sta
ON:clear
38. AT+SOCKTONN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<time><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
39. AT+MODTCPN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
sta:
40. AT+MODPOLLN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
sta
41. AT+MODTON
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<time><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
42. AT+NETPRN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
sta
43. AT+UDPONN
(N:the number of the port, 1~8. for single port socket, ignore the N)
Function: query /setting UDP do not detect the remote IP and port
Format:
query :
<CR><LF>+OK=<sta><CR><LF>
setting :
<CR><LF>+OK<CR><LF>
Parameters:
Sta
ON:enable do not detect the remote IP and port under UDP mode
OFF:disable do not detect the remote IP and port under UDP mode
44. AT+CFGTF
Format:
setting :
<CR><LF>+OK=<sta><CR><LF>
Parameters:
45. AT+PINGN
Format:
setting :
<CR><LF>+OK<CR><LF>
Parameters:
E.g.: AT+PING1=www.baidu.com.
46. AT+HEARTUSERN
Function: query /setting the defined heartbeat package of the port N, supports ASCII and HEX
Format:
query :
setting :
<CR><LF>+OK<CR><LF>
Parameters:
data:content of the defined heartbeat package , ASCII can be 40 bytes and HEX can be 80 bytes at
most
47. AT+REGUSERN
Function: query /setting the defined registration package of the port N, supports ASCII and HEX
Format:
query :
setting :
<CR><LF>+OK<CR><LF>
Parameters:
data:defined registration package content,ASCII can be 40 bytes and HEX can be 80 bytes at most
6. Contact us
Company: Jinan USR IOT Technology Co., Ltd
Web: http://www.usriot.com/
Skype: lisausr
Support: http://h.usriot.com/index.php?c=frontTicket&m=sign
7. Disclaimer
The document provides information about USR-K7 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.
USR may make changes to specifications and products description without notice.
8. Modified History