RAK411 PROGRAMMING MANUAL
V1.7
COPYRIGHT ©
SHENZHEN RAKWIRELESS TECHNOLOGY CO., LTD
ETDX1603021415
37
local_port
2
0-65535
Local port number
Description:
This command is to create a TCP CLIENT and connect with the remote TCP SERVER, if the
operation is successful, the module will return a hexadecimal identifier that is used to
manage the connection. This command can create up to eight connections. Port numbers
are in sorted in ascending order.
Return Value:
Parameter
Bytes
Value
Description
<CODE>
2
0xB3,0x00
Response Code
<SOCKET_FLAG>
2
0--7
Socket identifier
<STATUS>
1
0
Command successful
-2
Failed to create
-3
Failed to bind
-4
Target port connection
error
4.3.3 UDP Client
Command:
rak_udp_client
Syntax:
typedef struct {
uint32_t cmd;
uint32_t dest_addr;
uint16_t dest_port;
uint16_t local_port;
}rak_client_t;
Parameter:
Parameter
Bytes
Value
Description
cmd
4
0xB3,0x00,0x00,0x00
Command Code
dest_addr
4
Target IP address