EasyManua.ls Logo

b&t RTL8720D - ATPR-Receive Data

Default Icon
34 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
中山市博安通通信技术有限公司
ZHONGSHAN B&T TECHNOLOGYCo., Ltd
Page 19 of 34
Code
2: <Buffer Size> exceeds ATPT limit
3: con_id not found
4: <dst_ip> or <dst_port> error for udp server case
5: sendto() error for udp server
6: sendto() error for udp client
7: TCP server should send data to the seed (server needs to send data to the client, not
directly to
server)
8: write error for tcp client/server
Note
If it is a TCP server, you cannot directly read and write data from the con_id of the
server, it must be for his connection
child con_id to read and write data
Example
//TCP server read data
# ATPN=B&T-1,test123456
[ATPN] OK
# ATPS=0,4004
#
[ATPS] OK
[ATPS] con_id=1
// when the client connects
[ATPS] A client connected to server[1]
con_id:5,seed,tcp,address:192.168.20.112,port:52581,socket:2
#ATPI
con_id:1,server,tcp,address:192.168.20.115,port:4004,socket:0
con_id:3,seed,tcp,address:192.168.20.112,port:52451,socket:-1
con_id:4,seed,tcp,address:192.168.20.112,port:52575,socket:-1
con_id:5,seed,tcp,address:192.168.20.112,port:52581,socket:2
con_id:2,server,udp,address:192.168.20.115,port:4005,socket:1
[ATPI] OK
# ATPT=6,5:123456 //Send data
#
[ATPT] OK,5
4.5
ATPR-receive data
ATPR =<con_id>,<Buffer Size>
Description
Receive data
Response
Success
[ATPR] OK ,<data size>,<con_id>[,<dst_ip>,<dst_port>]:<data>
Fail
[ATPR] ERROR:<error_no>
Parameter
con_id: 1~9
Buffer Size: bufter size (temporarily disabled)