Skip to content

ESP32 example BT_DISCOVERY has error ESP_ERR_INVALID_ARG #890

Open
@rexzz

Description

@rexzz
  1. trying to run copy of esp-idf\examples\bluetooth\bt_discovery.

NOW WORKING AFTER I manually edited SDK. BUT this is a note if others trying this out or if someone wants to update "README" for bt_discovery.(Maybe mention editing SDK). AND IF SOMEONE wants to look at my SDK changes and tell me if something is wrong, I'd appreciate.

  1. trying to run copy of esp-idf\examples\bluetooth\bt_discovery. Using idf.py. menuconfig and build seem to run.

  2. I get error "app_main enable controller failed: ESP_ERR_INVALID_ARG"

  3. BT choices in menuconfig in two pictures

  4. "Menuconfig" presents slighty different choices than those in the bt_discovery\README.rst.
    (nowhere can I see where to not choose "release DRAM from classic BT Controller" as README suggests)

  5. so I look at esp-dif\examples\bluetooth\bt_discover\sdkconfig.defaults
    and found which was different than what menuconfig had generated.
    CONFIG_BT_ENABLED=y
    CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY= ns
    CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY=y
    CONFIG_BTDM_CONTROLLER_MODE_BTDM=
    CONFIG_CLASSIC_BT_ENABLED=y
    CONFIG_A2DP_ENABLE=n
    CONFIG_GATTS_ENABLE=n
    CONFIG_GATTC_ENABLE=n
    CONFIG_BLE_SMP_ENABLE=n

  6. So I changed SDK for my copy. Most of the relvant bits are below.

CONFIG_BT_ENABLED=y

CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY is not set

CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY=y

CONFIG_BTDM_CONTROLLER_MODE_BTDM is not set

CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN=2
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN=0
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=2
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0=y

CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1 is not set

CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y

CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4 is not set

CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y
CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG=y

CONFIG_BTDM_MODEM_SLEEP_MODE_EVED is not set

CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL=y
CONFIG_BLUEDROID_ENABLED=y
CONFIG_BLUEDROID_PINNED_TO_CORE_0=y

CONFIG_BLUEDROID_PINNED_TO_CORE_1 is not set

CONFIG_BLUEDROID_PINNED_TO_CORE=0
CONFIG_BTC_TASK_STACK_SIZE=8000

CONFIG_BLUEDROID_MEM_DEBUG is not set

CONFIG_CLASSIC_BT_ENABLED=y

CONFIG_A2DP_ENABLE is not set

CONFIG_BT_SPP_ENABLED=y

btcontroller
Bluedroid
esp_err

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions