6LoWPAN techniques defined for BLE.
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.
- Note
- Currently, only the 6LoWPAN node (host) role is supported.
#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.
Enumerator |
---|
BLE_6LO_EVT_ERROR |
Notification of an error in the module.
|
BLE_6LO_EVT_INTERFACE_ADD |
Notification of a new 6LoWPAN interface added.
|
BLE_6LO_EVT_INTERFACE_DELETE |
Notification of a 6LoWPAN interface deleted.
|
BLE_6LO_EVT_INTERFACE_DATA_RX |
Notification of an IP packet received on the interface.
|
Initializes the module.
- Parameters
-
[in] | p_init | Initialization parameters. |
- Return values
-
NRF_SUCCESS | If initialization was successful. Otherwise, an error code is returned. |
uint32_t ble_6lowpan_interface_disconnect |
( |
const iot_interface_t * |
p_interface | ) |
|
Disconnects 6LoWPAN interface.
This function is used to terminate connection on the L2CAP CoC layer. It calls ble_ipsp_disconnect to perform disconnection procedure. The registered callback from 6LoWPAN module propagates BLE_6LO_EVT_INTERFACE_DELETE event after operation is finished.
- Parameters
-
[in] | p_interface | Identifies the interface on which the disconnection has to be performed. |
- Return values
-
NRF_SUCCESS | If disconnection 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.
- Parameters
-
[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. |
- Return values
-
NRF_SUCCESS | If the send request was successful. |