mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-23 05:24:46 -07:00
BLE advertising improvements (#4151)
* Support longer advertised BLE UUID * BLE: support manufacturer data * Don't pair when GapPairingNone * Add PR feedback --------- Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <services/battery_service.h>
|
||||
#include <services/serial_service.h>
|
||||
#include <furi.h>
|
||||
#include <ble/core/ble_defs.h>
|
||||
|
||||
typedef struct {
|
||||
FuriHalBleProfileBase base;
|
||||
@@ -47,7 +48,11 @@ static void ble_profile_serial_stop(FuriHalBleProfileBase* profile) {
|
||||
#define CONNECTION_INTERVAL_MAX (0x24)
|
||||
|
||||
static const GapConfig serial_template_config = {
|
||||
.adv_service_uuid = 0x3080,
|
||||
.adv_service =
|
||||
{
|
||||
.UUID_Type = UUID_TYPE_16,
|
||||
.Service_UUID_16 = 0x3080,
|
||||
},
|
||||
.appearance_char = 0x8600,
|
||||
.bonding_mode = true,
|
||||
.pairing_method = GapPairingPinCodeShow,
|
||||
@@ -71,7 +76,8 @@ static void
|
||||
config->adv_name,
|
||||
furi_hal_version_get_ble_local_device_name_ptr(),
|
||||
FURI_HAL_VERSION_DEVICE_NAME_LENGTH);
|
||||
config->adv_service_uuid |= furi_hal_version_get_hw_color();
|
||||
config->adv_service.UUID_Type = UUID_TYPE_16;
|
||||
config->adv_service.Service_UUID_16 |= furi_hal_version_get_hw_color();
|
||||
}
|
||||
|
||||
static const FuriHalBleProfileTemplate profile_callbacks = {
|
||||
|
||||
Reference in New Issue
Block a user