Forum Sensor.Community

Open network connection

Hi all
Is there any reason for a node to not being able to connect in an open wi-fi network?

@ricki-z es funktionierte doch direkt mit Freifunk, oder ?

Nein, dafür muss man zunächst die Konfig via Flashing Tool schreiben und dann beim ersten Start noch das korrekte WiFi-Netzwerk wählen (beim Speichern der Konfig scheint da noch ein Test drin zu sein, daß kein WiFi-Name gesetzt wird wenn das Passwort leer ist).

hi
ohoh I don’t know any german so :frowning: i’m guessing here… the problem is maybe that this open wifi network does not require a password? If this is the case, is there a way around?

Try the following with the release version:

  • choose open wifi network or type the name in the input field
  • clear the password field (even with no password set the asterisk signs should be there)
  • save the new settings
1 Like

Hi @ricki-z
I’ve tried clearing the password (asterisk don’t show) and writing any password (numbers, empty spaces…) but it doen’t work… any other idea I can try?
Gracias

Can you copy/paste the USB log? We have to look at what the sensor exactly says.
Find a data USB cable and then use the serial monitor of the Arduino IDE or the screen instruction in linux/mac.

I know a bit about this when I was playing about with “EN” and channel 13.

The problem is with the procedure call Wifi.begin and the version of the library the code is built against. I cannot remember which version of the library does what, but it seems from my messing about that the overloaded Wifi.begin where no password parameter is provided works.

The code in connectWifi() needs to be something like

  // MD need to scan SSIDs to see if open ??

  Debug.println("\n\nScan start ... ");
  int n = WiFi.scanNetworks(false, true);
  {
    String ssid;
    uint8_t encryptionType;
    int32_t RSSI;
    uint8_t* BSSID;
    int32_t channel;
    bool isHidden;
    bool found=false;

    for (int i = 0; i < n; i++) {
      WiFi.getNetworkInfo(i, ssid, encryptionType, RSSI, BSSID, channel, isHidden);
      Debug.printf("%d: %s, Ch:%d (%ddBm) %s %s\n", i + 1, ssid.c_str(), channel, RSSI, encryptionType == ENC_TYPE_NONE ? "open" : "", isHidden ? "hidden" : "");
      if (strcmp(cfg::wlanssid, ssid.c_str()) == 0) {
        found=true;
        if (encryptionType ==   ENC_TYPE_NONE) {
          WiFi.begin(cfg::wlanssid); // Start WiFI
        } else {
          WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI
        }
      }
    }
    // MD 25-May-21 If not found, it could be because it is a hidden SSID and it's not broadcasting
    // so try it anyway
    if (!found) {
      WiFi.begin(cfg::wlanssid, cfg::wlanpwd); // Start WiFI
    }
  }
   

This is a direct cut/paste from my hacked about version of the firmware.
I hope this helps.

sure. i will do it tomorrow when I come back to the university were I have the nodes

and thanks @tarpit but I don’t know much about wifi communication so this is two advanced for me at the moment :upside_down_face:


output debug text to displays…
Starting WiFiManager
AP ID: airRohr-1594166
Password:
scan for wifi networks…
AP Password is:
Starting Webserver… (IP unset)
AP Passw

this is the log I get
sorry for the delay
saludos

Is the log complete ? It seems to be broken.
That means that your open network is not detected at all I think.

hola
yes, that is all I get … when I enter the config I’m able to see the network but that is the log I get after saving that network
thanks

@nanocastro is your open network running on channel 13? I’m not sure but it’s possible that this channel is disabled in the actual firmware (only visible at scan).

not sure, I will ask the university network manager. if this is the issue, can I enable that channel from the firmware?

but could not wait and today I moved on to a phone as hot spot to get wifi :grimacing: want to do a co-location of several sensors (sds011, sds018, sds021, pms7003, sps30) and get an estimate of their dispersion


thanks