Developer World
Spresense SDK Library v3.3.0-375c679
bt_spp.h File Reference

SPP API. More...

#include <stdint.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/bt_common.h>

Go to the source code of this file.

Classes

struct  bt_spp_ops_s
 Bluetooth SPP application callbacks. More...
 
struct  bt_spp_state_s
 Bluetooth SPP context. More...
 

Functions

bool bt_spp_is_supported (void)
 Get SPP support or not support. More...
 
int bt_spp_connect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth SPP connect Connect to peer device with SPP. More...
 
int bt_spp_disconnect (struct bt_acl_state_s *bt_acl_state)
 Bluetooth SPP disconnect Disconnect to peer device with SPP. More...
 
int bt_spp_set_uuid (BT_UUID *uuid)
 Bluetooth SPP set UUID. More...
 
int bt_spp_send_tx_data (struct bt_acl_state_s *bt_acl_state, uint8_t *data, int len)
 Bluetooth SPP send Tx data. More...
 
int bt_spp_register_cb (struct bt_spp_ops_s *bt_spp_ops)
 Bluetooth SPP Register notification Set callback about SPP callbacks. More...
 

Detailed Description

SPP API.

Author
Sony Semiconductor Solutions Corporation

This API is for using SPP and includes Function and Callback

Function Documentation

◆ bt_spp_is_supported()

bool bt_spp_is_supported ( void  )

Get SPP support or not support.

Return values
Suppotor Not support

◆ bt_spp_connect()

int bt_spp_connect ( struct bt_acl_state_s bt_acl_state)

Bluetooth SPP connect Connect to peer device with SPP.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_spp_disconnect()

int bt_spp_disconnect ( struct bt_acl_state_s bt_acl_state)

Bluetooth SPP disconnect Disconnect to peer device with SPP.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
Return values
errorcode

◆ bt_spp_set_uuid()

int bt_spp_set_uuid ( BT_UUID uuid)

Bluetooth SPP set UUID.

Parameters
[in]uuidUUID BT_UUID
Return values
errorcode

◆ bt_spp_send_tx_data()

int bt_spp_send_tx_data ( struct bt_acl_state_s bt_acl_state,
uint8_t *  data,
int  len 
)

Bluetooth SPP send Tx data.

Parameters
[in]bt_acl_stateBluetooth context bt_acl_state_s
[in]datauint8_t * Tx data.
[in]lenint Tx data size.
Return values
errorcode

◆ bt_spp_register_cb()

int bt_spp_register_cb ( struct bt_spp_ops_s bt_spp_ops)

Bluetooth SPP Register notification Set callback about SPP callbacks.

Parameters
[in]bt_spp_opsCallback functions bt_spp_ops_s
Return values
errorcode