luc-github / ESP3D

FW for ESP8266/ESP8285/ESP32 used with 3D printer
GNU General Public License v3.0
1.78k stars 466 forks source link

Instability if compilation is done under linux - no issue windows version #64

Closed treepleks closed 8 years ago

treepleks commented 8 years ago

Dear Luc,

I have cloned your code (master branch) with the aim of using/tuning it to run on a smoothieboard variant (the AZSMZ mini) which has room reserved for an ESP01 module on its LCD board. I have bought 2 ESP01 module, they have 1MB flash, I use 128KB for the SPIFFS filesystem.

I compiled your code (with arduino 1.6.7 and the last version of the ESP8266 arduino module), flashed it but I have a problem with the web pages. I can connect to the ESP access point, authenticate, and access all the various pages but the "Station" page. The ESP never serves it.

I inserted a long list of Serial.println() in the corresponding function _handle_web_interfaceconfigSTA() in webinterface.cpp and the problem occurs on the following lines:

  //revert to pure softAP
  if (revertSTA) WiFi.mode(WIFI_AP);
  KeysList.add(FPSTR(KEY_AP_SCAN_VISIBILITY));
  ValuesList.add(VALUE_ITEM_VISIBLE);

If I comment the 2 last lines... everything seems to run fine. But I cannot see why these 2 lines could generate a problem (except for a lack of RAM issue).

Any idea ?

PS: I see you have also a specific Repetier firmware that communicate with the ESP module. Would it be possible to know what this firmware brings compared to Repetier ? If it's significant, I may upgrade Smoothieware in the same way.

luc-github commented 8 years ago

Ok I can reproduce issue if I comment 2 features :

//MDNS_FEATURE: this feature allow  type the name defined
//in web browser by default : http:\\esp8266.local and connect 
//#define MDNS_FEATURE

//SSDD_FEATURE: this feature is a discovery protocol, supported on Windows out of the box
//#define SSDP_FEATURE
treepleks commented 8 years ago

Good. Thanks for your help.

I posted an issue on ESP8266 for arduino as there are visible differences between the Linux and Windows ESP packages (eg. different versions of include files in the tools folder).

T.

Le 17/01/2016 16:32, Luc a écrit :

Ok I can reproduce issue if I comment 2 features : ··· //MDNS_FEATURE: this feature allow type the name defined //in web browser by default : http:\esp8266.local and connect //#define MDNS_FEATURE

//SSDD_FEATURE: this feature is a discovery protocol, supported on Windows out of the box //#define SSDP_FEATURE ···

— Reply to this email directly or view it on GitHub https://github.com/luc-github/ESP8266/issues/64#issuecomment-172341679.

luc-github commented 8 years ago

OK - I have changed the label to SDK issue

luc-github commented 8 years ago

I have changed title to better reflect issue

mundsen commented 8 years ago

Hi, I do not know if you want this here, or somewhere else? This module arrived yesterday: http://www.ebay.com/itm/271981074883?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

When I connect it to arduino, it says ESP-12E,4M so then it seems like the flash is ok on this module

luc-github commented 8 years ago

It is not an hardware issue but seems module issue as it happen only on linux version It may be a compilation problem as core is a zip file identical for all OS just compilation tools (binaries / libraries) are different according the OS they are used

treepleks commented 8 years ago

Would you share your code ? It would likely be trivial to integrate it (at least the SD recording ability) here.

Le 12/01/2016 06:42, Brokly a écrit :

I added to it the ability to record to SD and work with EEPROM, but I use Marlin and RAMPS.

mundsen commented 8 years ago

I guess you all know this, but I found a simple way to find Flash size using the Arduino IDE - added it to the RADDS WiFi documentation: http://doku.radds.org/dokumentation/other-electronics/wifi/

A question: is there a sample showing the settings for connecting the ESP8266 to en existing WiFi network, mode, SSID, Password ?

luc-github commented 8 years ago

there is a screenshot of station tab in readme, is that you are looking for? you also can use serial command to set parameters and display current config

mundsen commented 8 years ago

After spending some time learning how to do the setup, I now can confirm that the modue I ordered from ebay works fine without any soldering, and the one I got have 4M Flash. http://www.ebay.com/itm/271981074883?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

My wifi guide ready soon: http://doku.radds.org/dokumentation/other-electronics/wifi/

luc-github commented 8 years ago

Good - if 4M you are sure you won't have any limitation

I think I will do a new release next week as thanks to @treepleks code has several fixes in master now, and it is definitely better than beta1, also has more feature and linked to identifiable stable 2.0.0 of ESP8266 development module

mundsen commented 8 years ago

What settings do I need to enable in Repetier Firmware to get it communicate with the WiFi module? Bluetooth serial + baudrate? JSON..? - solved, my baudrate in Repetier was wrong

luc-github commented 8 years ago

@mundsen it depend where you connect ESP module, if you connect in RX1 TX1, repetier need to use Serial1 So you need to compile repetier with #define RFSERIAL Serial1 but it is not really ease of use so I did some modification in my flavor of FW to not have to - for me it is in printer menu, but my repetier version has a very different UI and some feature difference compare to repetier https://github.com/luc-github/Repetier-Firmware-0.92 (092.3 based) 0.92.6 is https://github.com/luc-github/Repetier-Firmware-0.92/tree/0.92.6-sync but I think will become https://github.com/luc-github/Repetier-Firmware-0.92/tree/0.92.8-sync very soon Originaly ported for Davinci printer, I also use it on my Due/RADDS/GLCD printer

for Marlin I never had time to check yet

luc-github commented 8 years ago

Now 2.1.0 stable is out (http://arduino.esp8266.com/versions/2.1.0/package_esp8266com_index.json) - may be issue is solved

luc-github commented 8 years ago

seems 2.1.0 do not solve issue https://github.com/luc-github/ESP8266/issues/80

luc-github commented 8 years ago

Ok it is actually several missing FPSTR that generate the crash - weird crash happen only when compilation is done under linux and not under windows

https://github.com/luc-github/ESP8266/commit/6f413b851f32506bdea78d20df8ec6a04aaeae09

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.