Questions about WiFi and BLE on ESP32

Hello.
I left this message to see if this is possible.

  1. Connect ESP32 to BLE with my device.
  2. Set the ssid, pw used for WiFi on ESP32 with BLE.

const char* ssid = ""; ----------Enter ssid as BLE.
const char* password = ""; ----Enter pw as BLE.

  1. WiFi works on ESP32 and connects to my device.

Or, I wonder if there is a way to set it up from the outside rather than writing ssid and pw in Arduino IDE.
Thankㄴ.

Something in that line is possible. But you can't use pointers as you do now; you need a fixed size array that is big enough to hold the longest ssid or password plus one spare. So if the length of the longest ssid is 10 characters, the array needs to be 11 in size.

Your topic has been moved to a more suitable location on the forum.

Try WiFiManager. It can be installed using the IDE Library Manager.

The ESP32 has classic bluetooth as well as BLE. Why do you want to use BLE instead of classic to send the SSID and password to the ESP32?

What is the BLE device? Is it a phone?

I think to do it in BLE you will likely be in UART service between the phone and the esp32, and it would be more simple to do with classic bluetooth.

Thank you for your answer. I will try to use it.

You may find this of use
https://robotzero.one/esp32-wi-fi-connection-bluetooth/

First, when DHT11 is connected to the battery, it will transmit the signal to Wi-Fi and install another sensor later. I will use Evil to reduce power consumption.
A BLE device is a phone or laptop.
Thank you for your kind advice.

Thanks. Let me put this into practice.