Lädt...


🔧 Temporary Network while trying to connect to my ESP32 via wifi?


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Hey everyone,
I have a simple project where I wanted to create an app to communicate with my ESP32. In fact, the app should be able to do the following things:

  • scan WIFIs for an ESP device (filter for an certain SSID)
  • connect to the (by the user) selected wifi
  • get and post JSON data via that wifi connection

I setup a simple server on the esp32 with an simple API. I also wrote the flutter app that first scans available networks for networks that could belong to my ESP32. I used this code for connecting to that wifi:

Future<void> connectToESP32() async {
    await WiFiForIoTPlugin.connect(
      esp32SSID, // SSID des ESP32
      password: "12345678", // if there is a password
      security: NetworkSecurity.WPA, 
      joinOnce:
          true, 
      withInternet:
          false, 
    );
    await checkConnection();
  }

The code to send the API request is:

final response = await http.post(
        Uri.parse('http://123.567.8.9/save'), // not the real ip
        headers: {'Content-Type': 'application/json'},
        body: jsonEncode(data),
      );

Now the problem:
I have been testing it on android and when you connect to the wifi using the app, an android popUp occurs telling the user that the app tries to connect to an device via wifi and that a temporary wifi connection will be made. When you look in the wifi menu of android after that, you can see that there is an established "temporary" connection to the esp32 wifi. When I try to send the API request, it fails because it cannot establish a connection to the server. I found, that the request is not sent via this wifi connection because android recognizes that this connect has no internet and therefor cannot send API requests. When I connect to that wifi manually, enter the password and click on "hold connection without internet" and then send the request, it works.

Sure, I could redirect the user to the wifi menu and explain that he has to connect manually to the wifi and he has to disable his mobile internet connection, but that is not pretty. I'd rather use the the temporary wifi connection, to connect and communicate to the device, but I have no idea how I would do that.

Does anyone know more to that topic?

...

🔧 Temporary Network while trying to connect to my ESP32 via wifi?


📈 77.43 Punkte
🔧 Programmierung

🪟 Power BI Unable to connect, We encountered an error while trying to connect


📈 33.84 Punkte
🪟 Windows Tipps

📰 Bastel-Rechner ESP32-LyraT V4.3: Soundmodul mit ESP32


📈 32.43 Punkte
📰 IT Nachrichten

🕵️ Wifi cracker – Pentesting Wifi Network with Fern WiFi Password Auditing Tool


📈 29.76 Punkte
🕵️ Hacking

🔧 AWS: Overview of AWS Direct Connect, Connect Location, Connect Endpoint and Connect Gateway


📈 28.6 Punkte
🔧 Programmierung

🪟 iCloud has encountered an error while trying to connect to the server


📈 26.69 Punkte
🪟 Windows Tipps

🐧 vopono - run applications via VPNs with temporary network namespaces


📈 26.34 Punkte
🐧 Linux Tipps

🐧 How to Connect ESP32 Board to Raspberry Pi Using Arduino IDE


📈 23.36 Punkte
🐧 Linux Tipps

🐧 Trying to connect to the network


📈 22.79 Punkte
🐧 Linux Tipps

🐧 Trying to connect to the network


📈 22.79 Punkte
🐧 Linux Tipps

📰 Could a wifi camera stream to the cloud via a wifi hotspot?


📈 22.77 Punkte
📰 IT Security Nachrichten

📰 Could a wifi camera stream to the cloud via a wifi hotspot?


📈 22.77 Punkte
📰 IT Security Nachrichten

🐧 How to Set up and Program the ESP32 to Communicate with an Android Smartphone via Bluetooth


📈 22.61 Punkte
🐧 Linux Tipps

🔧 Streaming ESP32-CAM Images to Multiple Browsers via MQTT


📈 22.61 Punkte
🔧 Programmierung

🪟 Laptop Wont Connect to WiFi: Here’s How to Connect Laptop to Wi-Fi


📈 22.49 Punkte
🪟 Windows Tipps

📰 Laptop Wont Connect to WiFi: Here’s How to Connect Laptop to Wi-Fi


📈 22.49 Punkte
🖥️ Betriebssysteme

📰 Quick look your right eyes and ears while using public WiFi network


📈 22.48 Punkte
📰 IT Security Nachrichten

📰 WiFi Finder App Goes Down After Leaking 2 Million WiFi-Network Passwords


📈 21.57 Punkte
📰 IT Security Nachrichten

📰 WiFi Finder App Goes Down After Leaking 2 Million WiFi-Network Passwords


📈 21.57 Punkte
📰 IT Security Nachrichten

📰 WiFi finder app exposes millions of WiFi network passwords


📈 21.57 Punkte
📰 IT Security Nachrichten

📰 WiFi finder app exposes millions of WiFi network passwords


📈 21.57 Punkte
📰 IT Security Nachrichten

📰 WiFi finder app exposes millions of WiFi network passwords


📈 21.57 Punkte
📰 IT Security Nachrichten

📰 Listen to WiFi traffic without joining the Wifi network possible?


📈 21.57 Punkte
📰 IT Security Nachrichten

🐧 polkit: temporary auth hijacking via PID reuse and non-atomic fork - project-zero


📈 21.15 Punkte
🐧 Linux Tipps

matomo