User guide

Redpine Signals, Inc. Proprietary and Confidential. Page 153
R
R
S
S
9
9
1
1
1
1
0
0
-
-
N
N
-
-
1
1
1
1
-
-
2
2
2
2
/
/
2
2
4
4
/
/
2
2
8
8
S
S
o
o
f
f
t
t
w
w
a
a
r
r
e
e
P
P
r
r
o
o
g
g
r
r
a
a
m
m
m
m
i
i
n
n
g
g
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
M
M
a
a
n
n
u
u
a
a
l
l
V
V
e
e
r
r
s
s
i
i
o
o
n
n
4
4
.
.
1
1
5
5
Figure 31 : Send Frame Body (TCP and client UDP)
Figure 32 Send Frame Body (Listening UDP)
Note: The extra 2 in the equation for uDataOffset in the diagram above is the
two bytes included in the payload. Refer to Data payload for data frames (from
Host to module).
The Host driver should take care of buffering the data, thereby isolating the
application from the packet size limitation with respect to the module/firmware.
For example, for 3000 bytes of the data the flow will be as follows:
There has to be a wrapper in the driver that buffers the data from the application
layer. The maximum size of the buffer that the modules can handle is 1400
bytes. Thus the wrapper takes care of sending multiple frames to the module.
Payload Buffer
uSocketDescriptor
uBufferLength
uDataOffset
Send Frame Body
Payload
Offset
2 Bytes
4 Bytes
2 Bytes
uDataOffset
= 2 + 2 + 4 + 2 + Offset
Offset
= 44 (client and listening
TCP
)
32 (client
UDP
)
Offset is 44 or 32 bytes of dummy data, can be put to all '0'
Payload Buffer
uSocketDescriptor
uBufferLength
uDataOffset
Destination Port
Destination
IP
Send Frame Body
Payload
Offset
2 Bytes
4 Bytes
2 Bytes
uDataOffset
= 2 + 2 + 4 + 2 + 2 + 4 + Offset
Offset
= 26 bytes (listening
UDP
)
Offset is 26 bytes of dummy data, can be put to all '0'
2 Bytes
4 Bytes