Loading...
Searching...
No Matches
nimble_statconn.h File Reference

Simple static connection manager for NimBLE netif. More...

Detailed Description

Simple static connection manager for NimBLE netif.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file nimble_statconn.h.

#include <errno.h>
#include <stdint.h>
#include "nimble_netif.h"
+ Include dependency graph for nimble_statconn.h:

Go to the source code of this file.

Data Structures

struct  nimble_statconn_cfg_t
 Statconn connection parameters. More...
 

Macros

#define NIMBLE_STATCONN_ADV_ITVL_MS   (90U)
 Advertising interval used when in advertising mode [in ms].
 
#define NIMBLE_STATCONN_CONN_WIN_MS   (100U)
 Scan window used when opening new connections [in ms].
 
#define NIMBLE_STATCONN_CONN_TIMEOUT_MS   (600U)
 Opening a new connection is aborted after this time [in ms].
 
#define NIMBLE_STATCONN_CONN_ITVL_MIN_MS   (75U)
 Minimum connection interval used when opening a new connection.
 
#define NIMBLE_STATCONN_CONN_ITVL_MAX_MS   (75U)
 Maximum connection interval to use.
 
#define NIMBLE_STATCONN_CONN_LATENCY   (0)
 Slave latency used for new connections [# of connection events].
 
#define NIMBLE_STATCONN_CONN_SUPERTO_MS   (2500U)
 Supervision timeout used for new connections [in ms].
 
#define NIMBLE_STATCONN_PHY_MODE   NIMBLE_PHY_1M
 BLE PHY mode used by statconn.
 

Functions

void nimble_statconn_init (void)
 Initialize the statconn module.
 
void nimble_statconn_eventcb (nimble_netif_eventcb_t cb)
 Register a callback that is called on netif events.
 
int nimble_statconn_add_master (const uint8_t *addr, const nimble_statconn_cfg_t *cfg)
 Connect to peer (master) with a given address as slave.
 
int nimble_statconn_add_slave (const uint8_t *addr, const nimble_statconn_cfg_t *cfg)
 Connect to a peer (slave) with a given address as master.
 
int nimble_statconn_rm (const uint8_t *addr)
 Remove the connection to the given peer.