File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -289,15 +289,19 @@ static int bt_esp32_ble_init(void)
289289#endif
290290
291291 ret = esp_bt_controller_init (& bt_cfg );
292- if (ret ) {
293- LOG_ERR ("Bluetooth controller init failed %d" , ret );
294- return ret ;
292+ if (ret == ESP_ERR_NO_MEM ) {
293+ LOG_ERR ("Not enough memory to initialize Bluetooth." );
294+ LOG_ERR ("Consider increasing CONFIG_HEAP_MEM_POOL_SIZE value." );
295+ return - ENOMEM ;
296+ } else if (ret != ESP_OK ) {
297+ LOG_ERR ("Unable to initialize the Bluetooth: %d" , ret );
298+ return - EIO ;
295299 }
296300
297301 ret = esp_bt_controller_enable (mode );
298302 if (ret ) {
299303 LOG_ERR ("Bluetooth controller enable failed: %d" , ret );
300- return ret ;
304+ return - EIO ;
301305 }
302306
303307 esp_vhci_host_register_callback (& vhci_host_cb );
Original file line number Diff line number Diff line change @@ -874,8 +874,13 @@ static int esp32_wifi_dev_init(const struct device *dev)
874874 wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT ();
875875 esp_err_t ret = esp_wifi_init (& config );
876876
877- if (ret != ESP_OK ) {
878- LOG_ERR ("Unable to initialize the wifi" );
877+ if (ret == ESP_ERR_NO_MEM ) {
878+ LOG_ERR ("Not enough memory to initialize Wi-Fi." );
879+ LOG_ERR ("Consider increasing CONFIG_HEAP_MEM_POOL_SIZE value." );
880+ return - ENOMEM ;
881+ } else if (ret != ESP_OK ) {
882+ LOG_ERR ("Unable to initialize the Wi-Fi: %d" , ret );
883+ return - EIO ;
879884 }
880885
881886 if (IS_ENABLED (CONFIG_ESP32_WIFI_STA_AUTO_DHCPV4 )) {
You can’t perform that action at this time.
0 commit comments