ESP32同时开启wifi ble bt并加入wss mqtt等应用层的可行性?

sakuranda
Posts: 4
Joined: Wed Sep 04, 2024 3:03 am

ESP32同时开启wifi ble bt并加入wss mqtt等应用层的可行性?

Postby sakuranda » Wed Sep 04, 2024 3:09 am

Hi,
开发中遇到的问题,请问ESP32的320kb RAM是否支持做到如下功能:
1. WIFI STA、BT音频播放、BLE蓝牙测距及长连接json通信
2. Websockets认证获取网络数据,MQTT等协议进行json数据上下行传输
3. 录音、播放,音频编解码等功能

现在基于platformio+arduino框架开发,不知ESP32芯片是否支持诸多功能的运行?
如果可行的话,我们会移植为idf框架进一步开发,谢谢!

sakuranda
Posts: 4
Joined: Wed Sep 04, 2024 3:03 am

Re: ESP32同时开启wifi ble bt并加入wss mqtt等应用层的可行性?

Postby sakuranda » Fri Sep 06, 2024 3:04 am

这是我们的[程序](https://github.com/Sakuranda/esp32_test).

Log如下,感谢:
```
Writing at 0x001fca6a... (98 %)
Writing at 0x00201f7e... (100 %)
Wrote 2062720 bytes (1277654 compressed) at 0x00010000 in 32.6 seconds (effective 505.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
--- Terminal on COM17 | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
PSRAM initialized successfully!
Total PSRAM: 4192107 bytes
Free PSRAM: 4191863 bytes
Free heap: 147452 bytes
A2DPStream.h : 134 - Connecting to ES32_BT_DEV666
[D] Allocator.h : 68 - Allocated 15361
a2dp_buffer.resize
Free PSRAM after Wi-Fi init: 4176483 bytes
Free heap after Wi-Fi init: 147452 bytes
A2DPStream.h : 149 - Starting a2dp_source...
source()
Free PSRAM after Wi-Fi init: 4176483 bytes
Free heap after Wi-Fi init: 146904 bytes
start_raw
Free PSRAM after Wi-Fi init: 4172099 bytes
Free heap after Wi-Fi init: 60356 bytes
[D] A2DPStream.h : 173 - waiting for connection
[D] A2DPStream.h : 173 - waiting for connection
[D] A2DPStream.h : 308 - static void audio_tools::A2DPStream::a2dp_state_callback(esp_a2d_connection_state_t, void*)
[W] A2DPStream.h : 313 - ==> state: Connecting
[D] A2DPStream.h : 173 - waiting for connection
[D] A2DPStream.h : 308 - static void audio_tools::A2DPStream::a2dp_state_callback(esp_a2d_connection_state_t, void*)
[W] A2DPStream.h : 313 - ==> state: Connected
A2DPStream.h : 176 - a2dp_source is connected...
cfg end
Free PSRAM after Wi-Fi init: 4172099 bytes
Free heap after Wi-Fi init: 48296 bytes
[D] AudioIO.h : 30 - void audio_tools::TransformationReader<T>::begin(T*, Stream*) [with T = audio_tools::ReformatBaseStream]
[D] AudioEncoded.h : 140 - virtual bool audio_tools::EncodedAudioOutput::begin()
[D] AudioEncoded.h : 142 - virtual bool audio_tools::EncodedAudioOutput::begin()
[D] AudioCodecsBase.h : 27 - virtual void audio_tools::AudioDecoder::setAudioInfo(audio_tools::AudioInfo)
[D] CodecMP3Helix.h : 82 - virtual bool audio_tools::MP3DecoderHelix::begin()
[D] MetaDataFilter.h : 30 - void audio_tools::MetaDataFilter<Decoder>::begin() [with Decoder = libhelix::MP3DecoderHelix]
dec end
Free PSRAM after Wi-Fi init: 4140955 bytes
Free heap after Wi-Fi init: 48296 bytes
E (9152) wifi:Expected to init 4 rx buffer, actual is 2
E (9154) wifi_init: Failed to deinit Wi-Fi driver (0x3001)
E (9155) wifi_init: Failed to deinit Wi-Fi (0x3001)
[ 4334][E][WiFiGeneric.cpp:685] wifiLowLevelInit(): esp_wifi_init 257
[ 4352][E][WiFiSTA.cpp:227] begin(): STA enable failed!
Free PSRAM after Wi-Fi init: 4140955 bytes
Free heap after Wi-Fi init: 28216 bytes
Connecting to WiFi...
Connecting to WiFi...
Connecting to WiFi...
Connecting to WiFi...
Connecting to WiFi...
```

Who is online

Users browsing this forum: No registered users and 169 guests