Get UDP SSID within processing hypermedia

Hi all, I have a ESP8266 that connects to processing over wifi using the UDP library. The ESP8266 broadcasts a wifi network and my PC logs into this wifi network.

For my processing sketch it is necessary that in order to run it properly my PC connects to the wifinetwork. To check this I would like to;

  • Display the current connected wifi network name (ssid) in my processing sketch
  • If possible command my PC through a processing method to connect to the right wifi network

I already investigated the UDP library and hypermedia and I found no such function. It seems to be possible for android libraries, but this time it only concerns my normal Windows pc. Any help with this would be greatly appreciated. Here is some of the code that I use to setup the network on the processing side

//Somewhere above setup
import hypermedia.net.*;
String ip = "192.168.4.1"; // the remote IP address
int port = 8888; // the destination port
UDP udp; // define the UDP object


void StartWifi() {
  println("Setting up wifi");
  udp = new UDP(this, 8888); // create a new datagram connection on port 8888
  udp.log(false); // <– printout the connection activity
  udp.listen(true); // and wait for incoming message
}

1 Like

do i understand correctly that you started the ESP in AP mode?
why not just in STA mode
and loginto your existing wifi network. ( with a fix IP fitting/free in that network )
so it is easy to find for any other device in your network
AND that devices not loose their normal network connection…

1 Like

Yes I start the ESP in AP mode. It broadcasts its own wifi network. Then I now have to manually login to the ESP with my PC and send a ‘startcommand’ through Processing to have it start sending data over wifi. What I would like to do in this case is to have Processing tell me what wifi network I am logged into so that if this is not the sensor wifi network (but for example my own wifi router network) it can generate an appropriate warning.