Contiki-NG
Files | Functions

Files

file  ble-beacond.c
 Implementation for the CC13xx/CC26xx BLE Beacon Daemon.
 
file  ble-beacond.h
 Header file for the CC13xx/CC26xx BLE Beacon Daemon.
 

Functions

rf_ble_beacond_result_t rf_ble_beacond_init (void)
 Initialize the BLE advertisement/beacon daemon.
 
rf_ble_beacond_result_t rf_ble_beacond_config (clock_time_t interval, const char *name)
 Set the device name to use with the BLE advertisement/beacon daemon. More...
 
rf_ble_beacond_result_t rf_ble_beacond_start (void)
 Start the BLE advertisement/beacon daemon. More...
 
rf_ble_beacond_result_t rf_ble_beacond_stop (void)
 Stop the BLE advertisement/beacon daemon.
 
int8_t rf_ble_is_active (void)
 Check whether the BLE beacond is currently active. More...
 
rf_ble_beacond_result_t rf_ble_set_tx_power (int8_t dbm)
 Set TX power for BLE advertisements. More...
 
int8_t rf_ble_get_tx_power (void)
 Get TX power for BLE advertisements. More...
 

Detailed Description

Function Documentation

◆ rf_ble_beacond_config()

rf_ble_beacond_result_t rf_ble_beacond_config ( clock_time_t  interval,
const char *  name 
)

Set the device name to use with the BLE advertisement/beacon daemon.

Parameters
intervalThe interval (ticks) between two consecutive beacon bursts
nameThe device name to advertise

If name is NULL it will be ignored. If interval==0 it will be ignored. Thus, this function can be used to configure a single parameter at a time if so desired.

Definition at line 339 of file ble-beacond.c.

◆ rf_ble_beacond_start()

rf_ble_beacond_result_t rf_ble_beacond_start ( void  )

Start the BLE advertisement/beacon daemon.

Returns
RF_CORE_CMD_OK: Success, RF_CORE_CMD_ERROR: Failure

Before calling this function, the name to advertise must first be set by calling rf_ble_beacond_config(). Otherwise, this function will return an error.

Definition at line 347 of file ble-beacond.c.

◆ rf_ble_get_tx_power()

int8_t rf_ble_get_tx_power ( void  )

Get TX power for BLE advertisements.

Returns
The TX power for BLE advertisements

Definition at line 373 of file ble-beacond.c.

◆ rf_ble_is_active()

int8_t rf_ble_is_active ( void  )

Check whether the BLE beacond is currently active.

Return values
1BLE daemon is active
0BLE daemon is inactive
-1BLE daemon is disabled

Definition at line 360 of file ble-beacond.c.

◆ rf_ble_set_tx_power()

rf_ble_beacond_result_t rf_ble_set_tx_power ( int8_t  dbm)

Set TX power for BLE advertisements.

Parameters
dbmThe 'at least' TX power in dBm, values avove 5 dBm will be ignored

Set TX power to 'at least' power dBm. This works with a lookup table. If the value of 'power' does not exist in the lookup table, TXPOWER will be set to the immediately higher available value

Definition at line 366 of file ble-beacond.c.