Closed Industry-Standard closed 3 years ago
Can you try by not loading TASKS, WIFI, NETCON, MAILBOX? Because TCPREPL loads these directly or indirectly. Loading them manually multiple times will likely eat up the ram.
Thanks for the quick reply on this. With the recommended changes, it works! With the following code:
EVENT load
FLASH load
TURNKEY load
TCPREPL load
repl-start
I am able to connect to the TCP REPL and start playing around!
I wanted to ask about something in the guide:
The station mode Wi-Fi settings are persistently stored by the ESP8266, there is no need to setup the Wi-Fi at every startup.
As I understand it, you have to set up the Wi-Fi at least once for the station settings to persist. Is there a way to verify that the Wi-Fi is connected on subsequent boots of the ESP8266 to avoid having to execute the wifi-connect
word on each boot?
Yes, you can set up the wifi once, and remove the wifi-connect from the code. If you try you make a connection without having wifi, it will throw an exception (ENETCON).
I tried on a NodeMCU Amica and an Adafruit Feather HUZZAH esp8266 but the behavior was the same. Calling repl-start throws an exception, and then the ESP reboots. I am probably doing something wrong. Any help would be greatly appreciated!
I followed the bouncing ball at https://github.com/zeroflag/punyforth and https://github.com/zeroflag/punyforth/wiki/Developing-and-deploying-Punyforth-applications, and did the following:
Write some FORTH
Here's the contents of wifi-repl.forth, basically what I could tell as being enough to get a REPL over TCP.
Flash the ESP8266
Flashes okay, at least seems to work; I get the UART REPL to load and can do some stuff. I'm flashing from Ubuntu MATE fwiw.
Connect to the UART REPL
Output when running
Boot loop; it'll do this forever, whether it gets connected to the wifi AP or not.