1 #ifndef RUUVI_TASK_ADVERTISEMENT_H
2 #define RUUVI_TASK_ADVERTISEMENT_H
51 #define SCAN_RSP_NAME_MAX_LEN (11U)
53 #define RT_ADV_SCAN_WINDOW_MS (7000U)
55 #define RT_ADV_SCAN_INTERVAL_MS (7000U)
144 const char *
const device_name);
uint32_t rd_status_t
bitfield for representing errors
rd_status_t rt_adv_scan_stop(void)
Abort scanning.
rd_status_t rt_adv_send_data(ri_comm_message_t *const msg)
Send given message as a BLE advertisement.
rd_status_t rt_adv_connectability_set(const bool enable, const char *const device_name)
Start advertising BLE GATT connection.
rd_status_t rt_adv_scan_start(const ri_comm_evt_handler_fp_t on_evt)
Start scanning BLE advertisements.
bool rt_adv_is_init(void)
check if advertisement is initialized
rd_status_t rt_adv_uninit(void)
Uninitializes data advertising.
rd_status_t rt_adv_init(rt_adv_init_t *const adv_init_settings)
Initializes data advertising.
rd_status_t rt_adv_stop(void)
Stops advertising. This is relevant only if the message was on repeat.
Ruuvi error codes and error check function.
rd_status_t(* ri_comm_evt_handler_fp_t)(const ri_comm_evt_t evt, void *p_data, size_t data_len)
Application event handler for communication events.
Application message structure used for communication.
Bitfield to describe related sensor data.
Initial configuration for advertisement. PHY will be transferred to GATT.
uint16_t adv_interval_ms
ms / advertisement, not counting random delay
uint16_t manufacturer_id
BLE SIG id of board manufacturer.
bool is_rx_le_2m_phy_enabled
True if 2 MBit/s PHY is enabled in receiver.
ri_radio_channels_t channels
Radio channels, typically 37, 38, and/or 39.
uint8_t max_adv_length
Maximum length of advertisement data.
int8_t adv_pwr_dbm
Power to antenna, dBm.
bool is_rx_le_1m_phy_enabled
True if 1 MBit/s PHY is enabled in receiver.
bool is_rx_le_coded_phy_enabled
True if 125 kBit/s PHY is enabled in receiver.