-
-
I'm trying to keep updated nodemcu esp8266 12e documentation - in regards to flashing and other issues specific to that board.
Any chance you have a screenshot, error log, or steps to reproduce the 'text reversed' issue you encountered? Those would be useful to add to the document/conversation for others who might be searching for 'reversed text' and whatever errors may be showing up.
-
For anyone else having the same issues. I've started a thread specifically for the device I had issues with NodeMCU ESP8266 12E Amica.
The good news—I got it working! -
-
-
-
NodeMCU ESP8266-12E Flashing Espruino
This is still a work in progress. Posting here hopefully with all exact error messages that were gotchas for me so it can be found more easily. More likely, I'll publish a github project to keep track of NodeMCU flashing info for Espruino and otherwise specific to this make/model.
Thanks to the Espruino forum admins to let use third-party board users have a lil' space on their forum to discuss this. I must mention, it seems if you want to use javascript on a microcontroller the best way to go is a genuine Espruino board NodeMCU and the like will likely take a lot of your free time for a couple weeks to get things working the way you thought they would :D
On with it then below you'll find:
- Model Info Sheet
- Flashing Espruino
- Additional Notes
ESP8266 Model Info
Results of esptool's flash_id:
esptool.py --port /dev/cu.SLAB_USBtoUART flash_id Chip: ESP8266 Manufacturer: c8 Device: 4016 Detected flash size: 4MB
This is what I bought: HiLetgo New Version ESP8266 NodeMCU LUA CP2102 ESP-12E Internet WIFI Development Board Open source Serial Wireless Module Works Great with Arduino IDE/Micropython
Flashing Espruino Firmware
Setup directories for your NodeMCU firmware, download latest ('cutting edge') Espruino, unpack it, and enter directory. (setup nested directory, because I also have nodemcu lua firmware I use on this device).
mkdir 'nodemcu-firmware' && cd 'nodemcu-firmware' # create firmware directory and enter it mkdir 'espruino' && cd 'espruino' # create espruino directory and enter it curl -O 'http://www.espruino.com/binaries/travis/master/espruino_1v94.136_esp8266_4mb.tgz' # download the firmware tar -xvzf espruino_1v94.136_esp8266_4mb.tgz # upack the .tgz file rm espruino_1v94.136_esp8266_4mb.tgz # if tar was success full clean up and remove .tgz file cd espruino_1v94.136_esp8266_4mb # enter the new extracted directory
Connect via USB
Run
erase_flash
command.esptool.py --port /dev/cu.SLAB_USBtoUART erase_flash
/dev/
is specific to macOS- I don't believe it matters if you use
/dev/cu.*
or/dev/tty.*
SLAB_USBtoUART
is what shows up for me your's may be different. I'll add directions to figure this out when I get to it :D
Disconnect/Reconnect USB from device. (I haven't tested this to see if it's necessary)
Run
write_flash
command:esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --verify --flash_freq 80m --flash_mode dio --flash_size 32m 0x0000 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_default.bin 0x37E000 blank.binaries
- Use
dio
to flash the device properly. -- Below, @Gordon mentions that some other boards are able to handleqio
and those boards can use it '...for faster access'.
- Use
Common Errors
Using
qio
option when running thewrite_flash
command to flash the firmware:- Esptool flashes the firmware to the device without triggering any errors
- Espruino Web IDE connects to device, but doesn't seem to work properly and may exhibit these issues:
- Terminal window will not respond. When clicking in terminal window, no text cursor is displayed and will not respond to keyboard entries. (Terminal window still triggered the ':active' state color change when clicked).
Settings >> Console -- the console log:
>>> Connecting... Set Slow Write = true Unable to open device (connectionInfo=undefined) ERROR: Unable to open device (connectionInfo=undefined) ERROR: [notify_error] Connection Failed. >>> Connection Failed. >>> Connecting... Set Slow Write = true Unable to open device (connectionInfo=undefined) ERROR: Unable to open device (connectionInfo=undefined) ERROR: [notify_error] Connection Failed. >>> Connection Failed. >>> Connecting... Set Slow Write = true [object Object] Connected [object Object] Found a prompt... great! >>> Sending... ---> "\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n" >>> Sent WARNING: No result found - just got "" >>> Sent
- Esptool flashes the firmware to the device without triggering any errors
- Model Info Sheet
-
-
-
Uhg, no difference for me. Same errors as before. No clue where to go from here. Thanks for your help anyhow @swaroop
-
-
I'm on the same path. Trying to figure out to get nodemcu esp8266 running Espruino. I've had no luck. Something I wasn't aware of when I bought mine was that there are many versions of the esp8266.
Can you give us some more details of exactly which board you have?
Here's what I purchased:
HiLetgo New Version ESP8266 NodeMCU LUA CP2102 ESP-12E
*The one I bought has "Amica" written underneathIn particular, the '12E' part is a different model than many other users on this forum seem to have had success with. Secondly, all of the tutorials I've ran through mentioned needing to set the baud rate to 115200 (my board literally has 'set baud rate to 9600' stamp on the underside), but I believe we're still supposed to set baud rate to 115200 (someone please correct me if this is in error). I've also tried the ThingsSDK tutorial to no avail.
My experience:
Flashing the device seems to work flawlessly, getting it to display anything but unintelligible character strings withscreen --port /dev/tty.SLAB_USBtoUART --baud 115200
has not be successful. Espruino Web IDE allows me to connect when baud rate is set to 115200 however, the console is unresponsive (no text or commands are respected when trying to type into the terminal window). When I open the Web IDE settings menu and click console, the log shown there says that it connect and got a prompt, but also says that it... just got ""
response from it. This suggests that theboot_v1.6.bin
file does not load correctly. I mentioned in an earlier post 9 months ago @MaBe said we should switch outboot_v1.6.bin
forboot_v1.5.bin
. I've yet to find a copy of it in the archived files though :(Let me know if you figure it out!
-
Nope no answer to the issue yet. My hunch is that I need to flash latest and swap out the boot file
boot_v1.6.bin
withboot_v1.5.bin
. However, I wasn't able to find a copy last night to try out that theory.For reference this is the board I'm working with: HiLetgo New Version ESP8266 NodeMCU LUA CP2102 ESP-12E Internet WIFI Development Board Open source Serial Wireless Module Works Great with Arduino IDE/Micropython*
*note: It has 'Amica' printed on the underside.
I'll try to only post in this thread if an answer or a glimmer of one is found.
So far, these are the only nuggets I've found and they're in this forum: -
-
-
-
Thanks Gordon. I've been dipping my toe into the deep end as far as micro controllers go. Bought a NodeMCU ESP8266 on a whim. Tried my hand at Lua got things to work, but frankly I just don't like the syntax. So, I've been on a quest to get JS on it. Thank you for allowing us even smidgen of hope to use Espruino on third-party boards. <3
From the looks of the log I had assumed it wasn't a problem with the connected board but rather a problem with the dialog between the WebIDE and OSX. I've been searching all over and this is the only thread I could find that talking about the problem with any detail. I'll jump to the other forum to ask there.
You may be correct that it's simply an issue with the connection to the board itself. I've since tried another route (re-flashing espruino esp8266 "4mb" with Flasher.js and thingssdk).
With that in mind, thingssdk and using the tutorial found on espruino.com
screen /dev/cu.SLAB_USBtoUART 115200
both produce this error:espruino: Connecting to '/dev/tty.SLAB_USBtoUART' espruino: No result found - just got "" espruino: Connected
As well as the WebIDE error I posted earlier:
WARNING: No result found - just got ""
Thanks for the help!
-
Having the same issues accessing the terminal in Web IDE.
The interface responds to everything except the terminal and 'Projects' button/icon.Keys typed into the terminal do not show (tried hitting 'Enter' key to see if interface would respond). No luck. Console produces no errors. Only one warning.
Connected > 1 var on = false; 2 setInterval(function() { 3 on = !on; 4 LED1.write(on); 5 }, 500); SENT TTY.SLAB_USBTOUART SETTINGS ABOUT GENERAL COMMUNICATIONS BOARD OFFLINE MODE PROJECT MINIFICATION TESTING SOUND FLASHER CONSOLE CONSOLE The last 100 lines of log messages made by the Web IDE. This is only useful when trying to debug potential problems with the IDE or Espruino board itself. We have chrome.serial - not using 'serialport' module serial_audio: Audio Sample rate : 44100 serial_audio: Audio Serial Baud 9600 Bit time 4.59375 GET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"|bluetooth|robot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"var on = false;\nsetInterval(function() {\n on = !on;\n LED1.write(on);\n}, 500);","COMPILATION":true,"COMPILATION_URL":"http://www.espruino.com:32766","ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"ESPRIMA","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","NPM_MODULES":true,"OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_TCPIP":"","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":false,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEB_BLUETOOTH":true,"projectEntry":"B8854CEDD3294E435402EC6A1CADA34D:espruino"} Initialising SettingsConsole Initialising Utils Initialising Config Initialising Notifications Initialising Status Initialising App Initialising File Initialising Code Initialising Serial - Initialising Serial Chrome Serial - Initialising Serial Chrome Socket - Initialising Serial Audio - Initialising Serial Web Bluetooth Initialising Terminal Initialising CodeWriter Initialising Modules Initialising Env Initialising Flasher Initialising EditorBlockly Initialising EditorJavaScript Initialising Send Initialising MenuPortSelector Initialising MenuSettings Initialising MenuFlasher Initialising SettingsAbout Initialising SettingsFlasher Initialising BoardJSON Initialising VersionChecker Initialising Compiler Initialising Assembler Initialising GetGitHub Initialising NPMModules Initialising SetTime Initialising Unicode Initialising Minify Initialising SaveOnSend Initialising Tutorial Initialising Webcam Initialising FontSize Initialising UiMode Initialising URLHandler Initialising CodeLink Initialising Project Initialising Testing Initialising Notification_Sound Initialising Tern Initialising Debugger Initialising Tour Initialising SettingsProfile Initialising HelpLinks Initialising Offline Loaded code from storage. GET chrome.storage.local.OFFLINE_DATA = 0 bytes >>> Connecting... Set Slow Write = true Unable to open device (connectionInfo=undefined) ERROR: Unable to open device (connectionInfo=undefined) ERROR: [notify_error] Connection Failed. >>> Connection Failed. >>> Connecting... Set Slow Write = true Unable to open device (connectionInfo=undefined) ERROR: Unable to open device (connectionInfo=undefined) ERROR: [notify_error] Connection Failed. >>> Connection Failed. >>> Connecting... Set Slow Write = true [object Object] Connected [object Object] Found a prompt... great! >>> Sending... ---> "\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n" >>> Sent WARNING: No result found - just got "" Device found (connectionId=5) [success] Connected to port /dev/tty.SLAB_USBtoUART >>> Connected to port /dev/tty.SLAB_USBtoUART Found a prompt... great! >>> Sending... ---> "\u0010reset();\n\u0010var on = false;\n\u0010setInterval(function() {\u001b\n on = !on;\u001b\n LED1.write(on);\u001b\n}, 500);\n\n" Splitting at "reset();\n", delay 250 >>> Sent
Thanks for the reply @MaBe and the link. I finally figured out why I kept getting a bad build; now I can use the 'cutting edge' build as long as I use the 'dio' option instead of 'qio' when flashing.