Giter Site home page Giter Site logo

Comments (11)

ferbar avatar ferbar commented on June 27, 2024 1

Add the following lines to configs/defconfig.esp32

CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=y
CONFIG_BT_HFP_ENABLE=n
CONFIG_BT_BLE_ENABLED=n
CONFIG_BT_MULTI_CONNECTION_ENBALE=n
CONFIG_BLE_MESH=n

and rebuild the esp32-arduino libraries. This will save some 300kB flash and 50kB ram

from esp32-arduino-lib-builder.

0x0fe avatar 0x0fe commented on June 27, 2024

A related tquestion on this specific topic, since arduino library builder seems to only work on linux or OSX, is it possible to simply build the bluetooth library in IDF directly (which works under win10), for example from the A2DP example, and just move the blob to Arduino somehow?
By the way, there is an option to allocate the BT library heap on the external PSRAM first, will this option walso work if the recompiled library is used on Arduino?

from esp32-arduino-lib-builder.

ferbar avatar ferbar commented on June 27, 2024

@0x0fe You could try to copy the sdkconfig to bt_discovery example, menuconfig, build it, copy the libbt.a to your Arduino framework directory. However I bet that you will get wired crashes if you get a version mismatch or different sdkconfig settings that are clashing. I assume that setting up a linux virtual machine will be faster and less frustrating.

from esp32-arduino-lib-builder.

0x0fe avatar 0x0fe commented on June 27, 2024

@ferbar Thank you, yes i also had the same thought and decided to compile under ubuntu from WSL, it compiles fine, it seems there is a bug with partitions.csv though.

from esp32-arduino-lib-builder.

hientv1999 avatar hientv1999 commented on June 27, 2024

Where can I find this file configs/defconfig.esp32?

from esp32-arduino-lib-builder.

0x0fe avatar 0x0fe commented on June 27, 2024

@hientv1999
here https://github.com/espressif/esp32-arduino-lib-builder/tree/master/configs

from esp32-arduino-lib-builder.

hientv1999 avatar hientv1999 commented on June 27, 2024

@0x0fe Thank you. But is there anyway I can do this when using PlatformIO and not ESPIDF?

from esp32-arduino-lib-builder.

0x0fe avatar 0x0fe commented on June 27, 2024

mmh, yeah, in fact it is quite more convenient, just make a project and include the following in platformio.ini
then you will have a project with the arduino HAL and the menuconfig directly accessible.
N.B. i am not going to provide step by step support on this, you'll have to figure out.

[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git#v6.1.0
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.8
framework = 
	arduino
	espidf
board = esp32dev
board_build.f_flash = 80000000L
board_build.f_cpu = 240000000L
board_build.flash_mode = qio
board_upload.maximum_size = 3145728
board_build.partitions = min_spiffs.csv
board_upload.flash_size = 4MB
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
build_flags = 
	-Wdouble-promotion
	-Wimplicit-fallthrough
	-DCONFIG_ARDUHAL_LOG_COLORS=1
	-DBOARD_HAS_PSRAM
	-DCORE_DEBUG_LEVEL=2
	-DCONFIG_MBEDTLS_PSK_MODES=1
	-DCONFIG_MBEDTLS_KEY_EXCHANGE_PSK=1
	-DCONFIG_FREERTOS_HZ=1000
	-DCONFIG_SPIRAM_SPEED_80M
	-DCONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
	-DBOARD_HAS_1BIT_SDMMC
build_unflags = 

from esp32-arduino-lib-builder.

hientv1999 avatar hientv1999 commented on June 27, 2024

Hi to all, I need to use BT A2DP while sending some data on Wi-Fi. When used alone, A2DP works fine. But with Wi-Fi enabled I was getting some crashes. I was on 2.0.4, I upgraded to 2.0.6 but still getting crashes. Upon a bit of investigation, my code with Wi-Fi only have 230KB free heap, but when BT is enabled drops to 40KB and when playing music it drops further to 21KB, which is not stable anymore. I read somewhere it is possible to recompile BT library binary blob to discard unnecessary functions for a specific project. For instance, I don't need BLE. Can you give me a hint on how to do it?

Many thanks, Nick

May I know the stability of the signal as WiFi and BLE share the same antenna? Is it still usable?

from esp32-arduino-lib-builder.

0x0fe avatar 0x0fe commented on June 27, 2024

there is a time domain multiplexing, so bluetooth and wifi can coexist, the problems are more related to ressources, in particular IRAM, you will find out very quickly that once wifi is started, especially with TLS, and bluetooth is active, most of the IRAM is used (depening on which extensions you use in the bluetooth stack) and it is quite tricky to have these functions coexist with the available ressources in many scnarios.

from esp32-arduino-lib-builder.

hientv1999 avatar hientv1999 commented on June 27, 2024

@0x0fe What is the behaviour of the chip when it runs out of IRAM? I never got into this scenario. Will it crash?

from esp32-arduino-lib-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.