Code cdc_acm_vcp example from esp-idf5.3.2

voyager46
Posts: 4
Joined: Tue Jul 09, 2024 4:54 pm

Code cdc_acm_vcp example from esp-idf5.3.2

Postby voyager46 » Sat Dec 14, 2024 8:54 pm

Trying to insert a BLE Client in this example, but I cannot enable Bluetooth either in menuconfig nor in esp-ide. Would like to get data from a ble device and pass it thru the cdc port of the esp32s3 to another device. I can't do it directly as the receiver only has a ch3x serial port and nothing else. The cdc example works perfect. I can pass any information thru the USB port of the esp32s3 Devkit to my old device. So this part works. My problem is including the ble on the Devkit.

I hope somebody can help me with this problem.

drstefankrank
Posts: 3
Joined: Sat Dec 28, 2024 8:06 pm

Re: Code cdc_acm_vcp example from esp-idf5.3.2

Postby drstefankrank » Sat Dec 28, 2024 8:26 pm

Hi,

I had the same problem with the example, so I created a new project and manually added the example code and dependencies.
My goal is to create a VCP serial to Bluetooth bridge. Combining both examples was difficult, because one is written in C++ and the other in C. I am using the spp_server.c from the examples, where as my main is a cpp file.

So far it works, but I get strange characters and other garbage when copy/pasting or request a lot of data from the serial device. It may be a buffer/speed problem.

It seems you are trying the same. I may upload the project to github if this is the case.

These are the options in sdkconfig:
#
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=y
# CONFIG_BT_NIMBLE_ENABLED is not set
# CONFIG_BT_CONTROLLER_ONLY is not set
CONFIG_BT_CONTROLLER_ENABLED=y
# CONFIG_BT_CONTROLLER_DISABLED is not set

#
# Bluedroid Options
#
CONFIG_BT_BTC_TASK_STACK_SIZE=3072
CONFIG_BT_BLUEDROID_PINNED_TO_CORE_0=y
# CONFIG_BT_BLUEDROID_PINNED_TO_CORE_1 is not set
CONFIG_BT_BLUEDROID_PINNED_TO_CORE=0
CONFIG_BT_BTU_TASK_STACK_SIZE=4352
# CONFIG_BT_BLUEDROID_MEM_DEBUG is not set
CONFIG_BT_BLUEDROID_ESP_COEX_VSC=y
CONFIG_BT_BLE_ENABLED=y
CONFIG_BT_GATTS_ENABLE=y
# CONFIG_BT_GATTS_PPCP_CHAR_GAP is not set
# CONFIG_BT_BLE_BLUFI_ENABLE is not set
CONFIG_BT_GATT_MAX_SR_PROFILES=8
CONFIG_BT_GATT_MAX_SR_ATTRIBUTES=100
# CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MANUAL is not set
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_AUTO=y
CONFIG_BT_GATTS_SEND_SERVICE_CHANGE_MODE=0
# CONFIG_BT_GATTS_ROBUST_CACHING_ENABLED is not set
# CONFIG_BT_GATTS_DEVICE_NAME_WRITABLE is not set
# CONFIG_BT_GATTS_APPEARANCE_WRITABLE is not set
CONFIG_BT_GATTC_ENABLE=y
CONFIG_BT_GATTC_MAX_CACHE_CHAR=40
CONFIG_BT_GATTC_NOTIF_REG_MAX=5
# CONFIG_BT_GATTC_CACHE_NVS_FLASH is not set
CONFIG_BT_GATTC_CONNECT_RETRY_COUNT=3
CONFIG_BT_BLE_SMP_ENABLE=y
# CONFIG_BT_SMP_SLAVE_CON_PARAMS_UPD_ENABLE is not set
# CONFIG_BT_BLE_SMP_ID_RESET_ENABLE is not set
# CONFIG_BT_STACK_NO_LOG is not set

I hope this helps.

voyager46
Posts: 4
Joined: Tue Jul 09, 2024 4:54 pm

Re: Code cdc_acm_vcp example from esp-idf5.3.2

Postby voyager46 » Wed Jan 01, 2025 11:02 am

Hi Stefan,
first of all, a Happy New Year and all the best for you. Sure I would be interested in your Code and try it on my board. I am still stuck in mine. Could you give me a short note (and URL) when you have uploaded it to Github. Thank you for answering my post.

drstefankrank
Posts: 3
Joined: Sat Dec 28, 2024 8:06 pm

Re: Code cdc_acm_vcp example from esp-idf5.3.2

Postby drstefankrank » Wed Jan 01, 2025 2:54 pm

I uploaded the current code base. Good luck, maybe we can solve the issues together!
https://github.com/dr-stefan-krank/ESP3 ... BT-Bridge/

drstefankrank
Posts: 3
Joined: Sat Dec 28, 2024 8:06 pm

Re: Code cdc_acm_vcp example from esp-idf5.3.2

Postby drstefankrank » Wed Jan 01, 2025 6:31 pm

and I forgot: A happy new year as well!

Who is online

Users browsing this forum: No registered users and 10 guests