Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
François Revol
firmware
Commits
8b226993
Commit
8b226993
authored
Jun 21, 2020
by
schneider
Browse files
feat(ble): Only be discoverble in the BLE dialog
parent
0f23df0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
epicardium/ble/ble_main.c
View file @
8b226993
...
...
@@ -156,7 +156,7 @@ static const uint8_t bleAdvDataDisc[] =
/*! flags */
2
,
/*! length */
DM_ADV_TYPE_FLAGS
,
/*! AD type */
DM_FLAG_LE_
GENERAL
_DISC
|
/*! flags */
DM_FLAG_LE_
LIMITED
_DISC
|
/*! flags */
DM_FLAG_LE_BREDR_NOT_SUP
,
/*! tx power */
...
...
@@ -180,6 +180,16 @@ uint8_t bleScanDataDisc[] =
'c'
,
'a'
,
'r'
,
'd'
,
'1'
,
'0'
,
'-'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
};
/*! advertising data, connectable mode */
static
const
uint8_t
bleAdvDataConn
[]
=
{
/*! flags */
2
,
/*! length */
DM_ADV_TYPE_FLAGS
,
/*! AD type */
DM_FLAG_LE_BREDR_NOT_SUP
,
};
/**************************************************************************************************
Client Characteristic Configuration Descriptors
**************************************************************************************************/
...
...
@@ -458,7 +468,7 @@ static void bleSetup(bleMsg_t *pMsg)
AppAdvSetData
(
APP_SCAN_DATA_DISCOVERABLE
,
sizeof
(
bleScanDataDisc
),
(
uint8_t
*
)
bleScanDataDisc
);
/* set advertising and scan response data for connectable mode */
AppAdvSetData
(
APP_ADV_DATA_CONNECTABLE
,
0
,
NULL
);
AppAdvSetData
(
APP_ADV_DATA_CONNECTABLE
,
sizeof
(
bleAdvDataConn
),
(
uint8_t
*
)
bleAdvDataConn
);
AppAdvSetData
(
APP_SCAN_DATA_CONNECTABLE
,
0
,
NULL
);
active
=
true
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment