WiFi connections issues

Hi,

I am having issues with connection to the WiFi.

Yesterday I originally used the download version and manually configured the Wifi and MQTT settings and had it working.

Earlier today I built a ESP32 BLE version that had preset values for wifi_ssid / wifi_password / MQTT server and login details and it was wokring fine on a different network.

Now I try to re-build it to connect to a original network and I have a problem that is just completely fails to connect to the WiFi at all.

If I try to revert back to the default ESP_BLE version it somehow or another manages to find some settings for the original network and connect to that, but has incorrect settings for the MQTT server, wich means I am stuck being not able to change the settings.

This is what I see on the serial port (I have removed Wifi and real IPs):

************* WELCOME TO OpenMQTTGateway **************
{“mqtt_server”:“192.168.1.17”,“mqtt_port”:“1883”,“mqtt_user”:“your_username”,“mqtt_pass”:“your_password”,“mqtt_topic”:“home/”,“gateway_name”:“OpenMQTTGateway_ESP32_BLE”}*WM: [3] allocating params bytes: 20
*WM: [2] Added Parameter: server
*WM: [2] Added Parameter: port
*WM: [2] Added Parameter: user
*WM: [2] Added Parameter: pass
*WM: [2] Added Parameter: name
*WM: [3] Updated _max_params: 10
*WM: [3] re-allocating params bytes: 40
*WM: [2] Added Parameter: topic
N: Attempting Wifi connection with saved AP: 0
N: Attempting Wifi connection with saved AP: 1
N: Attempting Wifi connection with saved AP: 2
N: Attempting Wifi connection with saved AP: 3
N: Attempting Wifi connection with saved AP: 4
N: Connect your phone to WIFI AP: OpenMQTTGateway_ESP32_BLE with PWD: your_password
*WM: [1] AutoConnect
*WM: [2] ESP32 event handler enabled
*WM: [2] Connecting as wifi client…
*WM: [1] STA static IP:
*WM: [2] setSTAConfig static ip not set
*WM: [3] WIFI station disconnect
*WM: [1] Connecting to saved AP: XXXXXXXXXX
*WM: [3] Using Password: ZZZZZZZZZ
*WM: [3] WiFi station enable
*WM: [2] 5000 ms connectTimeout set
*WM: [2] 5000 ms timeout, waiting for connect…
*WM: [2] .

*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS
*WM: [1] STA IP Address: 10.xx.xxx.xxx
{“mqtt_server”:“192.168.1.17”,“mqtt_port”:“1883”,“mqtt_user”:“your_username”,“mqtt_pass”:“your_password”,“mqtt_topic”:“home/”,“gateway_name”:“OpenMQTTGateway_ESP32_BLE”}N: BLE scans interval: 55555
N: BLE scans number before connect: 10
N: Publishing only BLE sensors: false
N: minrssi: 100
N: Low Power Mode: 0
N: Setup OpenMQTTGateway end
W: MQTT connection…
W: MQTT client disconnected no BLE scan
[E][WiFiClient.cpp:258] connect(): socket error on fd 55, errno: 113, “Software caused connection abort”
W: failure_number_mqtt: 1
W: failed, rc=-2
W: disconnection_handling, failed 1 times
W: Attempt to reinit wifi: 0
W: MQTT connection…
[E][WiFiClient.cpp:258] connect(): socket error on fd 56, errno: 113, “Software caused connection abort”
W: failure_number_mqtt: 2
W: failed, rc=-2
W: disconnection_handling, failed 2 times
W: Attempt to reinit wifi: 0
W: MQTT connection…

How can I fix this ?

You can erase the flash and reupload the development branch. It will enable you to start from zero.