ESP32 BLE and WIFI

Hi All,
I am trying to have both BLE and WIFI enabled on an ESP32 dev module (the idea is to use the BLE to setup the WIFI for a smartphone). I am able to have the BLE working nicely by itself. I am able to have the WIFI working nicely by itself. But when I am having both the BLE and WIFI, I get this error

Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board ESP32 Dev Module.

My sketch which is giving the error is below

#include “WiFi.h”
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

void setup() {
WiFi.mode(WIFI_STA);
BLEDevice::init(“MyESP32”);
}

void loop() {
}

I tried changing the partition schema, and this is happening when the partition is set to default 4md with ffat 1.2 MB App/1.5 MB FATFS. I tried most other combinations, all with the same error. One config worked (NO OTA 2MB App/ 2MB SPIFFs) but then after deploying, the ESP keeps rebooting with this on the terminal

rst:0x3 (SW_RESET),boot:0x13 (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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
ets Jun 8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x13 (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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
ets Jun 8 2016 00:22:57

BTW: I tried this on a MAC and windows, and both gave the same behavior

Any help of how to solve this is greatly appreciated…

THANK YOU

Hello saadyacu,

Try changing partition scheam. This works for me. I am using wrover kit