Chat freely about anything...

User avatar
By rudy
#74271 It works for me. I used a form to input the port number on a webpage. Took that argument and passed it to the code below. The port changed to what I entered on the webpage. The old port was no longer available, the webpage shows up on the new port number.

I am using a git version from a few weeks ago.

I'm curious why you would need this.

Code: Select allvoid loop(void){
  webserver.handleClient();

if (setPort==1)               // check flag
  {
  digitalWrite(led, 0);    // just a short flash of light.
  delay(90);
  webserver.begin(portNumber);    // this is where it all happens
  Serial.print("new port number ");
  Serial.println(portNumber);
  digitalWrite(led, 1);
  setPort = 0;        //  clear flag
  }
}
User avatar
By lucasromeiro
#74281
rudy wrote:It works for me. I used a form to input the port number on a webpage. Took that argument and passed it to the code below. The port changed to what I entered on the webpage. The old port was no longer available, the webpage shows up on the new port number.

I am using a git version from a few weeks ago.

I'm curious why you would need this.

Code: Select allvoid loop(void){
  webserver.handleClient();

if (setPort==1)               // check flag
  {
  digitalWrite(led, 0);    // just a short flash of light.
  delay(90);
  webserver.begin(portNumber);    // this is where it all happens
  Serial.print("new port number ");
  Serial.println(portNumber);
  digitalWrite(led, 1);
  setPort = 0;        //  clear flag
  }
}


hello, but I die for the wifiserver !! for it does not work .... what is a git version? I need this because the user of my system should be able to change the communication port according to the portforwarding configuration that is made. understood? I need to change .... and I can not ... in the link that I sent the boy shows how to change, but does not end here. but it speaks of a version 2.4.1 that I did not find in the arduino.
User avatar
By rudy
#74284
lucasromeiro wrote:hello, but I die for the wifiserver !! for it does not work .... what is a git version?


GIT version is the one to use when you need access to very low level routine like accessing the core of the ESP8266. Like boot routines and serial code flash loader routines. :o

OK, all of that was not true. I know of your other question here. Between version releases the code is being worked on and available. It is not always stable, it keeps changing. But it is where the newest fixes and features are.

http://arduino-esp8266.readthedocs.io/e ... lling.html

https://github.com/esp8266/Arduino#using-git-version


Code: Select all I need this because the user of my system should be able to change the communication port according to the portforwarding configuration that is made. understood?


I am familiar with using a router to do port forwarding. I think it is odd that you need that for the ESP8266 unless you have a device that is acting as a router or gateway for other devices.