[Feature request] Bluetooth: Setting both Limited and General discovery at same time.

Nramanoodles
Posts: 6
Joined: Thu Mar 12, 2020 6:50 pm

[Feature request] Bluetooth: Setting both Limited and General discovery at same time.

Postby Nramanoodles » Thu Jul 02, 2020 7:45 pm

It says we can set the discoverable mode of our esp32 to limited or general, but what about both?

Code: Select all

esp_err_tesp_bt_gap_set_scan_mode(esp_bt_connection_mode_tc_mode, esp_bt_discovery_mode_td_mode)
Looking into https://github.com/espressif/esp-idf/bl ... _api.h#L58, it seems we can only do one at a time:

Code: Select all

typedef enum {
    ESP_BT_NON_DISCOVERABLE,            /*!< Non-discoverable */
    ESP_BT_LIMITED_DISCOVERABLE,        /*!< Limited Discoverable */
    ESP_BT_GENERAL_DISCOVERABLE,        /*!< General Discoverable */
} esp_bt_discovery_mode_t;
Thanks,
-Nathan Ramanathan

chegewara
Posts: 1174
Joined: Wed Jun 14, 2017 9:00 pm

Re: [Feature request] Bluetooth: Setting both Limited and General discovery at same time.

Postby chegewara » Fri Jul 03, 2020 6:49 am

Flags
This is an important AD Type and it is almost always included in advertising packets (It can’t be included in scan response PDUs). It tells you about the advertising state of the device and which of the two transports, Bluetooth low energy and Bluetooth BR/EDR it supports.

A device which is discoverable can either be in Limited Discoverable Mode or General Discoverable Mode. Limited Discoverable Mode is used to suggest that the device should have a high priority to scanning devices and often the advertising interval used when in this mode is faster than when in the General Discoverable Mode. A device will be in Limited Discoverable Mode for a limited time only and the core specification recommends this be no more than one minute. A device whose Flags field indicates it is not discoverable just means scanning devices should ignore it.
https://www.bluetooth.com/blog/advertis ... ks-part-2/

Nramanoodles
Posts: 6
Joined: Thu Mar 12, 2020 6:50 pm

Re: [Feature request] Bluetooth: Setting both Limited and General discovery at same time.

Postby Nramanoodles » Fri Jul 03, 2020 2:35 pm

So how do I set both? On most usb Bluetooth dongles we can write two IACs (usually limited and general IAC), but esp32 apparently only supports one IAC at a time:

https://books.google.com/books?id=mUyiR ... al&f=false

Fortunately, this feature can be supported by editing the LMP files for esp32. But those files are not open source...

Who is online

Users browsing this forum: No registered users and 50 guests