Home/Support/Support Forum/Creating and sending 0x11 packets in API mode using C (CW SDK)
New and improved user forum site coming soon

Creating and sending 0x11 packets in API mode using C (CW SDK)

0 votes
Maybe I have drawn a complete blank here, but I am having some trouble finding better examples within the SDK example projects on how to actually create specific frames using the C SDK functions, rather than just a payload with my own strings in it, which I've generally been doing up until now. Specifically, I am trying to have my Coordinator send a Router node a traceroute packet using the [0x11] Transmit Explicit frame and I would then expect to hear back an 0x8D from the Router via the XBEE_HANDLE_RX event handlers. I am using 0x11 because the notes in xbee_wpan.c advise this:

User code should use wpan_envelope_send() instead of calling this
function directly.

int _xbee_endpoint_send( const wpan_envelope_t FAR *envelope, uint16_t flags)
xbee_dev_t *xbee;
xbee_header_transmit_explicit_t header;
int error;

// note that wpan_envelope_send() verifies that envelope is not NULL

xbee = (xbee_dev_t *) envelope->dev;

// Convert envelope to the necessary frame type and call xbee_frame_send
header.frame_type = (uint8_t) XBEE_FRAME_TRANSMIT_EXPLICIT;

In xbee_wpan.c, I see that header.frame_type seems to be what I need, but I am unsure of what sequence to call it due to it mentioning not to use it. Does wpan_envelope_send() automatically assign 0x11 to every outbound message? That would be confusing too since I want to set my transmit options to 0x08 [Unicast Trace Route].

asked Jan 19, 2021 in DigiMesh Proprietary Mesh Networking by D2K New to the Community (16 points)
edited Jan 19, 2021 by D2K

Please log in or register to answer this question.