Server not assigning IP address

I am trying to make a standalone server, esp8266, no router involved.

The error I get is

11:08:08.890 → IP Address: (IP unset)

I also cannot see the ssid when scanning wireless networks, Win 10 machine.

The code looks like -

/*------------------------------------------------------------------------------
  03/25/2019
  Author: Makerbro
  Platforms: ESP8266
  Language: C++/Arduino
  File: simple_server_client/server/server.ino
  ------------------------------------------------------------------------------
  Description: 
  Server-side code for YouTube video demonstrating how to communicate over WiFi
  between two ESP8266:
  https://youtu.be/gZhUi24_qms
  Do you like my videos? You can support the channel:
  https://patreon.com/acrobotic
  https://paypal.me/acrobotic
  ------------------------------------------------------------------------------
  Please consider buying products from ACROBOTIC to help fund future
  Open-Source projects like this! We'll always put our best effort in every
  project, and release all our design files and code for you to use. 
  https://acrobotic.com/
  https://amazon.com/shops/acrobotic
  ------------------------------------------------------------------------------
  License:
  Please see attached LICENSE.txt file for details.
------------------------------------------------------------------------------*/
// Setup the server to receive data over WiFi
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>

// Configuration parameters for Access Point
char * ssid_ap = "CabinBasementDoor";
char * password_ap = "123456";
IPAddress ip(192,168,11,4);         // arbitrary IP address (doesn't conflict w/ local network)
IPAddress gateway(192,168,11,1);
IPAddress subnet(255,255,255,0);

// Set up the server object
ESP8266WebServer server;

// Keep track of the sensor data that's going to be sent by the client
float sensor_value = 0.0;

void setup() {
  WiFi.mode(WIFI_AP);
  WiFi.softAPConfig(ip,gateway,subnet);
  WiFi.softAP(ssid_ap,password_ap);
  // Print IP Address as a sanity check
  Serial.begin(9600);
  Serial.println();
//  Serial.print("IP Address: "); Serial.println(WiFi.localIP());
  // Configure the server's routes
  server.on("/",handleIndex); // use the top root path to report the last sensor value
  server.on("/update",handleUpdate); // use this route to update the sensor value
  server.begin();
  Serial.print("IP Address: "); Serial.println(WiFi.localIP());
}

void loop() {
  // put your main code here, to run repeatedly:
  server.handleClient();
}

void handleIndex() {
  server.send(200,"text/plain",String(sensor_value)); // we'll need to refresh the page for getting the latest value
}

void handleUpdate() {
  // The value will be passed as a URL argument
  sensor_value = server.arg("value").toFloat();
  Serial.println(sensor_value);
  server.send(200,"text/plain","Updated");
}

All help will be greatly appreciated.

Regards, Dana.

"I am trying to make a standalone server, esp8266, no router involved."

Have you tried the other access point (AP) example code available in the IDE?

localIP() is for STA mode

https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/soft-access-point-class.html

a server is different from AP. AP creates the ‘physical’ network. any device on this network can start a TCP server.

I looked in IDE, 1.8.12, for a softserver example, and cannot
seem to find it.

This is what I need, I think, it should create a private network
with its own ssid/password, and run a server for me to connect to
with a client ESP8266 ? Right ?

The name of an example of a softserver would be helpful.

Regards, Dana.

WiFiAccessPoint.ino

it is an AP, not a server

"This is what I need, I think, it should create a private network
with its own ssid/password, and run a server for me to connect to
with a client ESP8266 ? Right ?"

If you are wanting to create the equivalent of a network router, I'm not sure I've seen something like that. There are "mesh" functions, but haven't tried any of those. You might consider getting an inexpensive used wireless router on ebay to perform the network functions.

zoomkat:
"This is what I need, I think, it should create a private network
with its own ssid/password, and run a server for me to connect to
with a client ESP8266 ? Right ?"

If you are wanting to create the equivalent of a network router, I'm not sure I've seen something like that. There are "mesh" functions, but haven't tried any of those. You might consider getting an inexpensive used wireless router on ebay to perform the network functions.

the SoftAP of esp8266 does exactly what OP wants.

sorry, zoomkat, but every time I run into one of your comments it shows a lack of knowledge. Maybe stop confusing newbies if you are not familiar with the topic.

"the SoftAP of esp8266 does exactly what OP wants."

You sure? I've run SoftAP, but maybe I've missed something. Go ahead and post the code that does the trick for a look see. I've got some ESPs to run it on.

zoomkat:
"the SoftAP of esp8266 does exactly what OP wants."

You sure? I've run SoftAP, but maybe I've missed something. Go ahead and post the code that does the trick for a look see. I've got some ESPs to run it on.

WiFiAccessPoint.ino example

I found key issue with use of ESP8266 WiFi library.

Basically password has to be >= 8 characters long, otherwise it will
not log into ssid in a softap client server application (what I was trying
to get running).

I found this thru a web hit, post on another forum.

Thanks all for the help, some clues for this newbie were quiet useful.

Regards, Dana.

Juraj:
WiFiAccessPoint.ino example

It appears to run a basic server function, but does not seem to "This is what I need, I think, it should create a private network" as a network might be defined. The only capability being client/server with no communication capability between the clients connecting to the AP.

zoomkat:
It appears to run a basic server function, but does not seem to “This is what I need, I think, it should create a private network” as a network might be defined. The only capability being client/server with no communication capability between the clients connecting to the AP.

if you start the sketch it will create a new WiFi network “ESPap”. you must connect to this network to access the web server started by the sketch

"if you start the sketch it will create a new WiFi network "ESPap". you must connect to this network to access the web server started by the sketch"

Pretty much the same as saying connecting to the AP to access the web server. I guess a simple client/server connection could be considered a "network".

zoomkat:
"if you start the sketch it will create a new WiFi network "ESPap". you must connect to this network to access the web server started by the sketch"

Pretty much the same as saying connecting to the AP to access the web server. I guess a simple client/server connection could be considered a "network".

so the what about is your comment #5 in this thread?