UM0893
2.
The packet has to be configured according to the MAC frame format described in
802.15.4 general MAC frame format
a)
Table 30.
Packet FCF configuration as 0x0821
Bits
Bit 3
[0:2]
Frame
Security
type
enabled
100
0
b)
The pseudocode below shows an example of configuration and 13-byte packet transmission
(plus 2 bytes for the CRC):
uint8_t txPacket[] = {
0x0f, // packet length including two bytes for the CRC
0x21, // FCF - data frame type, no security, no frame
0x08, // FCF - 16 bits short destination address, no
0x00, // sequence number
0x12, // destination pan id (lowest byte)
0x23, // destination pan id
0x02, // destination short address/node id (lowest byte)
0x22, // destination short address/node id (highest byte)
0x12, // packet data
0x34, // packet data
0x56, // packet data
0x78, // packet data
0x9A, // packet data
0xBC
};
St_Status status;
/* Sent the txPacket */
status = ST_RadioTransmit(txPacket);
Designing an application using the SimpleMAC Library APIs
Set the packet FCF, the packet source and the destination address mode. Refer to
Table 30
for an example of FCF configuration.
Bit 4
Bit 5
Frame
Ack.
pending
request
0
1
0x21
Specify the packet PAN identifier as well as its short or long addresses, according
to the addressing mode selected on the packet FCF.
pending, ack request, no intra
source pan id and address
// packet data
Doc ID 16995 Rev 10
:
Bits
Bit 6
Bit 7
[8:9]
Intra-
Reserved
PAN
0
0
00
(highest byte)
Bits
Bits
[10:11]
[12:13]
Destination
addressing
Reserved
mode
10
00
0x08
PAN
IEEE
Bits
[14:15]
Source
addressing
mode
00
43/54
Need help?
Do you have a question about the SimpleMAC STM32W108 Series and is the answer not in the manual?
Questions and answers