File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ const NimBLEAddress& NimBLEAdvertisedDevice::getAddress() const {
8686/* *
8787 * @brief Get the advertisement type.
8888 * @return The advertising type the device is reporting:
89- * * BLE_HCI_ADV_TYPE_ADV_IND (0) - indirect advertising
90- * * BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD (1) - direct advertising - high duty cycle
91- * * BLE_HCI_ADV_TYPE_ADV_SCAN_IND (2) - indirect scan response
92- * * BLE_HCI_ADV_TYPE_ADV_NONCONN_IND (3) - indirect advertising - not connectable
93- * * BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD (4) - direct advertising - low duty cycle
89+ * * BLE_HCI_ADV_RPT_EVTYPE_ADV_IND (0) - indirect advertising - connectable and scannable
90+ * * BLE_HCI_ADV_RPT_EVTYPE_DIR_IND (1) - direct advertising - connectable
91+ * * BLE_HCI_ADV_RPT_EVTYPE_SCAN_IND (2) - indirect scan response - not connectable - scannable
92+ * * BLE_HCI_ADV_RPT_EVTYPE_NONCONN_IND (3) - beacon only - not connectable - not scannable
93+ * * BLE_HCI_ADV_RPT_EVTYPE_SCAN_RSP (4) - scan response
9494 */
9595uint8_t NimBLEAdvertisedDevice::getAdvType () const {
9696 return m_advType;
@@ -752,11 +752,12 @@ uint8_t NimBLEAdvertisedDevice::getAddressType() const {
752752 */
753753bool NimBLEAdvertisedDevice::isConnectable () const {
754754# if CONFIG_BT_NIMBLE_EXT_ADV
755- if (m_isLegacyAdv) {
756- return m_advType == BLE_HCI_ADV_RPT_EVTYPE_ADV_IND || m_advType == BLE_HCI_ADV_RPT_EVTYPE_DIR_IND ;
755+ if (! m_isLegacyAdv) {
756+ return ( m_advType & BLE_HCI_ADV_CONN_MASK) || ( m_advType & BLE_HCI_ADV_DIRECT_MASK) ;
757757 }
758758# endif
759- return (m_advType & BLE_HCI_ADV_CONN_MASK) || (m_advType & BLE_HCI_ADV_DIRECT_MASK);
759+
760+ return m_advType == BLE_HCI_ADV_RPT_EVTYPE_ADV_IND || m_advType == BLE_HCI_ADV_RPT_EVTYPE_DIR_IND;
760761} // isConnectable
761762
762763/* *
You can’t perform that action at this time.
0 commit comments