nRF51 IoT SDK
|
6LoWPAN techniques defined for BLE. More...
Data Structures | |
struct | ble_6lowpan_data_rx_t |
Event parameters associated with the BLE_6LO_EVT_INTERFACE_DATA_RX event. More... | |
union | ble_6lowpan_event_param_t |
Asynchronous event parameter type. More... | |
struct | ble_6lowpan_event_t |
Asynchronous event type. More... | |
struct | ble_6lowpan_init_t |
Initialization parameters type. More... | |
Macros | |
#define | BLE_6LOWPAN_MAX_INTERFACE 1 |
Maximum 6LoWPAN interface supported by module. | |
#define | BLE_6LOWPAN_TX_FIFO_SIZE 16 |
Maximum transmit packets that are buffered per interface. More... | |
Typedefs | |
typedef void(* | ble_6lowpan_evt_handler_t )(iot_interface_t *p_interface, ble_6lowpan_event_t *p_event) |
Asynchronous event notification callback type. | |
Enumerations | |
enum | ble_6lowpan_event_id_t { BLE_6LO_EVT_ERROR, BLE_6LO_EVT_INTERFACE_ADD, BLE_6LO_EVT_INTERFACE_DELETE, BLE_6LO_EVT_INTERFACE_DATA_RX } |
Asynchronous event identifiers type. More... | |
Functions | |
uint32_t | ble_6lowpan_init (const ble_6lowpan_init_t *p_init) |
Initializes the module. More... | |
uint32_t | ble_6lowpan_interface_send (const iot_interface_t *p_interface, const uint8_t *p_packet, uint16_t packet_len) |
Sends IPv6 packet on the 6LoWPAN interface. More... | |
6LoWPAN techniques defined for BLE.
This module implements 6LoWPAN techniques defined for BLE, including IP and UDP header compression and decompression and conversion of EUI-48 BLE addresses to EUI-64 and on to IPv6 addresses. This layer does not implement IP level functionality of neighbor discovery etc.
#define BLE_6LOWPAN_TX_FIFO_SIZE 16 |
Maximum transmit packets that are buffered per interface.
FIFO size must be a power of 2.
Asynchronous event identifiers type.
uint32_t ble_6lowpan_init | ( | const ble_6lowpan_init_t * | p_init | ) |
Initializes the module.
[in] | p_init | Initialization parameters. |
NRF_SUCCESS | If initialization was successful. Otherwise, an error code is returned. |
uint32_t ble_6lowpan_interface_send | ( | const iot_interface_t * | p_interface, |
const uint8_t * | p_packet, | ||
uint16_t | packet_len | ||
) |
Sends IPv6 packet on the 6LoWPAN interface.
This function is used to send an IPv6 packet on the interface. 6LoWPAN compression techniques are applied on the packet before the packet is transmitted. The packet might not be transferred to the peer immediately based on the flow control on the BLE Link. In this case, the packet is queued to be transferred later.
[in] | p_interface | Identifies the interface on which the packet is to be sent. |
[in] | p_packet | IPv6 packet to be sent. Memory for the packet should be allocated using mem_alloc and should not be freed. The module is responsible for freeing the memory using mem_free. The module will free the packet once the transmission is complete or the packet can no longer be transmitted (in case of link disconnection.) |
[in] | packet_len | Length of the IPv6 packet. |
NRF_SUCCESS | If the send request was successful. |