alonewolfx2 wrote:eink with esp8266? is standalone ?
See http://spritesmods.com/?art=einkdisplay for the full writeup
// setup wifi mode
wifi_set_opmode(STATION_MODE);
// wifi config
{
struct station_config *config = (struct station_config *)zalloc(sizeof(struct station_config));
sprintf(config->ssid, "MYESSID");
sprintf(config->password, "MYPASSWORD");
wifi_station_set_config(config);
free(config);
}
// ip config
{
struct ip_info ipinfo;
ipinfo.gw.addr = ipaddr_addr("192.168.1.1");
ipinfo.ip.addr = ipaddr_addr("192.168.1.2");
ipinfo.netmask.addr = ipaddr_addr("255.255.255.0");
wifi_set_ip_info(STATION_IF, &ipinfo);
}
- I'm able to connect to the local wifi network via the form on 192.168.4.1.
If I specify a hostname on the network, the http request to the machine succeeds.
If I specify the hostname's IP address and call espconn_connect() directly without espconn_gethostbyname(), the espconn_connect() call returns -4 (ESPCONN_RTE, routing problem)
If I specify the hostname's IP address with the IoT demo stack, the http request to the machine succeeds.
Do you have any idea why I'm seeing this behavior? I guess what I'm asking is if there is some difference between the IoT demo and httpd stacks that might prevent ESP8266 from connecting to an IP address directly?
PS: The 192.168.4.1 hosted on the IoT demo example can be accessed from my Ubuntu machine; but the one hosted on the httpd stack can only be accessed from my non-Linux devices.