Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By CHERTS
#7504
ulko wrote:In existing user_config.h there is my ssid + PW but still says: 'no MYAP found'??


Edit the file C:\Espressif\examples\esphttpd\include\user_config.h in such a form:

#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__
#define USE_WIFI_MODE STATION_MODE
#define WIFI_CLIENTSSID "MYAP" <----------------- Edit
#define WIFI_CLIENTPASSWORD "00000000" <----------------- Edit
#define WIFI_AP_NAME "ESP8266"
#define WIFI_AP_PASSWORD "00000000"
#define PLATFORM_DEBUG true <----------------- Debug log enable
#endif


After flashing the ESP in the console terminal you should see these messages:

ESP8266 in STA mode configured.
Wi-Fi mode: STATION
STA config: SSID: MYAP, PASSWORD: 00000000
Httpd init, conn=0x3ffeac84
...


You see these messages?
User avatar
By CHERTS
#7531
ulko wrote:In existing user_config.h there is my ssid + PW but still says: 'no MYAP found'??


I found a possible cause and fix the file wifi.c, a new file in the attachment, copy it to the directory C:\Espressif\examples\esphttpd\user\
You do not have the required permissions to view the files attached to this post.
User avatar
By ulko
#7583
CHERTS wrote:
ulko wrote:In existing user_config.h there is my ssid + PW but still says: 'no MYAP found'??


I found a possible cause and fix the file wifi.c, a new file in the attachment, copy it to the directory C:\Espressif\examples\esphttpd\user\

The new wifi.c seems to have no effect. But before I changed config.h as you told me - and now I get connection (station mode was STATIONAP_MODE???). Hurrah!!
But now back to my modified example 'esphttpd' I tried to make and flash file webpages.espfs. Using 'htmlflash' looks good (build and flash) but using browser only submits e.g. led.tpl. But there is no httpd -send back of webpage to browser. So I believe mkespfsimage is not correct. In new version 1.0.5 are 3 dir's 'mkespfsimage_...'.
Which of these has to be used??
Can you please describe the steps to build webpages.espfs??
Kind regards
Ulko


EDIT: debug output from loading dht22.tpl :
Con req, conn=0x3fff5158, pool slot 0
URL = /dht22.tpl
Is url index 3
Heatshrink compressed file; decode parms = b4
Con req, conn=0x3fff5410, pool slot 1
Temp = 2160 *C, Hum = 3300 %
Conn 0x3fff5158 is done. Closing.
User avatar
By jnosky
#7621
ulko wrote:Hi cherts,
After endless trials with partly success (only webpages.espfs not OK) I'm now using version 1.0.5. with a modified version example 'esphttpd'. All compiling, linking and flash runs without any errror.
webpages.espfs also is built correctly and flashed.
In older versions I got connection via wifi to my router.
The problem now is that I don't get connection. Only the following messages:

Httpd init, conn=0x3ffeac84

Ready
mode : sta(18:fe:34:9d:eb:48) + softAP(1a:fe:34:9d:eb:48)
add if0
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
add if1
bcn 100
scandone
no MYAP found, reconnect after 1s
reconnect
scandone
no MYAP found, reconnect after 1s
reconnect


Other examples (Hello World, dht22) work correctly.
No connection with 192.168.4.1/wifi
Do you have any idea?? May be the wifi part is defect?? What is MYAP??

Kind regards
ulko

When I had this problem, flashing blank.bin fixed it.