BLE issue on ESP32C6 #96829
-
| Hello , I used ESP32C3 with BLE peripheral_esp and peripheral_csc no issues at all, then I swap for the ESP32C6 but found and error CONFIG_LOG=yCONFIG_ESP_SPIRAM=yCONFIG_SHARED_MULTI_HEAP=yCONFIG_SPIRAM_MODE_OCT=yCONFIG_SPIRAM_TYPE_ESPPSRAM64=yCONFIG_SPIRAM_SPEED_80M=yCONFIG_ESP32S3_DATA_CACHE_64KB=yCONFIG_ESP_SPIRAM_MEMTEST=yFor ESP32C6CONFIG_PSA_WANT_KEY_TYPE_AES=y CONFIG_BT=y CONFIG_CONSOLE=y | 
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 3 replies
-
| @oscalcmen Sorry I missed this one. Fix in #97645 | 
Beta Was this translation helpful? Give feedback.
-
| Hello Sylvio,
It compiles correctly but BLE cannot be initialized it gives an error
I (138) boot: libc heap size 336 kB.
I (138) spi_flash: detected chip: boya
I (139) spi_flash: flash io: dio
W (139) spi_flash: Detected size(16384k) larger than the size in the
binary image header(8192k). Using the size in the binary image header.
*** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
Bluetooth init failed (err -5)
thanks… On Tue, Oct 14, 2025 at 9:59 PM Sylvio Alves ***@***.***> wrote:
 @oscalcmen <https://github.com/oscalcmen> Sorry I missed this one.
 Please, enable FLASH as in below to make it work. I'll provide a Pr to fix
 this later.
 CONFIG_FLASH=yCONFIG_FLASH_MAP=y
 —
 Reply to this email directly, view it on GitHub
 <#96829 (comment)>,
 or unsubscribe
 <https://github.com/notifications/unsubscribe-auth/AAWAVUBMHV22HH36JVPDT3D3XXID7AVCNFSM6AAAAACH6ZPBV6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINRYGI4DAMY>
 .
 You are receiving this because you were mentioned.Message ID:
 ***@***.***
 .com>
 -- 
Oscar Alcántara Méndez
México | 
Beta Was this translation helpful? Give feedback.
-
| Hello,
adding log info
*** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
[00:00:00.000,000] <inf> esp32_bt_adapter: Using main XTAL as clock source,
chip ver: 1
[00:00:00.000,000] <inf> esp32_bt_adapter: ble controller commit:[35fe65f]
[00:00:00.005,000] <inf> esp32_bt_adapter: Bluetooth MAC: 40:4c:ca:5e:cc:c0
[00:00:02.084,000] <err> bt_hci_driver_esp32: Send packet timeout error
[00:00:02.084,000] <err> bt_hci_core: Unable to send to driver (err -116)
[00:00:02.084,000] <wrn> bt_hci_core: opcode 0x1003 status 0x1f
Bluetooth init failed (err -5)… On Sat, Oct 18, 2025 at 5:54 AM Oscar Alcantara ***@***.***> wrote:
 Hello Sylvio,
 It compiles correctly but BLE cannot be initialized it gives an error
 I (138) boot: libc heap size 336 kB.
 I (138) spi_flash: detected chip: boya
 I (139) spi_flash: flash io: dio
 W (139) spi_flash: Detected size(16384k) larger than the size in the binary image header(8192k). Using the size in the binary image header.
 *** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
 Bluetooth init failed (err -5)
 thanks
 On Tue, Oct 14, 2025 at 9:59 PM Sylvio Alves ***@***.***>
 wrote:
> @oscalcmen <https://github.com/oscalcmen> Sorry I missed this one.
> Please, enable FLASH as in below to make it work. I'll provide a Pr to fix
> this later.
>
> CONFIG_FLASH=yCONFIG_FLASH_MAP=y
>
> —
> Reply to this email directly, view it on GitHub
> <#96829 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAWAVUBMHV22HH36JVPDT3D3XXID7AVCNFSM6AAAAACH6ZPBV6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINRYGI4DAMY>
> .
> You are receiving this because you were mentioned.Message ID:
> <zephyrproject-rtos/zephyr/repo-discussions/96829/comments/14682803@
> github.com>
>
 --
 Oscar Alcántara Méndez
 México
 -- 
Oscar Alcántara Méndez
México | 
Beta Was this translation helpful? Give feedback.
-
| Hi, can you provide me: 
 Thanks. | 
Beta Was this translation helpful? Give feedback.
-
| Sylvio,
Yes, i did west update, Zephyr SDK version 0.17.4, i did not add any other
module to Zephyr besides the blob espressif libs. I'm not so sure how to
get the full log. Adding CONFIG_LOG_DEFAULT_LEVEL=4 to the prj.conf,
terminal showed the below text at booting. (Is there any guide on how to do
it?  (sorry for my ignorance, kind of new to Zephyr, I'm a EE not a SW guy)
I (141) boot: libc heap size 326 kB.
I (142) spi_flash: detected chip: boya
I (142) spi_flash: flash io: dio
W (142) spi_flash: Detected size(16384k) larger than the size in the binary
image header(8192k). Using the size in the binary image header.
Previous to adding CONFIG_LOG_DEFAULT_LEVEL=4 the terminal showed this:
*** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
[00:00:00.000,000] <inf> esp32_bt_adapter: Using main XTAL as clock source,
chip ver: 1
[00:00:00.000,000] <inf> esp32_bt_adapter: ble controller commit:[35fe65f]
[00:00:00.005,000] <inf> esp32_bt_adapter: Bluetooth MAC: 40:4c:ca:5e:cc:c0
[00:00:02.085,000] <err> bt_hci_driver_esp32: Send packet timeout error
[00:00:02.085,000] <err> bt_hci_core: Unable to send to driver (err -116)
[00:00:02.085,000] <wrn> bt_hci_core: opcode 0x1003 status 0x1f
Bluetooth init failed (err -5)
CONFIG_ESP_SIMPLE_BOOT=y
CONFIG_BOOTLOADER_MCUBOOT=n
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SMP=y
CONFIG_BT_DEVICE_NAME="ESP peripheral"
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=y
CONFIG_BT_BAS=y
CONFIG_BT_DEVICE_APPEARANCE=768
CONFIG_ENTROPY_ESP32_RNG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
# CONFIG_MBEDTLS=y
# CONFIG_MBEDTLS_BUILTIN=y
# CONFIG_MBEDTLS_ENABLE_HEAP=y
# CONFIG_MBEDTLS_HEAP_SIZE=6000
# CONFIG_MBEDTLS_SHA256=y
# CONFIG_MBEDTLS_PSA_CRYPTO_C=y
# #CONFIG_ZEPHYR_MBEDTLS_MODULE=y
# CONFIG_MBEDTLS_ENABLE_HEAP=y
# CONFIG_MBEDTLS_CIPHER_AES_ENABLED=y
# CONFIG_MBEDTLS_CIPHER=y
# #CONFIG_MBEDTLS_LIBRARY=y
# #CONFIG_MBEDTLS_ZEPHYR_ENTROPY=y
# CONFIG_MBEDTLS_CFG_FILE="config-mbedtls.h"
CONFIG_I2C=y… On Sat, Oct 18, 2025 at 6:50 AM Sylvio Alves ***@***.***> wrote:
 Hi, can you provide me:
    1. Current Zephyr branch revision/sha (have you run west update?)
    2. Full log output
    3. Any extra conf you added into the sample code
 Thanks.
 —
 Reply to this email directly, view it on GitHub
 <#96829 (comment)>,
 or unsubscribe
 <https://github.com/notifications/unsubscribe-auth/AAWAVUCCR4VUGMP5OUAKLZ33YJASVAVCNFSM6AAAAACH6ZPBV6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINZRG4ZDINI>
 .
 You are receiving this because you were mentioned.Message ID:
 ***@***.***
 .com>
 -- 
Oscar Alcántara Méndez
México | 
Beta Was this translation helpful? Give feedback.
-
| Sylvio,
It seems to that the error in generated when command 1003 is sent using
bt_send function in hci_core.c
*** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
[00:00:00.001,000] <inf> esp32_bt_adapter: Using main XTAL as clock source,
chip ver: 1
[00:00:00.002,000] <inf> esp32_bt_adapter: ble controller commit:[35fe65f]
[00:00:00.014,000] <inf> esp32_bt_adapter: Bluetooth MAC: 40:4c:ca:5e:cc:c0
[00:00:00.093,000] <err> bt_hci_core: Sending command 0x0c03 (buf
0x40826d24) to driver
[00:00:00.095,000] <err> bt_hci_core: Sending command 0x1003 (buf
0x40826d24) to driver
[00:00:02.100,000] <err> bt_hci_driver_esp32: Send packet timeout error
[00:00:02.100,000] <err> bt_hci_core: Unable to send to driver (err -116)
[00:00:02.104,000] <wrn> bt_hci_core: opcode 0x1003 status 0x1f
Bluetooth init failed (err -5)
I hope this helps
[image: image.png]
On Sat, Oct 18, 2025 at 10:00 AM Oscar Alcantara ***@***.***>
wrote:…  Sylvio,
 Yes, i did west update, Zephyr SDK version 0.17.4, i did not add any other
 module to Zephyr besides the blob espressif libs. I'm not so sure how to
 get the full log. Adding CONFIG_LOG_DEFAULT_LEVEL=4 to the prj.conf,
 terminal showed the below text at booting. (Is there any guide on how to do
 it?  (sorry for my ignorance, kind of new to Zephyr, I'm a EE not a SW guy)
 I (141) boot: libc heap size 326 kB.
 I (142) spi_flash: detected chip: boya
 I (142) spi_flash: flash io: dio
 W (142) spi_flash: Detected size(16384k) larger than the size in the
 binary image header(8192k). Using the size in the binary image header.
 Previous to adding CONFIG_LOG_DEFAULT_LEVEL=4 the terminal showed this:
 *** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
 [00:00:00.000,000] <inf> esp32_bt_adapter: Using main XTAL as clock
 source, chip ver: 1
 [00:00:00.000,000] <inf> esp32_bt_adapter: ble controller commit:[35fe65f]
 [00:00:00.005,000] <inf> esp32_bt_adapter: Bluetooth MAC: 40:4c:ca:5e:cc:c0
 [00:00:02.085,000] <err> bt_hci_driver_esp32: Send packet timeout error
 [00:00:02.085,000] <err> bt_hci_core: Unable to send to driver (err -116)
 [00:00:02.085,000] <wrn> bt_hci_core: opcode 0x1003 status 0x1f
 Bluetooth init failed (err -5)
 CONFIG_ESP_SIMPLE_BOOT=y
 CONFIG_BOOTLOADER_MCUBOOT=n
 CONFIG_LOG=y
 CONFIG_LOG_DEFAULT_LEVEL=4
 CONFIG_BT=y
 CONFIG_BT_PERIPHERAL=y
 CONFIG_BT_SMP=y
 CONFIG_BT_DEVICE_NAME="ESP peripheral"
 CONFIG_BT_DIS=y
 CONFIG_BT_DIS_PNP=y
 CONFIG_BT_BAS=y
 CONFIG_BT_DEVICE_APPEARANCE=768
 CONFIG_ENTROPY_ESP32_RNG=y
 CONFIG_ENTROPY_GENERATOR=y
 CONFIG_FLASH=y
 CONFIG_FLASH_MAP=y
 # CONFIG_MBEDTLS=y
 # CONFIG_MBEDTLS_BUILTIN=y
 # CONFIG_MBEDTLS_ENABLE_HEAP=y
 # CONFIG_MBEDTLS_HEAP_SIZE=6000
 # CONFIG_MBEDTLS_SHA256=y
 # CONFIG_MBEDTLS_PSA_CRYPTO_C=y
 # #CONFIG_ZEPHYR_MBEDTLS_MODULE=y
 # CONFIG_MBEDTLS_ENABLE_HEAP=y
 # CONFIG_MBEDTLS_CIPHER_AES_ENABLED=y
 # CONFIG_MBEDTLS_CIPHER=y
 # #CONFIG_MBEDTLS_LIBRARY=y
 # #CONFIG_MBEDTLS_ZEPHYR_ENTROPY=y
 # CONFIG_MBEDTLS_CFG_FILE="config-mbedtls.h"
 CONFIG_I2C=y
 On Sat, Oct 18, 2025 at 6:50 AM Sylvio Alves ***@***.***>
 wrote:
> Hi, can you provide me:
>
>    1. Current Zephyr branch revision/sha (have you run west update?)
>    2. Full log output
>    3. Any extra conf you added into the sample code
>
> Thanks.
>
> —
> Reply to this email directly, view it on GitHub
> <#96829 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAWAVUCCR4VUGMP5OUAKLZ33YJASVAVCNFSM6AAAAACH6ZPBV6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINZRG4ZDINI>
> .
> You are receiving this because you were mentioned.Message ID:
> <zephyrproject-rtos/zephyr/repo-discussions/96829/comments/14717245@
> github.com>
>
 --
 Oscar Alcántara Méndez
 México
 -- 
Oscar Alcántara Méndez
México | 
Beta Was this translation helpful? Give feedback.
-
| Hi, can you paste the full bootloader messages as well? I (65) soc_init: ESP Simple boot
I (65) soc_init: compile time Oct 19 2025 11:27:35
I (65) soc_init: chip revision: v0.1
I (66) flash_init: SPI Speed      : 80MHz
I (68) flash_init: SPI Mode       : DIO
I (71) flash_init: SPI Flash Size : 8MB
I (75) boot: DRAM	: lma=00000020h vma=40800000h size=11764h ( 71524)
I (81) boot: DRAM	: lma=0001178ch vma=40811780h size=025d4h (  9684)
I (87) boot: IROM	: lma=00020000h vma=42800000h size=05870h ( 22640)
I (93) boot: IROM	: lma=00030000h vma=42000000h size=4e8ech (321772)
I (111) boot: libc heap size 340 kB.
I (111) spi_flash: detected chip: generic
I (111) spi_flash: flash io: dio
*** Booting Zephyr OS build v4.2.0-6166-g8a72d776c5af ***
Bluetooth initialized
Advertising successfully started | 
Beta Was this translation helpful? Give feedback.
-
| hello
Sure, by the way can you share with me the whole project you have used?
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x40800000,len:0x13400
load:0x40813410,len:0x2a98
SHA-256 comparison failed:
Calculated: 9d2746e263c5735dca035db747090e320e98cecd93eb9dd6f0b61fade6eed127
Expected: 0000000020a10000000000000000000000000000000000000000000000000000
Attempting to boot anyway...
entry 0x40808f26
I (68) soc_init: ESP Simple boot
I (69) soc_init: compile time Oct 20 2025 08:14:32
I (69) soc_init: chip revision: v0.1
I (70) flash_init: SPI Speed      : 80MHz
I (72) flash_init: SPI Mode       : DIO
I (75) flash_init: SPI Flash Size : 8MB
I (79) boot: DRAM : lma=00000020h vma=40800000h size=13400h ( 78848)
I (85) boot: DRAM : lma=00013428h vma=40813410h size=02a98h ( 10904)
I (91) boot: IRAM : lma=00015ed8h vma=00000000h size=0a120h ( 41248)
I (97) boot: IRAM : lma=00020000h vma=42800000h size=06ab4h ( 27316)
I (103) boot: IRAM : lma=00026abch vma=00000000h size=0953ch ( 38204)
I (109) boot: IRAM : lma=00030000h vma=42000000h size=484cch (296140)
I (116) boot: IROM : lma=00030000h vma=42000000h size=484CAh (296138) map
I (122) boot: DROM : lma=00020000h vma=42800000h size=06AC0h ( 27328) map
I (140) boot: libc heap size 331 kB.
I (140) spi_flash: detected chip: boya
I (140) spi_flash: flash io: dio
W (141) spi_flash: Detected size(16384k) larger than the size in the binary
image header(8192k). Using the size in the binary image header.
*** Booting Zephyr OS build v4.2.0-3009-g1f3fb17a77bc ***
[00:00:00.000,000] <inf> esp32_bt_adapter: Using main XTAL as clock source,
chip ver: 1
[00:00:00.000,000] <inf> esp32_bt_adapter: ble controller commit:[35fe65f]
[00:00:00.005,000] <inf> esp32_bt_adapter: Bluetooth MAC: 40:4c:ca:5e:cc:c0
[00:00:02.083,000] <err> bt_hci_driver_esp32: Send packet timeout error
[00:00:02.083,000] <err> bt_hci_core: Unable to send to driver (err -116)
[00:00:02.083,000] <wrn> bt_hci_core: opcode 0x1003 status 0x1f
Bluetooth init failed (err -5)
regards… On Sun, Oct 19, 2025 at 7:44 AM Sylvio Alves ***@***.***> wrote:
 Hi, can you paste the full bootloader messages as well?
 See, the below is my working board with latest main:
 I (65) soc_init: ESP Simple bootI (65) soc_init: compile time Oct 19 2025 11:27:35I (65) soc_init: chip revision: v0.1I (66) flash_init: SPI Speed      : 80MHzI (68) flash_init: SPI Mode       : DIOI (71) flash_init: SPI Flash Size : 8MBI (75) boot: DRAM	: lma=00000020h vma=40800000h size=11764h ( 71524)I (81) boot: DRAM	: lma=0001178ch vma=40811780h size=025d4h (  9684)I (87) boot: IROM	: lma=00020000h vma=42800000h size=05870h ( 22640)I (93) boot: IROM	: lma=00030000h vma=42000000h size=4e8ech (321772)I (111) boot: libc heap size 340 kB.I (111) spi_flash: detected chip: genericI (111) spi_flash: flash io: dio*** Booting Zephyr OS build v4.2.0-6166-g8a72d776c5af ***Bluetooth initializedAdvertising successfully started
 —
 Reply to this email directly, view it on GitHub
 <#96829 (comment)>,
 or unsubscribe
 <https://github.com/notifications/unsubscribe-auth/AAWAVUHQN45A5HLW4RJMI6L3YOPVTAVCNFSM6AAAAACH6ZPBV6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINZSGIYDINI>
 .
 You are receiving this because you were mentioned.Message ID:
 ***@***.***
 .com>
 -- 
Oscar Alcántara Méndez
México | 
Beta Was this translation helpful? Give feedback.
-
| for a reason the zephyr was not installed correctly, i did compile and run
on another machine and no issues at all....
i had a very old zephyr installed then i updated and probably i did not do
it correctly.… On Wed, Oct 22, 2025 at 1:06 PM Sylvio Alves ***@***.***> wrote:
 What was the issue after all?
 —
 Reply to this email directly, view it on GitHub
 <#96829 (reply in thread)>,
 or unsubscribe
 <https://github.com/notifications/unsubscribe-auth/AAWAVUGGPLG36XCH7ALMJZD3Y7PT3AVCNFSM6AAAAACH6ZPBV6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTINZVGQ4TIOI>
 .
 You are receiving this because you were mentioned.Message ID:
 ***@***.***
 .com>
 -- 
Oscar Alcántara Méndez
México | 
Beta Was this translation helpful? Give feedback.
What was the issue after all?