Commit 8b226993 authored by schneider's avatar schneider
Browse files

feat(ble): Only be discoverble in the BLE dialog

parent 0f23df0a
...@@ -156,7 +156,7 @@ static const uint8_t bleAdvDataDisc[] = ...@@ -156,7 +156,7 @@ static const uint8_t bleAdvDataDisc[] =
/*! flags */ /*! flags */
2, /*! length */ 2, /*! length */
DM_ADV_TYPE_FLAGS, /*! AD type */ DM_ADV_TYPE_FLAGS, /*! AD type */
DM_FLAG_LE_GENERAL_DISC | /*! flags */ DM_FLAG_LE_LIMITED_DISC | /*! flags */
DM_FLAG_LE_BREDR_NOT_SUP, DM_FLAG_LE_BREDR_NOT_SUP,
/*! tx power */ /*! tx power */
...@@ -180,6 +180,16 @@ uint8_t bleScanDataDisc[] = ...@@ -180,6 +180,16 @@ uint8_t bleScanDataDisc[] =
'c','a','r','d','1','0','-','0','0','0','0','0','0' '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 Client Characteristic Configuration Descriptors
**************************************************************************************************/ **************************************************************************************************/
...@@ -458,7 +468,7 @@ static void bleSetup(bleMsg_t *pMsg) ...@@ -458,7 +468,7 @@ static void bleSetup(bleMsg_t *pMsg)
AppAdvSetData(APP_SCAN_DATA_DISCOVERABLE, sizeof(bleScanDataDisc), (uint8_t *) bleScanDataDisc); AppAdvSetData(APP_SCAN_DATA_DISCOVERABLE, sizeof(bleScanDataDisc), (uint8_t *) bleScanDataDisc);
/* set advertising and scan response data for connectable mode */ /* 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); AppAdvSetData(APP_SCAN_DATA_CONNECTABLE, 0, NULL);
active = true; active = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment