ESP_IOT v2.5
IOT ESP Coding
BLEServerNetworking.h File Reference
#include "../../Defines.h"
Include dependency graph for BLEServerNetworking.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BLE_SERVER_CALLBACK_ONREAD   0
 
#define BLE_SERVER_CALLBACK_ONWRITE   1
 
#define BLE_SERVER_CALLBACK_STATUS_MESSAGE   2
 used to send a string message back (which might be sent to MQTT for example) More...
 
#define BLE_SERVER_MAX_CALLBACKS   3
 

Functions

void setup_BLEServerNetworking (char *serviceName, char *deviceName, char *serviceUUID, char *characteristicUUID)
 the 'setup' for this module BLEServerNetworking. Here the service name is added (and potentially more later) More...
 
void loop_BLEServerNetworking ()
 the 'setup' for this module BLEServerNetworking. Here the service name is added (and potentially more later) More...
 
char * getServiceName_BLEServerNetworking ()
 NOT HERE. More...
 
void sendBLEMessageACKMessage ()
 send something over bluetooth, this right now is 0x01 More...
 

Macro Definition Documentation

◆ BLE_SERVER_CALLBACK_ONREAD

#define BLE_SERVER_CALLBACK_ONREAD   0

Definition at line 25 of file BLEServerNetworking.h.

◆ BLE_SERVER_CALLBACK_ONWRITE

#define BLE_SERVER_CALLBACK_ONWRITE   1

Definition at line 26 of file BLEServerNetworking.h.

◆ BLE_SERVER_CALLBACK_STATUS_MESSAGE

#define BLE_SERVER_CALLBACK_STATUS_MESSAGE   2

used to send a string message back (which might be sent to MQTT for example)

Definition at line 28 of file BLEServerNetworking.h.

◆ BLE_SERVER_MAX_CALLBACKS

#define BLE_SERVER_MAX_CALLBACKS   3

Definition at line 29 of file BLEServerNetworking.h.

Function Documentation

◆ getServiceName_BLEServerNetworking()

char * getServiceName_BLEServerNetworking ( )

NOT HERE.

retrieve the service name (PTFEEDER, PTFeeder:Name, PTClicker:Name, etc)

NOT HERE.

Definition at line 38 of file BLEServerNetworking.cpp.

Here is the caller graph for this function:

◆ loop_BLEServerNetworking()

void loop_BLEServerNetworking ( )

the 'setup' for this module BLEServerNetworking. Here the service name is added (and potentially more later)

the 'setup' for this module BLEServerNetworking. Here the service name is added (and potentially more later)

Definition at line 496 of file BLEServerNetworking.cpp.

Here is the caller graph for this function:

◆ sendBLEMessageACKMessage()

void sendBLEMessageACKMessage ( )

send something over bluetooth, this right now is 0x01

send something over bluetooth, this right now is 0x01

Definition at line 619 of file BLEServerNetworking.cpp.

Here is the caller graph for this function:

◆ setup_BLEServerNetworking()

void setup_BLEServerNetworking ( char *  serviceName,
char *  deviceName,
char *  serviceUUID,
char *  characteristicUUID 
)

the 'setup' for this module BLEServerNetworking. Here the service name is added (and potentially more later)

defines the operations on BLE Server Networking BLEServerNetworking is the "server" side of the BLE interface

10.13.25 copy here.. 8.16.25 (use the setting)

! Seems to be a length of 31 too long //DEBUG: crashed

See also
https://github.com/espressif/arduino-esp32/issues/7894

create server

set callbacks

create the DEAD service so a GEN3 can be ruled out..

2904 descriptors are a special case, when createDescriptor is called with 0x2904 a NimBLE2904 class is created with the correct properties and sizes. However we must cast the returned reference to the correct type as the method only returns a pointer to the base NimBLEDescriptor class.

used??

create our main _SERVICE_UUID service`

Custom descriptor: Arguments are UUID, Properties, max length in bytes of the value

now the advertising..

Create an advertising instance and add the services to the advertised data

advertise service UUID for DEAD

advertise service UUID for iDOGWatch

If your device is battery powered you may consider setting scan response to false as it will extend battery life at the expense of less data sent.

Definition at line 513 of file BLEServerNetworking.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: