Contiki-NG
Loading...
Searching...
No Matches
border-router-cbor.h File Reference

CBOR-over-SLIP protocol for talking to the serialradio firmware (examples/serialradio) from the native border router. More...

#include "contiki.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Functions

void br_cbor_send_tx_frame (uint8_t msg_id, const uint8_t *frame, uint16_t len)
 Send a raw 802.15.4 frame to the radio for transmission.
void br_cbor_send_set_param (uint8_t msg_id, uint16_t param, int32_t value)
 Set a radio parameter on the serial radio (SET_PARAM).
void br_cbor_send_get_addr64 (uint8_t msg_id)
 Request the radio's EUI-64 link-layer address (GET_ADDR64).
void br_cbor_send_router_mode (uint8_t msg_id, bool enable)
 Enable or disable border-router radio mode (ROUTER_MODE).
void border_router_cbor_input (const uint8_t *data, int len)
 Parse and dispatch a complete CBOR frame (including trailing CRC16) received from the serial radio.

Detailed Description

CBOR-over-SLIP protocol for talking to the serialradio firmware (examples/serialradio) from the native border router.

Frames carried over SLIP have the layout:

[ CBOR map ] [ CRC16-LE (2 bytes) ]

The opcode constants below MUST be kept in sync with examples/serialradio/serial-radio.h.

Author
Joakim Eriksson joaki.nosp@m.m.er.nosp@m.iksso.nosp@m.n@ri.nosp@m..se

Definition in file border-router-cbor.h.

Function Documentation

◆ br_cbor_send_tx_frame()

void br_cbor_send_tx_frame ( uint8_t msg_id,
const uint8_t * frame,
uint16_t len )

Send a raw 802.15.4 frame to the radio for transmission.

Parameters
msg_idSession id echoed back in the TX_RESPONSE event.
frameThe fully-framed 802.15.4 packet to transmit.
lenLength of frame in bytes.