Internet Protocol Support Profile. More...
Data Structures |
|
| struct | ble_ipsp_event_param_t |
|
IPSP event parameter.
More...
|
|
| struct | ble_ipsp_evt_t |
|
IPSP event and associated parameter type.
More...
|
|
| struct | ble_ipsp_handle_t |
|
IPSP handle.
More...
|
|
| struct | ble_ipsp_init_t |
|
IPSP initialization structure.
More...
|
|
Macros |
|
| #define | BLE_IPSP_MAX_CHANNELS 1 |
|
Maximum IPSP channels required to be supported.
|
|
| #define | BLE_IPSP_MTU 1280 |
|
Maximum Transmit Unit on IPSP channel.
|
|
| #define | BLE_IPSP_RX_MPS 50 |
|
Receive MPS used by IPSP.
|
|
| #define | BLE_IPSP_TX_MPS 212 |
|
Transmission MPS used by IPSP.
More...
|
|
| #define | BLE_IPSP_RX_BUFFER_SIZE 1280 |
|
Maximum data size that can be received.
More...
|
|
| #define | BLE_IPSP_RX_BUFFER_COUNT 4 |
|
Maximum number of receive buffers.
More...
|
|
| #define | BLE_IPSP_PSM 0x0023 |
|
L2CAP Protocol Service Multiplexers number.
|
|
Typedefs |
|
| typedef uint32_t(* | ble_ipsp_evt_handler_t )( ble_ipsp_handle_t const *p_handle, ble_ipsp_evt_t const *p_evt) |
|
Profile event handler type.
More...
|
|
Enumerations |
|
| enum |
ble_ipsp_evt_type_t
{
BLE_IPSP_EVT_CHANNEL_CONNECTED , BLE_IPSP_EVT_CHANNEL_DISCONNECTED , BLE_IPSP_EVT_CHANNEL_DATA_RX , BLE_IPSP_EVT_CHANNEL_DATA_TX_COMPLETE } |
|
IPSP event identifier type.
More...
|
|
Functions |
|
| uint32_t | ble_ipsp_init ( ble_ipsp_init_t const *p_init) |
|
Function for initializing the Internet Protocol Support Profile.
More...
|
|
| uint32_t | ble_ipsp_connect ( ble_ipsp_handle_t const *p_handle) |
|
Function for requesting a channel creation for the Internet Protocol Support Profile.
More...
|
|
| uint32_t | ble_ipsp_send ( ble_ipsp_handle_t const *p_handle, uint8_t const *p_data, uint16_t data_len) |
|
Function for sending IP data to peer.
More...
|
|
| uint32_t | ble_ipsp_disconnect ( ble_ipsp_handle_t const *p_handle) |
|
Function for disconnecting IP transport.
More...
|
|
| void | ble_ipsp_incoming_channel_accept (uint16_t conn_handle) |
|
Function to accept incoming connections from a peer.
More...
|
|
| void | ble_ipsp_incoming_channel_reject (uint16_t conn_handle) |
|
Function to reject incoming connections from a peer.
More...
|
|
| void | ble_ipsp_evt_handler ( ble_evt_t const *p_evt) |
|
BLE event handler of the module.
More...
|
|
Detailed Description
Internet Protocol Support Profile.
This module implements the Internet Protocol Support Profile creating and managing transport for 6lowpan. GATT is used to discover if IPSP is supported or not, but no IP data is exchanged over GATT. To exchange data, LE L2CAP Credit Mode is used. The PSM used for the channel is BLE_IPSP_PSM and is defined by the specification. The MTU mandated by the specification is 1280 bytes.
- Note
- Attention! To maintain compliance with Nordic Semiconductor ASA's Bluetooth profile qualification listings, this section of source code must not be modified.
Macro Definition Documentation
| #define BLE_IPSP_RX_BUFFER_COUNT 4 |
Maximum number of receive buffers.
Maximum number of receive buffers to be used per IPSP channel. Each receive buffer is of size BLE_IPSP_RX_BUFFER_SIZE . This configuration has implications on the number of SDUs that can be received while an SDU is being consumed by the application (6LoWPAN/IP Stack).
| #define BLE_IPSP_RX_BUFFER_SIZE 1280 |
Maximum data size that can be received.
Maximum data size that can be received on the IPSP channel. Modify this values to intentionally set a receive size less than the MTU set on the channel.
| #define BLE_IPSP_TX_MPS 212 |
Transmission MPS used by IPSP.
- Note
- The actual MPS used is minimum of this value and the one requested by the peer during the channel setup. Here, the value used is (23 + 27 * 7).
Typedef Documentation
| typedef uint32_t(* ble_ipsp_evt_handler_t)( ble_ipsp_handle_t const *p_handle, ble_ipsp_evt_t const *p_evt) |
Profile event handler type.
- Parameters
-
[in] p_handle Identifies the connection and channel on which the event occurred. [in] p_evt Event and related parameters (if any).
- Returns
- Provision for the application to indicate if the event was successfully processed or not. Currently not used.
Enumeration Type Documentation
| enum ble_ipsp_evt_type_t |
IPSP event identifier type.
Function Documentation
| uint32_t ble_ipsp_connect | ( | ble_ipsp_handle_t const * | p_handle | ) |
Function for requesting a channel creation for the Internet Protocol Support Profile.
Channel creation for Internet Protocol Support Profile (IPSP) is requested using this API. Connection handle provided in p_handle parameter identifies the peer with which the IPSP channel is being requested. NRF_SUCCESS return value by the API is only indicative of request procedure having succeeded. Result of channel establishment is known when the BLE_IPSP_EVT_CHANNEL_CONNECTED event is notified. Therefore, the application must wait for BLE_IPSP_EVT_CHANNEL_CONNECTED event on successful return of this API.
- Parameters
-
[in] p_handle Indicates the connection handle on which IPSP channel is to be created.
- Return values
-
NRF_SUCCESS If initialization of the service was successful, else, an error code indicating reason for failure.
| uint32_t ble_ipsp_disconnect | ( | ble_ipsp_handle_t const * | p_handle | ) |
Function for disconnecting IP transport.
- Parameters
-
[in] p_handle Identifies IPSP transport.
- Return values
-
NRF_SUCCESS If initialization of the service was successful, else, an error code indicating reason for failure.
| void ble_ipsp_evt_handler | ( | ble_evt_t const * | p_evt | ) |
BLE event handler of the module.
- Parameters
-
[in] p_evt BLE event to be handled.
- Return values
-
NRF_SUCCESS If initialization of the service was successful, else, an error code indicating reason for failure.
| void ble_ipsp_incoming_channel_accept | ( | uint16_t | conn_handle | ) |
Function to accept incoming connections from a peer.
- Parameters
-
[in] conn_handle Identifies the link with the peer.
| void ble_ipsp_incoming_channel_reject | ( | uint16_t | conn_handle | ) |
Function to reject incoming connections from a peer.
- Parameters
-
[in] conn_handle Identifies the link with the peer.
| uint32_t ble_ipsp_init | ( | ble_ipsp_init_t const * | p_init | ) |
Function for initializing the Internet Protocol Support Profile.
- Parameters
-
[in] p_init Information needed to initialize the service.
- Return values
-
NRF_SUCCESS If initialization of the service was successful, else, an error code indicating reason for failure.
| uint32_t ble_ipsp_send | ( | ble_ipsp_handle_t const * | p_handle , |
| uint8_t const * | p_data , | ||
| uint16_t | data_len | ||
| ) |
Function for sending IP data to peer.
- Parameters
-
[in] p_handle Instance of the logical channel and peer for which the data is intended. [in] p_data Pointer to memory containing the data to be transmitted.
- Note
- This memory must be resident and should not be freed unless BLE_IPSP_EVT_CHANNEL_DATA_TX_COMPLETE event is notified.
- Parameters
-
[in] data_len Length/size of data to be transferred.
- Return values
-
NRF_SUCCESS If initialization of the service was successful, else, an error code indicating reason for failure.