GithubHelp home page GithubHelp logo

nkolban / duktape-esp32 Goto Github PK

View Code? Open in Web Editor NEW
236.0 31.0 44.0 38.08 MB

A JavaScript runtime for the ESP32 based on Duktape.

License: Apache License 2.0

Makefile 1.22% C 60.46% Shell 0.16% C++ 0.05% JavaScript 36.28% HTML 1.83%

duktape-esp32's Introduction

ESP32-Duktape

The ESP32 is a WiFi and Bluetooth enabled MCU from Espressif. It is a dual core processor with 512K of RAM and commonly 4M of flash. Each processor runs at 240MHz. It has built in WiFi and Bluetooth as well as a rich assortment of sensor inputs and outputs.

Duktape is an open source implementation of a JavaScript environment including a runtime, compiler, debugger and a wealth of well written documentation.

This project provides an environment for running JavaScript on the ESP32 using the Duktape engine. In addition to providing all the necessary components to run a simple JavaScript program, a framework is also provided that provides premade modules for many of the common ESP32 functions including networking, web servers, web sockets, GPIO and much more.

An integrated browser based JavaScript editor and file system are also present meaning that once installed, one needs no specialized tools in order to build and run JavaScript.

All components in this project are open source. Collaborators welcomed.

duktape-esp32's People

Contributors

boneskull avatar dashxdr avatar gpgabriel avatar nkolban avatar ryfow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

duktape-esp32's Issues

SSID containing space character is not URL-decoded

My SSID has a space character, which is not correctly decoded from the http-request after submit.
Looking at the log output, it seems, that the characters are not decoded after retrieving them from the http-request. My SSID is "HAL9000 2.4"

D (4133) log: Going to try and connect to AP named "HAL9000+2.4"
D (6141) module_wifi:  - Connecting to access point: "HAL9000+2.4" with "<Password hidden>"

I had the same thing in an arduino sketch some day, and fixed it with this code excerpt:

void decodeUrlComponent(String* value) {
  value->replace("+", " ");
  value->replace("%21", "!");
  value->replace("%22", "\"");
  value->replace("%23", "#");
  value->replace("%24", "$");
  value->replace("%25", "%");
  value->replace("%26", "&");
  value->replace("%27", "'");
  value->replace("%28", "(");
  value->replace("%29", ")");
  value->replace("%2A", "*");
  value->replace("%2B", "+");
  value->replace("%2C", ",");
  value->replace("%2D", "-");
  value->replace("%2E", ".");
  value->replace("%2F", "/");
  value->replace("%3A", ":");
  value->replace("%3B", ";");
  value->replace("%3C", "<");
  value->replace("%3D", "=");
  value->replace("%3E", ">");
  value->replace("%3F", "?");
  value->replace("%40", "@");
}

build ESP32-Duktape from source

Hi there,

I am trying to build ESP32-Duktape from source but I get an error.
I followed this doc https://github.com/nkolban/duktape-esp32/blob/master/docs/Building%20duktape%20from%20github.md
what I did:

  1. Download/extract the latest duktape release
  2. Create component.mk with all the modifications listed in the doc
  3. I did not follow the optional section.
  4. Then make duktape_configure

Then I just do not know exactly what is the next step. I tried to launch
make ship command but I get the following error:
+--------------------+ | Building espfs.img | +--------------------+ /bin/sh: ../bin/mkespfsimage: cannot execute binary file make: *** [images] Error 126

Any ideas what I am missing or doing wrong?
I am on MacOs if that can help
Thanks a lot

Virtual network filesystem

Regarding this idea:
#24 (comment)

Since we switched to using the esp-idf's spiffs implementation it is somewhat complex creating a virtual network flash device to imitate the actual flash device. We'd only need to implement 3 functions: read, write, erase. Wrapping that in a network layer so the requests can be transmitted over WIFI would be trivial (both for client + server).

The problem is esp-idf's spiffs implementation hard-codes the read/write/erase functions for its integration of the spiffs library to make use of the esp-idf's spi flash machinery.

It would be straightforward modifying the esp-idf to allow overriding the 3 crucial functions in the register() function, but then we're dealing with convincing esp-idf to accept the change. I haven't dealt with them... and my time is limited. I can't say how responsive they'd be.

So there is a PlanB approach. Don't even bother with spiffs and instead just use the esp-idf's vfs functionality to register a virtual network filesystem. We only need to provide open,close,read,write,fstat functions. https://esp-idf.readthedocs.io/en/v2.0/api/storage/vfs.html

I'm doing some digging to see if someone has already done this. Failing that I'm thinking I'll just go ahead and implement something. Probably do it in javascript on both ends and the duktape-esp32 would just be a bit of 'c' glue. Performance isn't an issue.

The browser IDE doesn't wok

flashing ok, wifi config ok, connect to the browser IDE ok,

But when I click the RUN button , no output in the console area.

And when I click the LOAD button , no response too.

Installation

just got the sparkfun esp32 board, tried:

esptool.py \
--chip esp32 \
--port "tty.usbserial-DN02MZEH" \
--baud 115200  \
write_flash -z  \
--flash_mode "dio" \
--flash_freq "40m"  \
--flash_size "2MB"  \
0x1000 bootloader.bin 0x10000 \
app-template.bin \
0x8000 partitions_singleapp.bin

and got:

usage: esptool [-h] [--port PORT] [--baud BAUD]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash,verify_flash,erase_flash}
               ...
esptool: error: argument operation: invalid choice: 'esp32' (choose from 'load_ram', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'make_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash', 'verify_flash', 'erase_flash')

note: the board and port work fine with the arduino-esp32 libraries.

Vagrant or Docker

To build this project, you need:

  1. The xtensa build toolchain
  2. the build-essential (or equivalent) toolchain
  3. Python (2.7, I think)
  4. ESP-IDF & its submodule(s)
  5. Some stuff in $PATH and $IDF_PATH must be set
  6. duktape working copy or tarball
  7. Node.js & userland modules for tooling
  8. Some misc tooling such as mkspiffs and mkespfsimage which may need to be (re-)compiled

This is pretty painful, and some may not appreciate any potential version conflicts with already-installed software on their system. To mitigate this, how about we:

  • Use Vagrant and a preconfigured Linux "box" with all of the prerequisites installed. This would necessitate use of hypervisor-specific utils that'd allow the user to "share" any COM ports / USB devices from the host to guest OS. VirtualBox is free (as free as Oracle software gets, anyway) and adequate for our purposes. OR:
  • Instead of Vagrant & a VM, use container(s) and Docker. I know very little about containers other than running and configuring a few via GUIs, but the JerryScript folks went this route, and perhaps we can steal their ideas.

A solution like the above has some added wins:

  1. We can standardize the development environment, so we avoid hitting a certain class of development difficulties.
  2. Any hardcoded paths which currently exist in the codebase (e.g., pointing to @nkolban's home directory ๐Ÿ˜‰) can instead use this environment
  3. Windows users can build this project
  4. Eliminate need for separate development documentation for Mac users (who have somewhat different prereqs and pre-built/compiled executables in bin/) and Windows users
  5. Easy to update the environment as needed

Thoughts?

simplify curl-esp32 component.mk

According to esp-idf/docs/build_system.rst

  • COMPONENT_PATH: The component directory. Evaluates to the absolute path of the directory containing component.mk. The component path cannot contain spaces.

CURL_PATH=$(COMPONENT_PATH) will work instead

code doesn't seem to be executing

Hi Neil, decided to take a look at this finally.
Managed to get as far as being able to bring the IDE up on:
http://192.168.0.179:8000/web/ide.html

had to use nmap to find the port, but eventually got it working.

problem now is that I can't get any response from the esp,
ie: clicking 'run' with the default 'hello world' code snippet simply results in a message in the browser console that the code has been sent for evaluation, but that's it, nothing else happens.

any suggestions on how to debug this?
I tried to screen into the esp via serial port, but that wasn't successful either.

Thanks

URL.queryParse() doesn't decode spaces

by default, HTML forms are submitted with encoding application/x-www-form-urlencoded, which decodeURIComponent() doesn't quite decode properly.

in other words, occurrences of + should be replaced with %20 before decodeURIComponent() is called. (also, I think it's calling decodeURIComponent() more than it needs to)

PR incoming

websocket example

I would be grateful if you provide websocket example (send and receive binary and text; sync and Asynchronous).
Thank you

Can't connects to the router

Everything seems working fine, except connecting to my router, or hotspot that's created by the cellphone. WIFI.connect always returns STA_DISCONNECTED no matter what. Please help!

HTTPS(SSL)

1- Does duktape-esp32 support SSL over HTTP?

2- How we can update firmware over field over the air.

ESP32 does not become Access point

Hi there, I was trying to follow the cheat sheet and got stuck with the access point. My phone cannot find the access point. Is there any additional setup to make the access point to work?

I put this on a ESP32 WROOM and when I clicked the load button. it crashed

Grabbed the binary and loaded it, setup for my WiFi got an address. I connected to the ide page and
clicked on the LOAD button. (I also couldn't run the Hello world example, that crashed as well. I believe it was a send error also).

Here is the log of the session.
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2836
load:0x40078000,len:7504
ho 0 tail 12 room 4
load:0x40080000,len:252
entry 0x40080034
I (46) boot: ESP-IDF v1.0-510-g6bc9cd3 2nd stage bootloader
I (46) boot: compile time 14:51:38
I (47) boot: Enabling RNG early entropy source...
I (57) boot: SPI Speed : 40MHz
I (67) boot: SPI Mode : DIO
I (76) boot: SPI Flash Size : 4MB
I (86) boot: Partition Table:
I (94) boot: ## Label Usage Type ST Offset Length
I (113) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (134) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (154) boot: 2 factory factory app 00 00 00010000 00100000
I (174) boot: End of partition table
I (184) boot: Disabling RNG early entropy source...
I (198) boot: Loading app partition at offset 00010000
I (1608) boot: segment 0: paddr=0x00010018 vaddr=0x00000000 size=0x0ffe8 ( 65512)
I (1609) boot: segment 1: paddr=0x00020008 vaddr=0x3f400010 size=0x26988 (158088) map
I (1620) boot: segment 2: paddr=0x00046998 vaddr=0x3ffb0000 size=0x02714 ( 10004) load
I (1648) boot: segment 3: paddr=0x000490b4 vaddr=0x40080000 size=0x00400 ( 1024) load
I (1668) boot: segment 4: paddr=0x000494bc vaddr=0x40080400 size=0x1e604 (124420) load
I (1750) boot: segment 5: paddr=0x00067ac8 vaddr=0x400c0000 size=0x00000 ( 0) load
I (1751) boot: segment 6: paddr=0x00067ad0 vaddr=0x00000000 size=0x08538 ( 34104)
I (1761) boot: segment 7: paddr=0x00070010 vaddr=0x400d0018 size=0x93df8 (605688) map
I (1786) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (1805) heap_alloc_caps: At 3FFB88E0 len 00027720 (157 KiB): DRAM
I (1824) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM
I (1842) heap_alloc_caps: At 4009EA04 len 000015FC (5 KiB): IRAM
I (1860) cpu_start: Pro cpu up.
I (1868) cpu_start: Starting app cpu, entry point is 0x40080c78
I (0) cpu_start: App cpu up.
I (1894) cpu_start: Pro cpu start user code
V (1945) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (1946) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (1978) intr_alloc: Connected src 56 to int 2 (cpu 0)
V (2024) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (2078) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (2148) intr_alloc: Connected src 16 to int 3 (cpu 0)
V (2193) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (2250) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (2322) intr_alloc: Connected src 24 to int 12 (cpu 0)
D (2371) nvs: nvs_flash_init_custom start=9 count=6
D (2468) phy_init: loading PHY init data from application binary
D (2469) nvs: nvs_open phy 0
D (2488) nvs: nvs_get cal_version 4
V (2519) phy_init: phy_get_rf_cal_version: 258

D (2558) nvs: nvs_get_str_or_blob cal_mac
D (2594) nvs: nvs_get_str_or_blob cal_data
D (2642) nvs: nvs_close 1
V (2649) phy_init: register_chipv7_phy, init_data=0x3f401bd8, cal_data=0x3ffba15c, mode=0
I (2839) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0
D (2839) nvs: nvs_open phy 1
V (2840) phy_init: phy_get_rf_cal_version: 258

D (2855) nvs: nvs_set cal_version 4 258
D (2893) nvs: nvs_set_blob cal_mac 6
D (2924) nvs: nvs_set_blob cal_data 1904
D (3433) nvs: nvs_close 2
I (3434) cpu_start: Starting scheduler on PRO CPU.
V (1550) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (1550) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args okay. Resulting flags 0x40E
D D (1550) intr_alloc: Connected src 25 to int 2 (cpu 1)
I (1560) cpu_start: Starting scheduler on APP CPU.
(1550) duktape_main: Free heap at start: 243796
D (1570) duktape_main: Free IRAM: 5620
D (1570) nvs: nvs_open misc 1
D (1570) nvs: nvs_get_str_or_blob log
I (1580) wifi: frc2_timer_task_hdl:3ffbf918, prio:22, stack:2048
D (1580) nvs: nvs_open nvs.net80211 1
D (1590) nvs: nvs_get opmode 1
D (1590) nvs: nvs_get country 1
D (1590) nvs: nvs_get_str_or_blob sta.ssid
D (1600) nvs: nvs_get_str_or_blob sta.mac
D (1600) nvs: nvs_get sta.authmode 1
D (1600) nvs: nvs_get_str_or_blob sta.pswd
D (1610) nvs: nvs_get_str_or_blob sta.pmk
D (1610) nvs: nvs_get sta.chan 1
D (1610) nvs: nvs_get auto.conn 1
D (1620) nvs: nvs_get bssid.set 1
D (1620) nvs: nvs_get_str_or_blob sta.bssid
D (1620) nvs: nvs_get sta.phym 1
D (1630) nvs: nvs_get sta.phybw 1
D (1630) nvs: nvs_get_str_or_blob sta.apsw
D (1630) nvs: nvs_get_str_or_blob sta.apinfo
D (1640) nvs: nvs_get_str_or_blob ap.ssid
D (1640) nvs: nvs_get_str_or_blob ap.mac
D (1650) nvs: nvs_get_str_or_blob ap.passwd
D (1650) nvs: nvs_get_str_or_blob ap.pmk
D (1650) nvs: nvs_get ap.chan 1
D (1660) nvs: nvs_get ap.authmode 1
D (1660) nvs: nvs_get ap.hidden 1
D (1660) nvs: nvs_get ap.max.conn 1
D (1670) nvs: nvs_get bcn.interval 2
D (1670) nvs: nvs_get ap.phym 1
D (1670) nvs: nvs_get ap.phybw 1
D (1670) nvs: nvs_get ap.sndchan 1
D (1680) nvs: nvs_set_blob sta.mac 6
D (1680) nvs: nvs_set_blob ap.mac 6
I (1690) wifi: Init lldesc rx mblock:25
I (1690) wifi: Init lldesc rx ampdu len mblock:7
I (1690) wifi: Init lldesc rx ampdu entry mblock:4
I (1700) wifi: pp_task_hdl : 3ffcc728, prio:23, stack:8192
D (1700) duktape_task: >> duktape_task
D (1700) dukf_utils: duktape_task: heapSize=158072
D (1710) nvs: nvs_open esp32duktape 1
D (1710) nvs: nvs_get useSerial 4
D (1720) nvs: nvs_close 5
D (1720) duktape_spiffs: Loading SPIFFS at address 0x180000
D (1730) duktape_task: About to create heap
D (1750) dukf_utils: Heap after duk create heap: heapSize=127164
D (1780) dukf_utils: Heap before after duk_module_duktape_init: heapSize=125656
D (1780) modules: >> registerModules
D (1780) module_os: Registering moduleOS
D (1790) modules: << registerModules
D (1790) dukf_utils: Heap after duk register modules: heapSize=120464
D (1790) dukf_utils: >> dukf_runFile: /init.js
D (1800) dukf_utils: >> dukf_loadFile: (ESPFS) /init.js, heapSize=120464
D (1800) espfs: >> espFsOpen: /init.js
D (1810) dukf_utils: << duk_loadFile: Read file /init.js for size 2774
D (1950) log: Module: require("loop.js") loading "loop.js"
D (1960) dukf_utils: >> dukf_loadFile: (ESPFS) loop.js, heapSize=113640
D (1960) espfs: >> espFsOpen: loop.js
D (1960) dukf_utils: << duk_loadFile: Read file loop.js for size 5387
D (2130) log: Module: require("net.js") loading "net.js"
D (2130) dukf_utils: >> dukf_loadFile: (ESPFS) net.js, heapSize=108860
D (2130) espfs: >> espFsOpen: net.js
D (2140) dukf_utils: << duk_loadFile: Read file net.js for size 4932
D (2320) modules: >> js_esp32_getNativeFunction
D (2320) modules: - nativeFunctionId that we are looking for is "ModuleSSL"
D (2320) modules: << js_esp32_getNativeFunction
D (2330) modules: >> js_esp32_getNativeFunction
D (2330) modules: - nativeFunctionId that we are looking for is "ModuleSSL"
D (2340) modules: << js_esp32_getNativeFunction
D (2340) log: Major function "loop()" registered
D (2350) dukf_utils: << dukf_runFile: /init.js
D (2350) dukf_utils: Heap after init.js: heapSize=102440
D (2360) log: Console: esp32_duktape>
D (2360) dukf_utils: Running scripts registered to auto start:
D (2370) dukf_utils: autostart: start.js
D (2370) dukf_utils: >> dukf_runFile: start.js
D (2370) dukf_utils: >> dukf_loadFile: (ESPFS) start.js, heapSize=102440
D (2380) espfs: >> espFsOpen: start.js
D (2380) dukf_utils: << duk_loadFile: Read file start.js for size 1892
D (2480) log: Module: require("nvs") loading "nvs"
D (2480) dukf_utils: >> dukf_loadFile: (ESPFS) nvs.js, heapSize=99776
D (2480) espfs: >> espFsOpen: nvs.js
D (2480) dukf_utils: << duk_loadFile: Read file nvs.js for size 1298
D (2550) modules: >> js_esp32_getNativeFunction
D (2550) modules: - nativeFunctionId that we are looking for is "ModuleNVS"
D (2560) modules: << js_esp32_getNativeFunction
D (2560) nvs: nvs_open esp32duktape 1
D (2560) nvs: nvs_get useSerial 1
D (2570) log: useSerial: null
D (2570) nvs: nvs_close 6
D (2570) log: Module: require("bootwifi.js") loading "bootwifi.js"
D (2580) dukf_utils: >> dukf_loadFile: (ESPFS) bootwifi.js, heapSize=94848
D (2580) espfs: >> espFsOpen: bootwifi.js
D (2590) dukf_utils: << duk_loadFile: Read file bootwifi.js for size 5563
D (2810) log: Module: require("nvs.js") loading "nvs.js"
D (2810) dukf_utils: >> dukf_loadFile: (ESPFS) nvs.js, heapSize=86332
D (2810) espfs: >> espFsOpen: nvs.js
D (2810) dukf_utils: << duk_loadFile: Read file nvs.js for size 1298
D (2900) modules: >> js_esp32_getNativeFunction
D (2900) modules: - nativeFunctionId that we are looking for is "ModuleNVS"
D (2900) modules: << js_esp32_getNativeFunction
D (2910) log: Module: require("http.js") loading "http.js"
D (2910) dukf_utils: >> dukf_loadFile: (ESPFS) http.js, heapSize=83508
D (2910) espfs: >> espFsOpen: http.js
D (2920) dukf_utils: << duk_loadFile: Read file http.js for size 8449
D (3230) log: Module: require("net") loading "net"
D (3230) dukf_utils: >> dukf_loadFile: (ESPFS) net.js, heapSize=74536
D (3230) espfs: >> espFsOpen: net.js
D (3230) dukf_utils: << duk_loadFile: Read file net.js for size 4932
D (3440) modules: >> js_esp32_getNativeFunction
D (3440) modules: - nativeFunctionId that we are looking for is "ModuleSSL"
D (3440) modules: << js_esp32_getNativeFunction
D (3450) log: Module: require("stream") loading "stream"
D (3450) dukf_utils: >> dukf_loadFile: (ESPFS) stream.js, heapSize=69104
D (3460) espfs: >> espFsOpen: stream.js
D (3460) dukf_utils: << duk_loadFile: Read file stream.js for size 5174
D (3600) log: Module: require("httpparser") loading "httpparser"
D (3600) dukf_utils: >> dukf_loadFile: (ESPFS) httpparser.js, heapSize=66156
D (3600) espfs: >> espFsOpen: httpparser.js
D (3600) dukf_utils: << duk_loadFile: Read file httpparser.js for size 10085
D (3860) log: Module: require("stream.js") loading "stream.js"
D (3860) dukf_utils: >> dukf_loadFile: (ESPFS) stream.js, heapSize=59848
D (3860) espfs: >> espFsOpen: stream.js
D (3870) dukf_utils: << duk_loadFile: Read file stream.js for size 5174
D (4010) log: Module: require("url.js") loading "url.js"
D (4010) dukf_utils: >> dukf_loadFile: (ESPFS) url.js, heapSize=58084
D (4010) espfs: >> espFsOpen: url.js
D (4010) dukf_utils: << duk_loadFile: Read file url.js for size 2430
D (4120) nvs: nvs_open bootwifi 1
D (4120) nvs: nvs_get_str_or_blob ssid
D (4120) nvs: nvs_get_str_or_blob ssid
D (4120) module_nvs: Getting NVS for ssid = Mishafarms
D (4120) nvs: nvs_get_str_or_blob password
D (4130) nvs: nvs_get_str_or_blob password
D (4130) module_nvs: Getting NVS for password = deadbeef01
D (4140) nvs: nvs_get_str_or_blob ip
D (4140) nvs: nvs_get_str_or_blob ip
D (4140) module_nvs: Getting NVS for ip =
D (4150) nvs: nvs_get_str_or_blob gw
D (4150) nvs: nvs_get_str_or_blob gw
D (4150) module_nvs: Getting NVS for gw =
D (4160) nvs: nvs_get_str_or_blob netmask
D (4160) nvs: nvs_get_str_or_blob netmask
D (4160) module_nvs: Getting NVS for netmask =
D (4170) nvs: nvs_close 7
D (4170) log: Going to try and connect to AP named "Mishafarms"
D (4180) log: Network info is: ip=, gw=, netmask=
D (4180) log: ESP32 Heap: 52452
D (4190) module_wifi: >> js_wifi_connect
D (4190) module_wifi: Calling esp_wifi_set_mode()
D (6190) module_wifi: - Connecting to access point: "Mishafarms" with ""
D (6190) module_wifi: Calling esp_wifi_set_config()
D (8190) module_wifi: Calling esp_wifi_start()
I (8190) wifi: mode : sta (24:0a:c4:04:5c:5c)
D (8190) event: SYSTEM_EVENT_STA_START
V (8190) event: enter default callback
V (8190) event: exit default callback
D (8190) module_wifi: >> esp32_wifi_eventHandler
D (8200) module_wifi: << esp32_wifi_eventHandler
D (10190) module_wifi: Performing a connect
D (10190) module_wifi: Calling esp_wifi_connect()
D (10190) module_wifi: << js_wifi_connect
D (10190) log: ESP32 Heap: 50680
D (10190) dukf_utils: << dukf_runFile: start.js
D (10190) duktape_task: Free heap at start of JavaScript main loop: 51160
D (10200) log: Console:


| |/ | __ _ _
| |
| (
| |) |) | ) |
| | _ | /| < / /
| |
___ ) | | ) / /
|
|/|| |/|
| __ \ | | | |
| | | |
| | | | __ _ _ __ ___
| | | | | | | |/ / / ` | ' \ / _
| |
| | |
| | <| || (
| | |_) | /
|
/ _,|_|_\
_,| ./ _|
| |
|_|
http://duktape.org
ESP32 port/framework: Neil Kolban
Build: Jan 20 2017 15:05:37

D (10250) duktape_task: Starting main loop!
I (11660) wifi: n:10 0, o:1 0, ap:255 255, sta:10 0, prof:1
I (12320) wifi: state: init -> auth (b0)
I (12320) wifi: state: auth -> assoc (0)
I (12320) wifi: state: assoc -> run (10)
I (12350) wifi: connected with Mishafarms, channel 10
D (12350) event: SYSTEM_EVENT_STA_CONNECTED, ssid:Mishafarms, ssid_len:10, bssid:a0:63:91:22:a5:74, channel:10, authmode:3
V (12350) event: enter default callback
V (12360) event: exit default callback
D (12360) module_wifi: >> esp32_wifi_eventHandler
D (12370) module_wifi: << esp32_wifi_eventHandler
D (16070) event: SYSTEM_EVENT_STA_GOTIP, ip:192.168.252.150, mask:255.255.255.192, gw:192.168.252.129
V (16070) event: enter default callback
I (16070) event: ip: 192.168.252.150, mask: 255.255.255.192, gw: 192.168.252.129
V (16070) event: exit default callback
D (16080) module_wifi: >> esp32_wifi_eventHandler
D (16080) duktape_event: >> event_newCallbackRequestedEvent stashKey=1
D (16090) duktape_event: << event_newCallbackRequestedEvent
D (16090) module_wifi: << esp32_wifi_eventHandler
V (16100) duktape_task: >> processEvent: eventType=ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED
D (16110) duktape_task: Process a callback requested event: callbackType=1, stashKey=1
D (16110) duktape_task: ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED: #params: 0
D (16120) log: Now connected as a station! - err: null
D (16130) log: Onwards ... we are now network connected!
D (16130) log: start.js: bootwifi callback arrived ... starting ide
D (16140) log: Module: require("ide_webserver.js") loading "ide_webserver.js"
D (16140) dukf_utils: >> dukf_loadFile: (ESPFS) ide_webserver.js, heapSize=52968
D (16150) espfs: >> espFsOpen: ide_webserver.js
D (16160) dukf_utils: << duk_loadFile: Read file ide_webserver.js for size 5771
D (16430) log: Module: require("http") loading "http"
D (16430) dukf_utils: >> dukf_loadFile: (ESPFS) http.js, heapSize=43664
D (16430) espfs: >> espFsOpen: http.js
D (16430) dukf_utils: << duk_loadFile: Read file http.js for size 8449
D (16750) log: Module: require("url") loading "url"
D (16750) dukf_utils: >> dukf_loadFile: (ESPFS) url.js, heapSize=37036
D (16750) espfs: >> espFsOpen: url.js
D (16750) dukf_utils: << duk_loadFile: Read file url.js for size 2430
D (16860) log: Module: require("fs") loading "fs"
D (16870) dukf_utils: >> dukf_loadFile: (ESPFS) fs.js, heapSize=34812
D (16870) espfs: >> espFsOpen: fs.js
D (16870) dukf_utils: << duk_loadFile: Read file fs.js for size 847
D (16920) modules: >> js_esp32_getNativeFunction
D (16920) modules: - nativeFunctionId that we are looking for is "ModuleFS"
D (16920) modules: << js_esp32_getNativeFunction
D (16930) log: About to start ide_webserver()
D (16930) module_os: >> js_os_socket
D (16930) module_os: New socket fd=0
D (16940) module_os: << js_os_socket
D (16950) module_os: >> js_os_bind
D (16950) module_os: About to call bind on fd=0 with port=8000
D (16950) module_os: << js_os_bind
D (16950) module_os: >> js_os_listen
D (16950) module_os: About to call listen on fd=0
D (16960) module_os: << js_os_listen
D (16960) log: IDE_WebServer listening on port 8000
D (16970) dukf_utils: #C: heapSize=29028
D (16970) log: ESP32 Heap: 28964
V (16970) duktape_task: << processEvent
I (22320) wifi: pm start, type:0

D (70430) log: selectResult: {"readfds":[0],"writefds":[],"exceptfds":[]}
D (70430) log: loop: working on ready to read of fd=0
D (70440) module_os: >> js_os_accept
D (70440) module_os: About to call accept on 0
D (70440) module_os: << js_os_accept: new socketfd=1
D (70450) log: We accepted a new client connection: {"sockfd":1}
D (70460) log: IDE_WebServer: We have received a new HTTP client request!
D (70470) dukf_utils: requestHandler: heapSize=29388
D (70490) log: selectResult: {"readfds":[0,1],"writefds":[],"exceptfds":[]}
D (70490) log: loop: working on ready to read of fd=0
D (70490) module_os: >> js_os_accept
D (70500) module_os: About to call accept on 0
D (70500) module_os: << js_os_accept: new socketfd=2
D (70510) log: We accepted a new client connection: {"sockfd":2}
D (70520) log: IDE_WebServer: We have received a new HTTP client request!
D (70520) dukf_utils: requestHandler: heapSize=18680
D (70540) log: loop: working on ready to read of fd=1
D (70550) module_os: >> js_os_recv
D (70550) module_os: -- js_os_recv: About to receive on fd=1 for a buffer of size 512
D (70550) module_os: << js_os_recv: length=363
D (70550) log: Length of data from recv: 363
D (70560) log: http parsing: GET /web/ide.html HTTP/1.1
D (70560) log: http Method: GET, path: /web/ide.html
D (70570) log: http parsing: Host: 192.168.252.150:8000
D (70570) log: http parsing: User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
D (70580) log: http parsing: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
D (70590) log: http parsing: Accept-Language: en-US,en;q=0.5
D (70600) log: http parsing: Accept-Encoding: gzip, deflate
D (70600) log: http parsing: Connection: keep-alive
D (70610) log: http parsing: Upgrade-Insecure-Requests: 1
D (70610) log: http parsing: Cache-Control: max-age=0
D (70620) log: http parsing:
D (70620) log: End of headers
{"Host":"192.168.252.150:8000","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Connection":"keep-alive","Upgrade-Insecure-Requests":"1","Cache-Control":"max-age=0"}
D (70650) log: HTTP Request on(end):
D (70650) log: - method: GET
D (70660) log: - path: /web/ide.html
D (70660) log: - headers: {"Host":"192.168.252.150:8000","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Connection":"keep-alive","Upgrade-Insecure-Requests":"1","Cache-Control":"max-age=0"}
D (70690) dukf_utils: ide_webserver: request.on(end): heapSize=10716
D (70700) log: #A
D (70700) log: File to read: /spiffs/web/ide.html
D (70710) module_fs: >> js_fs_statSync: /spiffs/web/ide.html
D (70710) duktape_spiffs: >> stat path=/web/ide.html
D (70730) module_fs: << js_fs_statSync: /spiffs/web/ide.html - size: 6018
D (70730) log: Loading file: /spiffs/web/ide.html
D (70730) module_os: >> js_os_send
D (70730) module_os: About to send 17 bytes of data to sockfd=1
D (70740) module_os: - data: "HTTP/1.1 200 OK
"
D (70740) module_os: << js_os_send
D (70740) module_os: >> js_os_send
D (70750) module_os: About to send 2 bytes of data to sockfd=1
D (70750) module_os: - data: "
"
D (70760) module_os: << js_os_send
D (70760) log: FS.openSync1
D (70760) module_fs: >> js_fs_openSync
D (70760) module_fs: - Path to open is "/spiffs/web/ide.html" and flags are "r"
D (70770) duktape_spiffs: >> open path=/web/ide.html, flags=0x0, accessMode=0x1b4
D (70780) duktape_spiffs: flags:
D (70780) duktape_spiffs: - O_RDONLY
D (70780) module_fs: << js_fs_openSync fd: 4097
D (70790) log: FS.openSync2
D (70790) module_fs: >> js_fs_readSync
D (70800) module_fs: Buffer pointer size returned as 128
D (70800) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (70810) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (70810) module_fs: << js_fs_readSync: sizeRead: 128
D (70820) log: Size read: 128
D (70820) module_os: >> js_os_send
D (70820) module_os: About to send 128 bytes of data to sockfd=1
D (70830) module_os: - data: "

<title>ESP32 - " D (70900) module_os: << js_os_send D (70900) module_fs: >> js_fs_readSync D (70900) module_fs: Buffer pointer size returned as 128 D (70910) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (70910) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (70920) module_fs: << js_fs_readSync: sizeRead: 128 D (70920) log: Size read: 128 D (70930) module_os: >> js_os_send D (70930) module_os: About to send 128 bytes of data to sockfd=1 D (70930) module_os: - data: "Duktape</title> <style> #editor { width: 100%; height: 95%; border-style: solid; border-width: 1px; border-color: black; } " D (70950) module_os: << js_os_send D (70950) module_fs: >> js_fs_readSync D (70950) module_fs: Buffer pointer size returned as 128 D (70960) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (70970) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (70970) module_fs: << js_fs_readSync: sizeRead: 128 D (70980) log: Size read: 128 D (70980) module_os: >> js_os_send D (70980) module_os: About to send 128 bytes of data to sockfd=1 D (70990) module_os: - data: ".console { font-family: monospace; margin-top: 4px; width: 100%; resize: none; }

.eval {
font-family: monospace;
resize: "
D (71000) module_os: << js_os_send
D (71010) module_fs: >> js_fs_readSync
D (71010) module_fs: Buffer pointer size returned as 128
D (71010) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71020) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71020) module_fs: << js_fs_readSync: sizeRead: 128
D (71030) log: Size read: 128
D (71030) module_os: >> js_os_send
D (71030) module_os: About to send 128 bytes of data to sockfd=1
D (71040) module_os: - data: "none;
flex-grow: 1;
margin-right: 5px;
padding: 4px;
}

.saveText {
resize: none;
flex-grow: 1;
}

.bottomBar {
margin-bot"
D (71060) module_os: << js_os_send
D (71060) module_fs: >> js_fs_readSync
D (71060) module_fs: Buffer pointer size returned as 128
D (71070) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71070) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71080) module_fs: << js_fs_readSync: sizeRead: 128
D (71080) log: Size read: 128
D (71090) module_os: >> js_os_send
D (71090) module_os: About to send 128 bytes of data to sockfd=1
D (71090) module_os: - data: "tom: 4px;
margin-top: 4px;
margin-left:2px;
margin-right: 2px;
background-color: #303030;
padding: 8px;
border-radius: 10p"
D (71110) module_os: << js_os_send
D (71110) module_fs: >> js_fs_readSync
D (71110) module_fs: Buffer pointer size returned as 128
D (71120) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71130) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71130) module_fs: << js_fs_readSync: sizeRead: 128
D (71140) log: Size read: 128
D (71140) module_os: >> js_os_send
D (71140) module_os: About to send 128 bytes of data to sockfd=1
D (71150) module_os: - data: "x;
}

body {
margin: 0px;
}

html {
height: 100%;
}
</style>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>

<lin"
D (71220) module_os: << js_os_send
D (71220) module_fs: >> js_fs_readSync
D (71220) module_fs: Buffer pointer size returned as 128
D (71230) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71230) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71240) module_fs: << js_fs_readSync: sizeRead: 128
D (71240) log: Size read: 128
D (71250) module_os: >> js_os_send
D (71250) module_os: About to send 128 bytes of data to sockfd=1
D (71250) module_os: - data: "k rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.min.css">

<script sr" D (71270) module_os: << js_os_send D (71270) module_fs: >> js_fs_readSync D (71270) module_fs: Buffer pointer size returned as 128 D (71280) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71290) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71290) module_fs: << js_fs_readSync: sizeRead: 128 D (71300) log: Size read: 128 D (71300) module_os: >> js_os_send D (71300) module_os: About to send 128 bytes of data to sockfd=1 D (71310) module_os: - data: "c="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> > js_fs_readSync D (71330) module_fs: Buffer pointer size returned as 128 D (71330) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71340) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71340) module_fs: << js_fs_readSync: sizeRead: 128 D (71350) log: Size read: 128 D (71350) module_os: >> js_os_send D (71350) module_os: About to send 128 bytes of data to sockfd=1 D (71360) module_os: - data: ".cloudflare.com/ajax/libs/jquery-layout/1.4.3/layout-default.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquer" D (71370) module_os: << js_os_send D (71380) module_fs: >> js_fs_readSync D (71380) module_fs: Buffer pointer size returned as 128 D (71380) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71390) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71400) module_fs: << js_fs_readSync: sizeRead: 128 D (71400) log: Size read: 128 D (71410) module_os: >> js_os_send D (71410) module_os: About to send 128 bytes of data to sockfd=1 D (71410) module_os: - data: "y-layout/1.4.3/jquery.layout.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.5/ace.js" type="text/" D (71430) module_os: << js_os_send D (71430) module_fs: >> js_fs_readSync D (71430) module_fs: Buffer pointer size returned as 128 D (71440) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71440) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71450) module_fs: << js_fs_readSync: sizeRead: 128 D (71450) log: Size read: 128 D (71460) module_os: >> js_os_send D (71460) module_os: About to send 128 bytes of data to sockfd=1 D (71460) module_os: - data: "javascript" charset="utf-8"></script> <script src="ide.js"></script>
> js_fs_readSync D (71490) module_fs: Buffer pointer size returned as 128 D (71490) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71500) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71500) module_fs: << js_fs_readSync: sizeRead: 128 D (71510) log: Size read: 128 D (71510) module_os: >> js_os_send D (71510) module_os: About to send 128 bytes of data to sockfd=1 D (71520) module_os: - data: ":flex; flex-direction: column; height: 100%;">
" D (71530) module_os: << js_os_send D (71540) module_fs: >> js_fs_readSync D (71540) module_fs: Buffer pointer size returned as 128 D (71540) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71550) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71550) module_fs: << js_fs_readSync: sizeRead: 128 D (71560) log: Size read: 128 D (71560) module_os: >> js_os_send D (71570) module_os: About to send 128 bytes of data to sockfd=1 D (71570) module_os: - data: "ESP32-Duktape Info
> js_fs_readSync D (71590) module_fs: Buffer pointer size returned as 128 D (71600) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71600) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71610) module_fs: << js_fs_readSync: sizeRead: 128 D (71610) log: Size read: 128 D (71620) module_os: >> js_os_send D (71620) module_os: About to send 128 bytes of data to sockfd=1 D (71620) module_os: - data: "w: 1;">
console.log("Hello World\n");
> js_fs_readSync D (71640) module_fs: Buffer pointer size returned as 128 D (71650) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71660) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71660) module_fs: << js_fs_readSync: sizeRead: 128 D (71670) log: Size read: 128 D (71670) module_os: >> js_os_send D (71670) module_os: About to send 128 bytes of data to sockfd=1 D (71680) module_os: - data: "t-south">
> js_fs_readSync D (71700) module_fs: Buffer pointer size returned as 128 D (71700) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71710) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71710) module_fs: << js_fs_readSync: sizeRead: 128 D (71720) log: Size read: 128 D (71720) module_os: >> js_os_send D (71720) module_os: About to send 128 bytes of data to sockfd=1 D (71730) module_os: - data: "x-end;"> Console: Enabled: > js_fs_readSync D (71750) module_fs: Buffer pointer size returned as 128 D (71760) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (71760) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (71770) module_fs: << js_fs_readSync: sizeRead: 128 D (71770) log: Size read: 128 D (71780) module_os: >> js_os_send D (71780) module_os: About to send 128 bytes of data to sockfd=1 D (71780) module_os: - data: "heckbox" id="consoleCheckbox" title="Enable/Disable console stream">
                            <textarea readonly disabled id="console" cl"

D (71800) module_os: << js_os_send
D (71800) module_fs: >> js_fs_readSync
D (71800) module_fs: Buffer pointer size returned as 128
D (71810) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71810) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71820) module_fs: << js_fs_readSync: sizeRead: 128
D (71820) log: Size read: 128
D (71830) module_os: >> js_os_send
D (71830) module_os: About to send 128 bytes of data to sockfd=1
D (71840) module_os: - data: "ass="console" style="flex-grow:1;"></textarea>


<spa"
D (71850) module_os: << js_os_send
D (71850) module_fs: >> js_fs_readSync
D (71860) module_fs: Buffer pointer size returned as 128
D (71860) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71870) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71870) module_fs: << js_fs_readSync: sizeRead: 128
D (71880) log: Size read: 128
D (71880) module_os: >> js_os_send
D (71880) module_os: About to send 128 bytes of data to sockfd=1
D (71890) module_os: - data: "n>Eval:ย 

Run"
D (71900) module_os: << js_os_send
D (71910) module_fs: >> js_fs_readSync
D (71910) module_fs: Buffer pointer size returned as 128
D (71910) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71920) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71930) module_fs: << js_fs_readSync: sizeRead: 128
D (71930) log: Size read: 128
D (71930) module_os: >> js_os_send
D (71940) module_os: About to send 128 bytes of data to sockfd=1
D (71940) module_os: - data: "

                    </div>

            </div>
    </div>

    <div class="bottomBar">
            <button id="run" title="Run the script in the editor">Run</"

D (71960) module_os: << js_os_send
D (71960) module_fs: >> js_fs_readSync
D (71960) module_fs: Buffer pointer size returned as 128
D (71970) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (71970) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (71980) module_fs: << js_fs_readSync: sizeRead: 128
D (71980) log: Size read: 128
D (71990) module_os: >> js_os_send
D (71990) module_os: About to send 128 bytes of data to sockfd=1
D (71990) module_os: - data: "button>
Clear
<button id="settings" title="Open the settings di"
D (72010) module_os: << js_os_send
D (72010) module_fs: >> js_fs_readSync
D (72020) module_fs: Buffer pointer size returned as 128
D (72020) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (72030) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (72030) module_fs: << js_fs_readSync: sizeRead: 128
D (72040) log: Size read: 128
D (72040) module_os: >> js_os_send
D (72040) module_os: About to send 128 bytes of data to sockfd=1
D (72050) module_os: - data: "alog">Settings
Save
"
D (72060) module_os: << js_os_send
D (72070) module_fs: >> js_fs_readSync
D (72070) module_fs: Buffer pointer size returned as 128
D (72070) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (72080) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (72080) module_fs: << js_fs_readSync: sizeRead: 128
D (72090) log: Size read: 128
D (72090) module_os: >> js_os_send
D (72100) module_os: About to send 128 bytes of data to sockfd=1
D (72100) module_os: - data: "Load

Select a file for loa" D (72120) module_os: << js_os_send D (72120) module_fs: >> js_fs_readSync D (72120) module_fs: Buffer pointer size returned as 128 D (72130) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72130) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72140) module_fs: << js_fs_readSync: sizeRead: 128 D (72140) log: Size read: 128 D (72150) module_os: >> js_os_send D (72150) module_os: About to send 128 bytes of data to sockfd=1 D (72150) module_os: - data: "ding or execution:

> js_fs_readSync D (72230) module_fs: Buffer pointer size returned as 128 D (72230) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72240) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72240) module_fs: << js_fs_readSync: sizeRead: 128 D (72250) log: Size read: 128 D (72250) module_os: >> js_os_send D (72250) module_os: About to send 128 bytes of data to sockfd=1 D (72260) module_os: - data: "p: 10px; display: flex; align-items: center;"> Filename:ย  > js_fs_readSync D (72280) module_fs: Buffer pointer size returned as 128 D (72290) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72290) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72300) module_fs: << js_fs_readSync: sizeRead: 128 D (72300) log: Size read: 128 D (72310) module_os: >> js_os_send D (72310) module_os: About to send 128 bytes of data to sockfd=1 D (72310) module_os: - data: "" class="saveText">
    <t"

D (72330) module_os: << js_os_send
D (72330) module_fs: >> js_fs_readSync
D (72330) module_fs: Buffer pointer size returned as 128
D (72340) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (72350) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (72350) module_fs: << js_fs_readSync: sizeRead: 128
D (72360) log: Size read: 128
D (72360) module_os: >> js_os_send
D (72360) module_os: About to send 128 bytes of data to sockfd=1
D (72370) module_os: - data: "able>

ESP32 Connection details:


Host:
<input id="settingsHost" "
D (72380) module_os: << js_os_send
D (72390) module_fs: >> js_fs_readSync
D (72390) module_fs: Buffer pointer size returned as 128
D (72390) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (72400) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (72400) module_fs: << js_fs_readSync: sizeRead: 128
D (72410) log: Size read: 128
D (72410) module_os: >> js_os_send
D (72410) module_os: About to send 128 bytes of data to sockfd=1
D (72420) module_os: - data: "type="text" placeholder="host">


Appearance:


Font size:
"
D (72440) module_os: << js_os_send
D (72440) module_fs: >> js_fs_readSync
D (72440) module_fs: Buffer pointer size returned as 128
D (72450) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128
D (72450) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (72460) module_fs: << js_fs_readSync: sizeRead: 128
D (72460) log: Size read: 128
D (72470) module_os: >> js_os_send
D (72470) module_os: About to send 128 bytes of data to sockfd=1
D (72470) module_os: - data: "


Theme:
" D (72490) module_os: << js_os_send D (72490) module_fs: >> js_fs_readSync D (72490) module_fs: Buffer pointer size returned as 128 D (72500) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72510) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72510) module_fs: << js_fs_readSync: sizeRead: 128 D (72520) log: Size read: 128 D (72520) module_os: >> js_os_send D (72520) module_os: About to send 128 bytes of data to sockfd=1 D (72530) module_os: - data: " Ambiance Chaos Chrome " D (72540) module_os: << js_os_send D (72540) module_fs: >> js_fs_readSync D (72550) module_fs: Buffer pointer size returned as 128 D (72550) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72560) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72560) module_fs: << js_fs_readSync: sizeRead: 128 D (72570) log: Size read: 128 D (72570) module_os: >> js_os_send D (72570) module_os: About to send 128 bytes of data to sockfd=1 D (72580) module_os: - data: " Clouds Clouds Midnight Co" D (72590) module_os: << js_os_send D (72600) module_fs: >> js_fs_readSync D (72600) module_fs: Buffer pointer size returned as 128 D (72610) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72610) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72620) module_fs: << js_fs_readSync: sizeRead: 128 D (72620) log: Size read: 128 D (72630) module_os: >> js_os_send D (72630) module_os: About to send 128 bytes of data to sockfd=1 D (72630) module_os: - data: "balt Crimson Editor Dawn <option value" D (72650) module_os: << js_os_send D (72650) module_fs: >> js_fs_readSync D (72650) module_fs: Buffer pointer size returned as 128 D (72660) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72660) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72670) module_fs: << js_fs_readSync: sizeRead: 128 D (72670) log: Size read: 128 D (72680) module_os: >> js_os_send D (72680) module_os: About to send 128 bytes of data to sockfd=1 D (72690) module_os: - data: "="dreamweaver">Dreamweaver Eclipse Github <" D (72700) module_os: << js_os_send D (72700) module_fs: >> js_fs_readSync D (72710) module_fs: Buffer pointer size returned as 128 D (72710) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72720) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72720) module_fs: << js_fs_readSync: sizeRead: 128 D (72730) log: Size read: 128 D (72730) module_os: >> js_os_send D (72730) module_os: About to send 128 bytes of data to sockfd=1 D (72740) module_os: - data: "option value="idle_fingers">Idle Fingers Iplastic <option value="katzenmilc" D (72750) module_os: << js_os_send D (72760) module_fs: >> js_fs_readSync D (72760) module_fs: Buffer pointer size returned as 128 D (72760) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72770) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72770) module_fs: << js_fs_readSync: sizeRead: 128 D (72780) log: Size read: 128 D (72780) module_os: >> js_os_send D (72790) module_os: About to send 128 bytes of data to sockfd=1 D (72790) module_os: - data: "h">Katzenmilch KR Theme Kurior <option " D (72810) module_os: << js_os_send D (72810) module_fs: >> js_fs_readSync D (72810) module_fs: Buffer pointer size returned as 128 D (72820) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72820) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72830) module_fs: << js_fs_readSync: sizeRead: 128 D (72830) log: Size read: 128 D (72840) module_os: >> js_os_send D (72840) module_os: About to send 128 bytes of data to sockfd=1 D (72840) module_os: - data: "value="merbivore">Merbivore Merbivore Soft <option value="mono_industri" D (72860) module_os: << js_os_send D (72860) module_fs: >> js_fs_readSync D (72860) module_fs: Buffer pointer size returned as 128 D (72870) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72880) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72880) module_fs: << js_fs_readSync: sizeRead: 128 D (72890) log: Size read: 128 D (72890) module_os: >> js_os_send D (72890) module_os: About to send 128 bytes of data to sockfd=1 D (72900) module_os: - data: "al">Mono Industrial Monokai Pastel On Dark</opt" D (72910) module_os: << js_os_send D (72910) module_fs: >> js_fs_readSync D (72920) module_fs: Buffer pointer size returned as 128 D (72920) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72930) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72930) module_fs: << js_fs_readSync: sizeRead: 128 D (72940) log: Size read: 128 D (72940) module_os: >> js_os_send D (72940) module_os: About to send 128 bytes of data to sockfd=1 D (72950) module_os: - data: "ion> Solarized Dark Solarized Light " D (72960) module_os: << js_os_send D (72970) module_fs: >> js_fs_readSync D (72970) module_fs: Buffer pointer size returned as 128 D (72980) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (72980) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (72990) module_fs: << js_fs_readSync: sizeRead: 128 D (72990) log: Size read: 128 D (73000) module_os: >> js_os_send D (73000) module_os: About to send 128 bytes of data to sockfd=1 D (73000) module_os: - data: " Github Sqlserver</optio" D (73020) module_os: << js_os_send D (73020) module_fs: >> js_fs_readSync D (73020) module_fs: Buffer pointer size returned as 128 D (73030) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73030) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (73040) module_fs: << js_fs_readSync: sizeRead: 128 D (73040) log: Size read: 128 D (73050) module_os: >> js_os_send D (73050) module_os: About to send 128 bytes of data to sockfd=1 D (73060) module_os: - data: "n> Terminal Textmate T" D (73070) module_os: << js_os_send D (73070) module_fs: >> js_fs_readSync D (73080) module_fs: Buffer pointer size returned as 128 D (73080) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73090) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (73090) module_fs: << js_fs_readSync: sizeRead: 128 D (73100) log: Size read: 128 D (73100) module_os: >> js_os_send D (73100) module_os: About to send 128 bytes of data to sockfd=1 D (73110) module_os: - data: "omorrow Tomorrow Night Tomorrow Nig" D (73120) module_os: << js_os_send D (73130) module_fs: >> js_fs_readSync D (73130) module_fs: Buffer pointer size returned as 128 D (73130) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73140) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (73140) module_fs: << js_fs_readSync: sizeRead: 128 D (73150) log: Size read: 128 D (73150) module_os: >> js_os_send D (73160) module_os: About to send 128 bytes of data to sockfd=1 D (73160) module_os: - data: "ht Blue Tomorrow Night Bright <option value="tomorrow_night_eigh" D (73180) module_os: << js_os_send D (73180) module_fs: >> js_fs_readSync D (73180) module_fs: Buffer pointer size returned as 128 D (73190) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73190) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (73200) module_fs: << js_fs_readSync: sizeRead: 128 D (73200) log: Size read: 128 D (73210) module_os: >> js_os_send D (73210) module_os: About to send 128 bytes of data to sockfd=1 D (73210) module_os: - data: "ties">Tomorrow Night Eighties Twilight Vibrant In" D (73230) module_os: << js_os_send D (73230) module_fs: >> js_fs_readSync D (73230) module_fs: Buffer pointer size returned as 128 D (73240) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73250) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (73250) module_fs: << js_fs_readSync: sizeRead: 128 D (73260) log: Size read: 128 D (73260) module_os: >> js_os_send D (73260) module_os: About to send 128 bytes of data to sockfd=1 D (73270) module_os: - data: "k Xcode

> js_fs_readSync D (73290) module_fs: Buffer pointer size returned as 128 D (73290) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73300) duktape_spiffs: vfs_read(SPIFFS): We read 2 D (73300) module_fs: << js_fs_readSync: sizeRead: 2 D (73310) log: Size read: 2 D (73310) module_os: >> js_os_send D (73310) module_os: About to send 2 bytes of data to sockfd=1 D (73320) module_os: - data: "l>" D (73320) module_os: << js_os_send D (73330) module_fs: >> js_fs_readSync D (73330) module_fs: Buffer pointer size returned as 128 D (73330) duktape_spiffs: >> read fd=1, dst=0x3fffecbc, size=128 D (73340) duktape_spiffs: vfs_read(SPIFFS): We read -10003 SPIFFS_ERR_END_OF_OBJECT D (73350) module_fs: js_fs_readSync: read() error: 0 Success D (73350) module_fs: << js_fs_readSync: sizeRead: 0 D (73360) log: Size read: 0 D (73360) duktape_spiffs: >> close fd=1 D (73360) module_os: >> js_os_shutdown D (73370) module_os: About to shutdown fd=1 D (73370) module_os: << js_os_shutdown D (73380) module_os: >> js_os_close D (73380) module_os: About to close fd=1 D (73380) module_os: << js_os_close D (73400) log: selectResult: {"readfds":[2],"writefds":[],"exceptfds":[]} D (73400) log: loop: working on ready to read of fd=2 D (73400) module_os: >> js_os_recv D (73410) module_os: -- js_os_recv: About to receive on fd=2 for a buffer of size 512 D (73410) module_os: << js_os_recv: length=322 D (73420) log: Length of data from recv: 322 D (73430) log: http parsing: GET /web/ide.js HTTP/1.1 D (73430) log: http Method: GET, path: /web/ide.js D (73430) log: http parsing: Host: 192.168.252.150:8000 D (73440) log: http parsing: User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0 D (73450) log: http parsing: Accept: */* D (73450) log: http parsing: Accept-Language: en-US,en;q=0.5 D (73460) log: http parsing: Accept-Encoding: gzip, deflate D (73460) log: http parsing: Referer: http://192.168.252.150:8000/web/ide.html D (73470) log: http parsing: Connection: keep-alive D (73470) log: http parsing: Cache-Control: max-age=0 D (73480) log: http parsing: D (73480) log: End of headers {"Host":"192.168.252.150:8000","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0","Accept":"*/*","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Referer":"http://192.168.252.150:8000/web/ide.html","Connection":"keep-alive","Cache-Control":"max-age=0"} D (73510) log: HTTP Request on(end): D (73510) log: - method: GET D (73520) log: - path: /web/ide.js D (73520) log: - headers: {"Host":"192.168.252.150:8000","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0","Accept":"*/*","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Referer":"http://192.168.252.150:8000/web/ide.html","Connection":"keep-alive","Cache-Control":"max-age=0"} D (73550) dukf_utils: ide_webserver: request.on(end): heapSize=10672 D (73560) log: #A D (73560) log: File to read: /spiffs/web/ide.js D (73560) module_fs: >> js_fs_statSync: /spiffs/web/ide.js D (73570) duktape_spiffs: >> stat path=/web/ide.js D (73570) module_fs: << js_fs_statSync: /spiffs/web/ide.js - size: 9354 D (73580) log: Loading file: /spiffs/web/ide.js D (73580) module_os: >> js_os_send D (73580) module_os: About to send 17 bytes of data to sockfd=2 D (73590) module_os: - data: "HTTP/1.1 200 OK " D (73590) module_os: << js_os_send D (73600) module_os: >> js_os_send D (73600) module_os: About to send 2 bytes of data to sockfd=2 D (73610) module_os: - data: " " D (73610) module_os: << js_os_send D (73610) log: FS.openSync1 D (73610) module_fs: >> js_fs_openSync D (73620) module_fs: - Path to open is "/spiffs/web/ide.js" and flags are "r" D (73620) duktape_spiffs: >> open path=/web/ide.js, flags=0x0, accessMode=0x1b4 D (73630) duktape_spiffs: flags: D (73630) duktape_spiffs: - O_RDONLY D (73640) module_fs: << js_fs_openSync fd: 4098 D (73640) log: FS.openSync2 D (73650) module_fs: >> js_fs_readSync D (73650) module_fs: Buffer pointer size returned as 128 D (73650) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (73660) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (73660) module_fs: << js_fs_readSync: sizeRead: 128 D (73670) log: Size read: 128 D (73670) module_os: >> js_os_send D (73670) module_os: About to send 128 bytes of data to sockfd=2 D (73680) module_os: - data: "/** * This is the IDE for ESP32-Duktape */ $(document).ready(function() { var consoleWS = null; var settings;
    if (localSt"

D (73700) module_os: << js_os_send
D (73700) module_fs: >> js_fs_readSync
D (73700) module_fs: Buffer pointer size returned as 128
D (73710) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (73710) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (73720) module_fs: << js_fs_readSync: sizeRead: 128
D (73720) log: Size read: 128
D (73730) module_os: >> js_os_send
D (73730) module_os: About to send 128 bytes of data to sockfd=2
D (73730) module_os: - data: "orage.settings) {
settings = JSON.parse(localStorage.settings);
} else {
var settings = {
esp32_host: location.host,
"
D (73750) module_os: << js_os_send
D (73750) module_fs: >> js_fs_readSync
D (73750) module_fs: Buffer pointer size returned as 128
D (73760) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (73770) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (73770) module_fs: << js_fs_readSync: sizeRead: 128
D (73780) log: Size read: 128
D (73780) module_os: >> js_os_send
D (73780) module_os: About to send 128 bytes of data to sockfd=2
D (73790) module_os: - data: "theme: "eclipse"
}
}

    /*
     * Determine if the enable console checkbox is checked and, if yes then return true.
     */
    funct"

D (73800) module_os: << js_os_send
D (73800) module_fs: >> js_fs_readSync
D (73810) module_fs: Buffer pointer size returned as 128
D (73810) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (73820) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (73820) module_fs: << js_fs_readSync: sizeRead: 128
D (73830) log: Size read: 128
D (73830) module_os: >> js_os_send
D (73830) module_os: About to send 128 bytes of data to sockfd=2
D (73840) module_os: - data: "ion isConsoleEnabled() {
ret = $("#consoleCheckbox").prop("checked");
//console.log("Console enabled: " + ret);
return ret"
D (73860) module_os: << js_os_send
D (73860) module_fs: >> js_fs_readSync
D (73860) module_fs: Buffer pointer size returned as 128
D (73870) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (73870) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (73880) module_fs: << js_fs_readSync: sizeRead: 128
D (73880) log: Size read: 128
D (73890) module_os: >> js_os_send
D (73890) module_os: About to send 128 bytes of data to sockfd=2
D (73890) module_os: - data: ";
}

    /**
     * Run a script on the ESP32 Duktape environment by sending in a POST request
     * with the body of the message bein"

D (73910) module_os: << js_os_send
D (73910) module_fs: >> js_fs_readSync
D (73910) module_fs: Buffer pointer size returned as 128
D (73920) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (73920) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (73930) module_fs: << js_fs_readSync: sizeRead: 128
D (73940) log: Size read: 128
D (73940) module_os: >> js_os_send
D (73940) module_os: About to send 128 bytes of data to sockfd=2
D (73950) module_os: - data: "g the script to execute.
*
* @param script A string representation of the script to run.
* @returns N/A
*/
function ru"
D (73960) module_os: << js_os_send
D (73960) module_fs: >> js_fs_readSync
D (73970) module_fs: Buffer pointer size returned as 128
D (73970) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (73980) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (73980) module_fs: << js_fs_readSync: sizeRead: 128
D (73990) log: Size read: 128
D (73990) module_os: >> js_os_send
D (73990) module_os: About to send 128 bytes of data to sockfd=2
D (74000) module_os: - data: "nScript(script) {
$.ajax({
url: "http://" + settings.esp32_host + "/run",
contentType: "application/javascript",
meth"
D (74010) module_os: << js_os_send
D (74020) module_fs: >> js_fs_readSync
D (74020) module_fs: Buffer pointer size returned as 128
D (74020) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74030) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74040) module_fs: << js_fs_readSync: sizeRead: 128
D (74040) log: Size read: 128
D (74050) module_os: >> js_os_send
D (74050) module_os: About to send 128 bytes of data to sockfd=2
D (74050) module_os: - data: "od: "POST",
data: script,
success: function() {
console.log("Code sent for execution.");
}
}); // .ajax
} // run"
D (74070) module_os: << js_os_send
D (74070) module_fs: >> js_fs_readSync
D (74070) module_fs: Buffer pointer size returned as 128
D (74080) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74080) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74090) module_fs: << js_fs_readSync: sizeRead: 128
D (74090) log: Size read: 128
D (74100) module_os: >> js_os_send
D (74100) module_os: About to send 128 bytes of data to sockfd=2
D (74110) module_os: - data: "Script

    /**
     * Connect to the ESP32 for the console websocket.
     * @param onOpen A callback function to be invoked when the"

D (74120) module_os: << js_os_send
D (74120) module_fs: >> js_fs_readSync
D (74130) module_fs: Buffer pointer size returned as 128
D (74130) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74140) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74140) module_fs: << js_fs_readSync: sizeRead: 128
D (74150) log: Size read: 128
D (74150) module_os: >> js_os_send
D (74150) module_os: About to send 128 bytes of data to sockfd=2
D (74160) module_os: - data: " socket has been established.
* @returns N/A
/
function createConsoleWebSocket(onOpen) {
consoleWS = new WebSocket("ws:/"
D (74170) module_os: << js_os_send
D (74180) module_fs: >> js_fs_readSync
D (74180) module_fs: Buffer pointer size returned as 128
D (74180) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74190) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74190) module_fs: << js_fs_readSync: sizeRead: 128
D (74200) log: Size read: 128
D (74200) module_os: >> js_os_send
D (74210) module_os: About to send 128 bytes of data to sockfd=2
D (74210) module_os: - data: "/" + location.hostname + ":8002/console");
// When a console message arrives, append it to the console log and scroll so that "
D (74230) module_os: << js_os_send
D (74230) module_fs: >> js_fs_readSync
D (74230) module_fs: Buffer pointer size returned as 128
D (74240) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74240) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74250) module_fs: << js_fs_readSync: sizeRead: 128
D (74250) log: Size read: 128
D (74260) module_os: >> js_os_send
D (74260) module_os: About to send 128 bytes of data to sockfd=2
D (74260) module_os: - data: "it is visible.
consoleWS.onmessage = function(event) {
console.log("WS message received!");
$("#console").val($("#consol"
D (74280) module_os: << js_os_send
D (74280) module_fs: >> js_fs_readSync
D (74280) module_fs: Buffer pointer size returned as 128
D (74290) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74300) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74300) module_fs: << js_fs_readSync: sizeRead: 128
D (74310) log: Size read: 128
D (74310) module_os: >> js_os_send
D (74310) module_os: About to send 128 bytes of data to sockfd=2
D (74320) module_os: - data: "e").val() + event.data);
$('#console').scrollTop($('#console')[0].scrollHeight);
}
consoleWS.onclose = function() {
$("
D (74330) module_os: << js_os_send
D (74340) module_fs: >> js_fs_readSync
D (74340) module_fs: Buffer pointer size returned as 128
D (74340) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74350) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74350) module_fs: << js_fs_readSync: sizeRead: 128
D (74360) log: Size read: 128
D (74360) module_os: >> js_os_send
D (74360) module_os: About to send 128 bytes of data to sockfd=2
D (74370) module_os: - data: ""#newWebSocket").button("enable");
$("#console").prop("disabled", true);
consoleWS = null;
}
consoleWS.onopen = functi"
D (74390) module_os: << js_os_send
D (74390) module_fs: >> js_fs_readSync
D (74390) module_fs: Buffer pointer size returned as 128
D (74400) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74400) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74410) module_fs: << js_fs_readSync: sizeRead: 128
D (74410) log: Size read: 128
D (74420) module_os: >> js_os_send
D (74420) module_os: About to send 128 bytes of data to sockfd=2
D (74420) module_os: - data: "on() {
$("#console").prop("disabled", false);
if (onOpen != null) {
onOpen();
}
}
} // createConsoleWebSocket
"
D (74440) module_os: << js_os_send
D (74440) module_fs: >> js_fs_readSync
D (74440) module_fs: Buffer pointer size returned as 128
D (74450) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74460) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74460) module_fs: << js_fs_readSync: sizeRead: 128
D (74470) log: Size read: 128
D (74470) module_os: >> js_os_send
D (74470) module_os: About to send 128 bytes of data to sockfd=2
D (74480) module_os: - data: "
/
*
* We have the need to populate a with the names of files stored on the ESP32. * This function performs that " D (74490) module_os: << js_os_send D (74490) module_fs: >> js_fs_readSync D (74500) module_fs: Buffer pointer size returned as 128 D (74500) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74510) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74510) module_fs: << js_fs_readSync: sizeRead: 128 D (74520) log: Size read: 128 D (74520) module_os: >> js_os_send D (74520) module_os: About to send 128 bytes of data to sockfd=2 D (74530) module_os: - data: "task by making a REST request to the ESP32 to retrieve * them. The results are then inserted into the
* @param sel"
D (74540) module_os: << js_os_send
D (74550) module_fs: >> js_fs_readSync
D (74550) module_fs: Buffer pointer size returned as 128
D (74560) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128
D (74560) duktape_spiffs: vfs_read(SPIFFS): We read 128
D (74570) module_fs: << js_fs_readSync: sizeRead: 128
D (74570) log: Size read: 128
D (74580) module_os: >> js_os_send
D (74580) module_os: About to send 128 bytes of data to sockfd=2
D (74580) module_os: - data: "ectObj The jQuery object representing the * @param callback A callback to invoke when done. * @returns N/A */ fu" D (74600) module_os: << js_os_send D (74600) module_fs: >> js_fs_readSync D (74600) module_fs: Buffer pointer size returned as 128 D (74610) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74610) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74620) module_fs: << js_fs_readSync: sizeRead: 128 D (74620) log: Size read: 128 D (74630) module_os: >> js_os_send D (74630) module_os: About to send 128 bytes of data to sockfd=2 D (74640) module_os: - data: "nction populateSelectWithFiles(selectObj, callback) { $.ajax({ url: "http://" + settings.esp32_host + "/files", method: " D (74650) module_os: &lt;&lt; js_os_send D (74650) module_fs: &gt;&gt; js_fs_readSync D (74660) module_fs: Buffer pointer size returned as 128 D (74660) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (74670) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74670) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (74680) log: Size read: 128 D (74680) module_os: &gt;&gt; js_os_send D (74680) module_os: About to send 128 bytes of data to sockfd=2 D (74690) module_os: - data: ""GET", dataType: "json", success: function(data) { data.sort(function(a, b) { if (a.name &lt; b.name) { return" D (74700) module_os: &lt;&lt; js_os_send D (74710) module_fs: &gt;&gt; js_fs_readSync D (74710) module_fs: Buffer pointer size returned as 128 D (74710) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (74720) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74730) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (74730) log: Size read: 128 D (74730) module_os: &gt;&gt; js_os_send D (74740) module_os: About to send 128 bytes of data to sockfd=2 D (74740) module_os: - data: " -1; } if (a.name &gt; b.name) { return 1; } return 0; }); $(selectObj).empty(); for (var i=0" D (74760) module_os: << js_os_send D (74760) module_fs: >> js_fs_readSync D (74760) module_fs: Buffer pointer size returned as 128 D (74770) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74770) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74780) module_fs: << js_fs_readSync: sizeRead: 128 D (74780) log: Size read: 128 D (74790) module_os: >> js_os_send D (74790) module_os: About to send 128 bytes of data to sockfd=2 D (74790) module_os: - data: "; i<data.length; i++) { $(selectObj).append($("", {value: data[i].name, text: data[i].name})); } if (callba" D (74810) module_os: << js_os_send D (74810) module_fs: >> js_fs_readSync D (74820) module_fs: Buffer pointer size returned as 128 D (74820) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74830) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74830) module_fs: << js_fs_readSync: sizeRead: 128 D (74840) log: Size read: 128 D (74840) module_os: >> js_os_send D (74840) module_os: About to send 128 bytes of data to sockfd=2 D (74850) module_os: - data: "ck) { callback(); } } // Success }); // .ajax } // populateSelectWithFiles // Create the page layout. $("#c1" D (74860) module_os: << js_os_send D (74870) module_fs: >> js_fs_readSync D (74870) module_fs: Buffer pointer size returned as 128 D (74870) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74880) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74880) module_fs: << js_fs_readSync: sizeRead: 128 D (74890) log: Size read: 128 D (74890) module_os: >> js_os_send D (74900) module_os: About to send 128 bytes of data to sockfd=2 D (74900) module_os: - data: "").layout({ applyDefaultStyles: true, // The center pane is the editor. center: { onresize: function() { editor.res" D (74920) module_os: << js_os_send D (74920) module_fs: >> js_fs_readSync D (74920) module_fs: Buffer pointer size returned as 128 D (74930) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74930) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74940) module_fs: << js_fs_readSync: sizeRead: 128 D (74940) log: Size read: 128 D (74950) module_os: >> js_os_send D (74950) module_os: About to send 128 bytes of data to sockfd=2 D (74950) module_os: - data: "ize(); } }, // The south pane is the console. south: { size: 200, // Set its initial height. closable: true // Fl" D (74970) module_os: << js_os_send D (74970) module_fs: >> js_fs_readSync D (74980) module_fs: Buffer pointer size returned as 128 D (74980) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (74990) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (74990) module_fs: << js_fs_readSync: sizeRead: 128 D (75000) log: Size read: 128 D (75000) module_os: >> js_os_send D (75000) module_os: About to send 128 bytes of data to sockfd=2 D (75010) module_os: - data: "ag the console pane as closable. } }); // Create the ace editor var editor = ace.edit("editor"); editor.setTheme("ace/the" D (75020) module_os: << js_os_send D (75030) module_fs: >> js_fs_readSync D (75030) module_fs: Buffer pointer size returned as 128 D (75030) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75040) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75040) module_fs: << js_fs_readSync: sizeRead: 128 D (75050) log: Size read: 128 D (75050) module_os: >> js_os_send D (75060) module_os: About to send 128 bytes of data to sockfd=2 D (75060) module_os: - data: "me/" + settings.theme); editor.getSession().setMode("ace/mode/javascript"); // Set the language to be JavaScript editor.setFon" D (75080) module_os: << js_os_send D (75080) module_fs: >> js_fs_readSync D (75080) module_fs: Buffer pointer size returned as 128 D (75090) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75090) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75100) module_fs: << js_fs_readSync: sizeRead: 128 D (75100) log: Size read: 128 D (75110) module_os: >> js_os_send D (75110) module_os: About to send 128 bytes of data to sockfd=2 D (75110) module_os: - data: "tSize(16); editor.setOption("showPrintMargin", false); editor.$blockScrolling = Infinity; // Handle the run button $("#run" D (75130) module_os: &lt;&lt; js_os_send D (75130) module_fs: &gt;&gt; js_fs_readSync D (75130) module_fs: Buffer pointer size returned as 128 D (75140) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (75150) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75150) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (75160) log: Size read: 128 D (75160) module_os: &gt;&gt; js_os_send D (75160) module_os: About to send 128 bytes of data to sockfd=2 D (75170) module_os: - data: "").button({ icon: "ui-icon-play" // Set the icon on the button to be the play icon. }).click(function() { if (consoleWS != " D (75180) module_os: &lt;&lt; js_os_send D (75180) module_fs: &gt;&gt; js_fs_readSync D (75190) module_fs: Buffer pointer size returned as 128 D (75190) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (75200) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75200) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (75210) log: Size read: 128 D (75210) module_os: &gt;&gt; js_os_send D (75210) module_os: About to send 128 bytes of data to sockfd=2 D (75220) module_os: - data: "null || !isConsoleEnabled()) { runScript(editor.getValue()); } else { createConsoleWebSocket(function() { console.lo" D (75240) module_os: &lt;&lt; js_os_send D (75240) module_fs: &gt;&gt; js_fs_readSync D (75240) module_fs: Buffer pointer size returned as 128 D (75250) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (75250) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75260) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (75260) log: Size read: 128 D (75270) module_os: &gt;&gt; js_os_send D (75270) module_os: About to send 128 bytes of data to sockfd=2 D (75270) module_os: - data: "g("Web socket open!"); runScript(editor.getValue()); }); } }); $("#consoleCheckbox").checkboxradio().change(funct" D (75290) module_os: << js_os_send D (75290) module_fs: >> js_fs_readSync D (75290) module_fs: Buffer pointer size returned as 128 D (75300) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75310) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75310) module_fs: << js_fs_readSync: sizeRead: 128 D (75320) log: Size read: 128 D (75320) module_os: >> js_os_send D (75320) module_os: About to send 128 bytes of data to sockfd=2 D (75330) module_os: - data: "ion() { //console.log("Checkbox change: " + isConsoleEnabled()); if (!isConsoleEnabled()) { if (consoleWS != null) { " D (75340) module_os: << js_os_send D (75340) module_fs: >> js_fs_readSync D (75350) module_fs: Buffer pointer size returned as 128 D (75350) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75360) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75360) module_fs: << js_fs_readSync: sizeRead: 128 D (75370) log: Size read: 128 D (75370) module_os: >> js_os_send D (75370) module_os: About to send 128 bytes of data to sockfd=2 D (75380) module_os: - data: "consoleWS.close(); consoleWS = null; } } else { // Console was not enabled, so enable it now. createConsoleWebSoc" D (75390) module_os: << js_os_send D (75400) module_fs: >> js_fs_readSync D (75400) module_fs: Buffer pointer size returned as 128 D (75410) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75410) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75420) module_fs: << js_fs_readSync: sizeRead: 128 D (75420) log: Size read: 128 D (75430) module_os: >> js_os_send D (75430) module_os: About to send 128 bytes of data to sockfd=2 D (75430) module_os: - data: "ket(null); } }); // #consoleCheckbox checkBox changed. // Handle the clear console button. $("#clearConsole").button({ " D (75450) module_os: &lt;&lt; js_os_send D (75450) module_fs: &gt;&gt; js_fs_readSync D (75450) module_fs: Buffer pointer size returned as 128 D (75460) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (75460) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75470) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (75470) log: Size read: 128 D (75480) module_os: &gt;&gt; js_os_send D (75480) module_os: About to send 128 bytes of data to sockfd=2 D (75490) module_os: - data: "icon: "ui-icon-trash" // Set the icon on the button to be the trash can. }).click(function() { $("#console").val(""); }); " D (75500) module_os: << js_os_send D (75500) module_fs: >> js_fs_readSync D (75510) module_fs: Buffer pointer size returned as 128 D (75510) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75520) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75520) module_fs: << js_fs_readSync: sizeRead: 128 D (75530) log: Size read: 128 D (75530) module_os: >> js_os_send D (75530) module_os: About to send 128 bytes of data to sockfd=2 D (75540) module_os: - data: " $("#load").button().click(function() { $.ajax({ url: "http://" + settings.esp32_host + "/files", method: "GET", data" D (75550) module_os: << js_os_send D (75560) module_fs: >> js_fs_readSync D (75560) module_fs: Buffer pointer size returned as 128 D (75560) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75570) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75580) module_fs: << js_fs_readSync: sizeRead: 128 D (75580) log: Size read: 128 D (75580) module_os: >> js_os_send D (75590) module_os: About to send 128 bytes of data to sockfd=2 D (75590) module_os: - data: "Type: "json", success: function(data) { populateSelectWithFiles($("#loadSelect"), function() { $("#loadDialog").dial" D (75610) module_os: << js_os_send D (75610) module_fs: >> js_fs_readSync D (75610) module_fs: Buffer pointer size returned as 128 D (75620) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75620) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75630) module_fs: << js_fs_readSync: sizeRead: 128 D (75630) log: Size read: 128 D (75640) module_os: >> js_os_send D (75640) module_os: About to send 128 bytes of data to sockfd=2 D (75640) module_os: - data: "og("open"); }); } // Success }); // .ajax }); $("#saveSelect").change(function(event) { $("#saveFileNameText").va" D (75660) module_os: << js_os_send D (75660) module_fs: >> js_fs_readSync D (75670) module_fs: Buffer pointer size returned as 128 D (75670) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75680) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75680) module_fs: << js_fs_readSync: sizeRead: 128 D (75690) log: Size read: 128 D (75690) module_os: >> js_os_send D (75690) module_os: About to send 128 bytes of data to sockfd=2 D (75700) module_os: - data: "l($("#saveSelect option:selected").val()); }); /** * Handle the save button being pressed on the main window. * This wil" D (75710) module_os: << js_os_send D (75720) module_fs: >> js_fs_readSync D (75720) module_fs: Buffer pointer size returned as 128 D (75720) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75730) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75730) module_fs: << js_fs_readSync: sizeRead: 128 D (75740) log: Size read: 128 D (75740) module_os: >> js_os_send D (75750) module_os: About to send 128 bytes of data to sockfd=2 D (75750) module_os: - data: "l open the save dialog. */ $("#save").button().click(function() { $.ajax({ url: "http://" + settings.esp32_host + "/file" D (75770) module_os: << js_os_send D (75770) module_fs: >> js_fs_readSync D (75770) module_fs: Buffer pointer size returned as 128 D (75780) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75780) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75790) module_fs: << js_fs_readSync: sizeRead: 128 D (75790) log: Size read: 128 D (75800) module_os: >> js_os_send D (75800) module_os: About to send 128 bytes of data to sockfd=2 D (75800) module_os: - data: "s", method: "GET", dataType: "json", success: function(data) { populateSelectWithFiles($("#saveSelect"), function()" D (75820) module_os: << js_os_send D (75820) module_fs: >> js_fs_readSync D (75820) module_fs: Buffer pointer size returned as 128 D (75830) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75840) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75840) module_fs: << js_fs_readSync: sizeRead: 128 D (75850) log: Size read: 128 D (75850) module_os: >> js_os_send D (75850) module_os: About to send 128 bytes of data to sockfd=2 D (75860) module_os: - data: " { $("#saveFileNameText").val(""); $("#saveDialog").dialog("open"); }); } // Success }); // .ajax }); // " D (75870) module_os: << js_os_send D (75880) module_fs: >> js_fs_readSync D (75880) module_fs: Buffer pointer size returned as 128 D (75880) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (75890) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75890) module_fs: << js_fs_readSync: sizeRead: 128 D (75900) log: Size read: 128 D (75900) module_os: >> js_os_send D (75900) module_os: About to send 128 bytes of data to sockfd=2 D (75910) module_os: - data: "Handle the settings button. $("#settings").button({ icon: "ui-icon-wrench" // Set the icon on the button to be the wrench. }" D (75930) module_os: &lt;&lt; js_os_send D (75930) module_fs: &gt;&gt; js_fs_readSync D (75930) module_fs: Buffer pointer size returned as 128 D (75940) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (75940) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (75950) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (75950) log: Size read: 128 D (75960) module_os: &gt;&gt; js_os_send D (75960) module_os: About to send 128 bytes of data to sockfd=2 D (75960) module_os: - data: ").click(function() { $("#settingsHost").val(settings.esp32_host); $("#fontSize").val(editor.getFontSize()); $("#theme").va" D (75980) module_os: << js_os_send D (75980) module_fs: >> js_fs_readSync D (75980) module_fs: Buffer pointer size returned as 128 D (75990) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76000) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76000) module_fs: << js_fs_readSync: sizeRead: 128 D (76010) log: Size read: 128 D (76010) module_os: >> js_os_send D (76010) module_os: About to send 128 bytes of data to sockfd=2 D (76020) module_os: - data: "l(settings.theme); $("#settingsDialog").dialog("open"); }); $("#info").click(function(){ console.log("Info!"); open("h" D (76030) module_os: << js_os_send D (76030) module_fs: >> js_fs_readSync D (76040) module_fs: Buffer pointer size returned as 128 D (76040) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76050) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76050) module_fs: << js_fs_readSync: sizeRead: 128 D (76060) log: Size read: 128 D (76060) module_os: >> js_os_send D (76060) module_os: About to send 128 bytes of data to sockfd=2 D (76070) module_os: - data: "ttps://github.com/nkolban/duktape-esp32"); }); $("#repl").on("keypress", function(e) { if (e.keyCode == 13) { runScript" D (76090) module_os: << js_os_send D (76090) module_fs: >> js_fs_readSync D (76090) module_fs: Buffer pointer size returned as 128 D (76100) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76100) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76110) module_fs: << js_fs_readSync: sizeRead: 128 D (76110) log: Size read: 128 D (76120) module_os: >> js_os_send D (76120) module_os: About to send 128 bytes of data to sockfd=2 D (76120) module_os: - data: "($("#repl").val()); return false; } }); $("#evalRun").button().click(function() { runScript($("#repl").val()); }); " D (76140) module_os: << js_os_send D (76140) module_fs: >> js_fs_readSync D (76140) module_fs: Buffer pointer size returned as 128 D (76150) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76160) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76160) module_fs: << js_fs_readSync: sizeRead: 128 D (76170) log: Size read: 128 D (76170) module_os: >> js_os_send D (76170) module_os: About to send 128 bytes of data to sockfd=2 D (76180) module_os: - data: " // Create and handle the save file dialog $("#saveDialog").dialog({ autoOpen: false, modal: true, width: 400, buttons" D (76190) module_os: << js_os_send D (76200) module_fs: >> js_fs_readSync D (76200) module_fs: Buffer pointer size returned as 128 D (76200) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76210) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76210) module_fs: << js_fs_readSync: sizeRead: 128 D (76220) log: Size read: 128 D (76220) module_os: >> js_os_send D (76220) module_os: About to send 128 bytes of data to sockfd=2 D (76230) module_os: - data: ": [ { text: "Save", click: function() { var selectedFile = $("#saveFileNameText").val().trim(); // Get the input" D (76240) module_os: << js_os_send D (76250) module_fs: >> js_fs_readSync D (76250) module_fs: Buffer pointer size returned as 128 D (76260) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76260) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76270) module_fs: << js_fs_readSync: sizeRead: 128 D (76270) log: Size read: 128 D (76280) module_os: >> js_os_send D (76280) module_os: About to send 128 bytes of data to sockfd=2 D (76280) module_os: - data: " file name. if (selectedFile.length == 0) { // Check that it is not empty return; // No file name entered. } " D (76300) module_os: << js_os_send D (76300) module_fs: >> js_fs_readSync D (76300) module_fs: Buffer pointer size returned as 128 D (76310) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76310) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76320) module_fs: << js_fs_readSync: sizeRead: 128 D (76320) log: Size read: 128 D (76330) module_os: >> js_os_send D (76330) module_os: About to send 128 bytes of data to sockfd=2 D (76340) module_os: - data: " if (selectedFile.charAt(0) != '/') { // File must start with a "/". Add it if not present. selectedFile = "/" + select" D (76350) module_os: << js_os_send D (76350) module_fs: >> js_fs_readSync D (76360) module_fs: Buffer pointer size returned as 128 D (76360) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76370) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76370) module_fs: << js_fs_readSync: sizeRead: 128 D (76380) log: Size read: 128 D (76380) module_os: >> js_os_send D (76380) module_os: About to send 128 bytes of data to sockfd=2 D (76390) module_os: - data: "edFile; } // Make a REST call to the ESP32 to save the data. The URL is: // POST /files/<fileName> //" D (76400) module_os: << js_os_send D (76410) module_fs: >> js_fs_readSync D (76410) module_fs: Buffer pointer size returned as 128 D (76410) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76420) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76420) module_fs: << js_fs_readSync: sizeRead: 128 D (76430) log: Size read: 128 D (76430) module_os: >> js_os_send D (76440) module_os: About to send 128 bytes of data to sockfd=2 D (76440) module_os: - data: " Body: Data to save $.ajax({ url: "http://" + settings.esp32_host + "/files" + selectedFile, method: "POST", " D (76460) module_os: << js_os_send D (76460) module_fs: >> js_fs_readSync D (76460) module_fs: Buffer pointer size returned as 128 D (76470) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76470) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76480) module_fs: << js_fs_readSync: sizeRead: 128 D (76480) log: Size read: 128 D (76490) module_os: >> js_os_send D (76490) module_os: About to send 128 bytes of data to sockfd=2 D (76490) module_os: - data: " data: editor.getValue(), success: function(data) { $("#saveDialog").dialog("close"); } }); // .ajax " D (76510) module_os: << js_os_send D (76510) module_fs: >> js_fs_readSync D (76520) module_fs: Buffer pointer size returned as 128 D (76520) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76530) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76530) module_fs: << js_fs_readSync: sizeRead: 128 D (76540) log: Size read: 128 D (76540) module_os: >> js_os_send D (76540) module_os: About to send 128 bytes of data to sockfd=2 D (76550) module_os: - data: " } }, { text: "Cancel", click: function() { $(this).dialog("close"); } } ] }); // #saveDialog " D (76560) module_os: &lt;&lt; js_os_send D (76570) module_fs: &gt;&gt; js_fs_readSync D (76570) module_fs: Buffer pointer size returned as 128 D (76570) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (76580) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76580) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (76590) log: Size read: 128 D (76590) module_os: &gt;&gt; js_os_send D (76600) module_os: About to send 128 bytes of data to sockfd=2 D (76600) module_os: - data: " // Create and handle the load file dialog $("#loadDialog").dialog({ autoOpen: false, modal: true, width: 400, bu" D (76620) module_os: << js_os_send D (76620) module_fs: >> js_fs_readSync D (76620) module_fs: Buffer pointer size returned as 128 D (76630) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76630) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76640) module_fs: << js_fs_readSync: sizeRead: 128 D (76640) log: Size read: 128 D (76650) module_os: >> js_os_send D (76650) module_os: About to send 128 bytes of data to sockfd=2 D (76650) module_os: - data: "ttons: [ { text: "Run", click: function() { // Determine which file was selected in the list var selectedFi" D (76670) module_os: << js_os_send D (76670) module_fs: >> js_fs_readSync D (76680) module_fs: Buffer pointer size returned as 128 D (76680) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76690) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76690) module_fs: << js_fs_readSync: sizeRead: 128 D (76700) log: Size read: 128 D (76700) module_os: >> js_os_send D (76700) module_os: About to send 128 bytes of data to sockfd=2 D (76710) module_os: - data: "le = $("#loadSelect option:selected").val(); // Ensure the selected file starts with "/ if (!selectedFile.startsWith(" D (76720) module_os: << js_os_send D (76730) module_fs: >> js_fs_readSync D (76730) module_fs: Buffer pointer size returned as 128 D (76730) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76740) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76740) module_fs: << js_fs_readSync: sizeRead: 128 D (76750) log: Size read: 128 D (76750) module_os: >> js_os_send D (76750) module_os: About to send 128 bytes of data to sockfd=2 D (76760) module_os: - data: ""/")) { selectedFile = "/" + selectedFile; } // Run the named file. $.ajax({ url: "http://" + s" D (76780) module_os: << js_os_send D (76780) module_fs: >> js_fs_readSync D (76780) module_fs: Buffer pointer size returned as 128 D (76790) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76790) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76800) module_fs: << js_fs_readSync: sizeRead: 128 D (76800) log: Size read: 128 D (76810) module_os: >> js_os_send D (76810) module_os: About to send 128 bytes of data to sockfd=2 D (76810) module_os: - data: "ettings.esp32_host + "/run" + selectedFile, method: "GET", dataType: "text", success: function(data) {} }" D (76830) module_os: << js_os_send D (76830) module_fs: >> js_fs_readSync D (76830) module_fs: Buffer pointer size returned as 128 D (76840) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76850) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76850) module_fs: << js_fs_readSync: sizeRead: 128 D (76860) log: Size read: 128 D (76860) module_os: >> js_os_send D (76860) module_os: About to send 128 bytes of data to sockfd=2 D (76870) module_os: - data: "); } }, { text: "Load", click: function() { // Determine which file was selected in the list var sel" D (76880) module_os: << js_os_send D (76890) module_fs: >> js_fs_readSync D (76890) module_fs: Buffer pointer size returned as 128 D (76890) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76900) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76900) module_fs: << js_fs_readSync: sizeRead: 128 D (76910) log: Size read: 128 D (76910) module_os: >> js_os_send D (76910) module_os: About to send 128 bytes of data to sockfd=2 D (76920) module_os: - data: "ectedFile = $("#loadSelect option:selected").val(); // Ensure the selected file starts with "/ if (!selectedFile" D (76940) module_os: << js_os_send D (76940) module_fs: >> js_fs_readSync D (76940) module_fs: Buffer pointer size returned as 128 D (76950) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (76950) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (76960) module_fs: << js_fs_readSync: sizeRead: 128 D (76960) log: Size read: 128 D (76970) module_os: >> js_os_send D (76970) module_os: About to send 128 bytes of data to sockfd=2 D (76970) module_os: - data: ".startsWith("/")) { selectedFile = "/" + selectedFile; } // Retrieve the content of a file from ESP32 file" D (76990) module_os: << js_os_send D (76990) module_fs: >> js_fs_readSync D (76990) module_fs: Buffer pointer size returned as 128 D (77000) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77000) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77010) module_fs: << js_fs_readSync: sizeRead: 128 D (77020) log: Size read: 128 D (77020) module_os: >> js_os_send D (77020) module_os: About to send 128 bytes of data to sockfd=2 D (77030) module_os: - data: " store. // the REST request format is: // GET /files/ $.ajax({ url: "http://" + settings.esp32_ho" D (77040) module_os: << js_os_send D (77040) module_fs: >> js_fs_readSync D (77050) module_fs: Buffer pointer size returned as 128 D (77050) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77060) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77060) module_fs: << js_fs_readSync: sizeRead: 128 D (77070) log: Size read: 128 D (77070) module_os: >> js_os_send D (77070) module_os: About to send 128 bytes of data to sockfd=2 D (77080) module_os: - data: "st + "/files" + selectedFile, method: "GET", dataType: "text", success: function(data) { editor.setValu" D (77090) module_os: << js_os_send D (77100) module_fs: >> js_fs_readSync D (77100) module_fs: Buffer pointer size returned as 128 D (77100) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77110) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77120) module_fs: << js_fs_readSync: sizeRead: 128 D (77120) log: Size read: 128 D (77130) module_os: >> js_os_send D (77130) module_os: About to send 128 bytes of data to sockfd=2 D (77130) module_os: - data: "e(data); } }); $(this).dialog("close"); } // Click on the load button }, { text: "Cancel", cli" D (77150) module_os: &lt;&lt; js_os_send D (77150) module_fs: &gt;&gt; js_fs_readSync D (77150) module_fs: Buffer pointer size returned as 128 D (77160) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (77160) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77170) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (77170) log: Size read: 128 D (77180) module_os: &gt;&gt; js_os_send D (77180) module_os: About to send 128 bytes of data to sockfd=2 D (77190) module_os: - data: "ck: function() { $(this).dialog("close"); } } ] }); // Create and handle the settings dialog. $("#settingsDia" D (77200) module_os: &lt;&lt; js_os_send D (77200) module_fs: &gt;&gt; js_fs_readSync D (77210) module_fs: Buffer pointer size returned as 128 D (77210) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (77220) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77220) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (77230) log: Size read: 128 D (77230) module_os: &gt;&gt; js_os_send D (77230) module_os: About to send 128 bytes of data to sockfd=2 D (77240) module_os: - data: "log").dialog({ autoOpen: false, // Do not auto open the dialog modal: true, // Dialog should be model. width: 400, // Widt" D (77250) module_os: &lt;&lt; js_os_send D (77260) module_fs: &gt;&gt; js_fs_readSync D (77260) module_fs: Buffer pointer size returned as 128 D (77260) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (77270) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77280) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (77280) log: Size read: 128 D (77290) module_os: &gt;&gt; js_os_send D (77290) module_os: About to send 128 bytes of data to sockfd=2 D (77290) module_os: - data: "h of dialog. buttons: [ // The OK button is clicked to confirm the entries. { text: "OK", click: function() { " D (77310) module_os: &lt;&lt; js_os_send D (77310) module_fs: &gt;&gt; js_fs_readSync D (77310) module_fs: Buffer pointer size returned as 128 D (77320) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (77320) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77330) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (77330) log: Size read: 128 D (77340) module_os: &gt;&gt; js_os_send D (77340) module_os: About to send 128 bytes of data to sockfd=2 D (77340) module_os: - data: " settings.esp32_host = $("#settingsHost").val(); settings.theme = $("#theme option:selected").val(); localStorage = " D (77360) module_os: << js_os_send D (77360) module_fs: >> js_fs_readSync D (77370) module_fs: Buffer pointer size returned as 128 D (77370) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77380) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77380) module_fs: << js_fs_readSync: sizeRead: 128 D (77390) log: Size read: 128 D (77390) module_os: >> js_os_send D (77390) module_os: About to send 128 bytes of data to sockfd=2 D (77400) module_os: - data: "JSON.stringify(settings); editor.setFontSize($("#fontSize").val()); editor.setTheme("ace/theme/" + settings.them" D (77410) module_os: << js_os_send D (77420) module_fs: >> js_fs_readSync D (77420) module_fs: Buffer pointer size returned as 128 D (77420) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77430) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77430) module_fs: << js_fs_readSync: sizeRead: 128 D (77440) log: Size read: 128 D (77440) module_os: >> js_os_send D (77450) module_os: About to send 128 bytes of data to sockfd=2 D (77450) module_os: - data: "e); $(this).dialog("close"); } }, // The Cancel button is clicked to cancel any settings changes. { text: " D (77470) module_os: &lt;&lt; js_os_send D (77470) module_fs: &gt;&gt; js_fs_readSync D (77470) module_fs: Buffer pointer size returned as 128 D (77480) duktape_spiffs: &gt;&gt; read fd=2, dst=0x3fffd5d8, size=128 D (77480) duktape_spiffs: vfs_read(SPIFFS): We read 128 D (77490) module_fs: &lt;&lt; js_fs_readSync: sizeRead: 128 D (77490) log: Size read: 128 D (77500) module_os: &gt;&gt; js_os_send D (77500) module_os: About to send 128 bytes of data to sockfd=2 D (77500) module_os: - data: ""Cancel", click: function() { $(this).dialog("close"); } } ] // Array of buttons }); // Settings dialog }); /" D (77520) module_os: << js_os_send D (77520) module_fs: >> js_fs_readSync D (77530) module_fs: Buffer pointer size returned as 128 D (77530) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77540) duktape_spiffs: vfs_read(SPIFFS): We read 10 D (77540) module_fs: << js_fs_readSync: sizeRead: 10 D (77550) log: Size read: 10 D (77550) module_os: >> js_os_send D (77550) module_os: About to send 10 bytes of data to sockfd=2 D (77560) module_os: - data: "/ onReady." D (77560) module_os: << js_os_send D (77560) module_fs: >> js_fs_readSync D (77570) module_fs: Buffer pointer size returned as 128 D (77570) duktape_spiffs: >> read fd=2, dst=0x3fffd5d8, size=128 D (77580) duktape_spiffs: vfs_read(SPIFFS): We read -10003 SPIFFS_ERR_END_OF_OBJECT D (77590) module_fs: js_fs_readSync: read() error: 0 Success D (77590) module_fs: << js_fs_readSync: sizeRead: 0 D (77600) log: Size read: 0 D (77600) duktape_spiffs: >> close fd=2 D (77600) module_os: >> js_os_shutdown D (77600) module_os: About to shutdown fd=2 D (77610) module_os: << js_os_shutdown D (77610) module_os: >> js_os_close D (77620) module_os: About to close fd=2 D (77620) module_os: << js_os_close D (80120) log: selectResult: {"readfds":[0],"writefds":[],"exceptfds":[]} D (80120) log: loop: working on ready to read of fd=0 D (80120) module_os: >> js_os_accept D (80130) module_os: About to call accept on 0 D (80130) module_os: << js_os_accept: new socketfd=3 D (80140) log: We accepted a new client connection: {"sockfd":3} D (80150) log: IDE_WebServer: We have received a new HTTP client request! D (80150) dukf_utils: requestHandler: heapSize=29032 D (80180) log: selectResult: {"readfds":[3],"writefds":[],"exceptfds":[]} D (80180) log: loop: working on ready to read of fd=3 D (80180) module_os: >> js_os_recv D (80190) module_os: -- js_os_recv: About to receive on fd=3 for a buffer of size 512 D (80190) module_os: << js_os_recv: length=368 D (80200) log: Length of data from recv: 368 D (80200) log: http parsing: GET /files HTTP/1.1 D (80210) log: http Method: GET, path: /files D (80210) log: http parsing: Host: 192.168.252.150:8000 D (80220) log: http parsing: User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0 D (80230) log: http parsing: Accept: application/json, text/javascript, /; q=0.01 D (80230) log: http parsing: Accept-Language: en-US,en;q=0.5 D (80240) log: http parsing: Accept-Encoding: gzip, deflate D (80250) log: http parsing: X-Requested-With: XMLHttpRequest D (80250) log: http parsing: Referer: http://192.168.252.150:8000/web/ide.html D (80260) log: http parsing: Connection: keep-alive D (80260) log: http parsing: D (80270) log: End of headers {"Host":"192.168.252.150:8000","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0","Accept":"application/json, text/javascript, /; q=0.01","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","X-Requested-With":"XMLHttpRequest","Referer":"http://192.168.252.150:8000/web/ide.html","Connection":"keep-alive"} D (80300) log: HTTP Request on(end): D (80300) log: - method: GET D (80300) log: - path: /files D (80310) log: - headers: {"Host":"192.168.252.150:8000","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0","Accept":"application/json, text/javascript, /; q=0.01","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","X-Requested-With":"XMLHttpRequest","Referer":"http://192.168.252.150:8000/web/ide.html","Connection":"keep-alive"} D (80340) dukf_utils: ide_webserver: request.on(end): heapSize=21084 D (80350) module_os: >> js_os_send D (80350) module_os: About to send 17 bytes of data to sockfd=3 D (80350) module_os: - data: "HTTP/1.1 200 OK " D (80360) module_os: << js_os_send D (80360) module_os: >> js_os_send D (80370) module_os: About to send 2 bytes of data to sockfd=3 D (80370) module_os: - data: " " D (80370) module_os: << js_os_send D (80380) duktape_spiffs: >> esp32_duktape_dump_spiffs_array: rootPath="/" D (80420) duktape_spiffs: << esp32_duktape_dump_spiffs_array Guru Meditation Error of type LoadStoreError occurred on core 0. Exception was unhandled. Register dump: PC : 0x4000c320 PS : 0x00060930 A0 : 0x80081a9d A1 : 0x3ffd0e30 A2 : 0x3fffe814 A3 : 0x40000004 A4 : 0x0000092b A5 : 0x3ffff13c A6 : 0x7f000000 A7 : 0x1049c500 A8 : 0x00000000 A9 : 0x3ffd0e00 A10 : 0x3fffe814 A11 : 0x00000004 A12 : 0x00000001 A13 : 0x00000001 A14 : 0x00000000 A15 : 0x3ffd28f4 SAR : 0x00000002 EXCCAUSE: 0x00000003 EXCVADDR: 0x40000004 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000 Backtrace: 0x4000c320:0x3ffd0e30 0x40081a9d:0x3ffd0e40 0x4000bee0:0x3ffd0e60 0x4011ac8d:0x3ffd0e80 0x4011f78d:0x3ffd0ea0 0x40121e3c:0x3ffd0ed0 0x40121ec7:0x3ffd0ef0 0x401227de:0x3ffd0f10 0x4012299d:0x3ffd0f50 0x4012b2cc:0x3ffd0f70 0x4012b201:0x3ffd0fb0 0x4012b389:0x3ffd0fd0 0x4012b1f9:0x3ffd1000 0x4012db2f:0x3ffd1020 0x4012dba0:0x3ffd1180 0x4011e31d:0x3ffd11a0 0x4011e3d8:0x3ffd1210 0x4011ddd1:0x3ffd1230 0x4011e06c:0x3ffd1280 0x4011e2ab:0x3ffd1310 0x4012c38c:0x3ffd1380 0x4012c406:0x3ffd1450 0x401085e7:0x3ffd1470 Entering gdb stub now. $T0b#e6

formatting & linting JavaScript

  • The documentation mentions use of JSHint, but I don't see a configuration file anywhere. AFAIK JSHint was actually abandoned as everyone (including JSHint's developers) has moved to using ESLint.

  • Automatic formatting may be desirable, and can be achieved with prettier. A common way to manage this sort of thing is with a pre-commit hook. There's some glue to make it work in tandem with ESLint as well.

Both of these necessitate Node.js and its package.json manifest; this should be present anyhow due to the stuff in tools/.

Comments?

Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed) esp32

Hello all
i am getting below error whenever i try to receive input from webserver
Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)
my project has ir remote interfacing along with webserver
when i disable /remove ir remote code webserver runs smoothly
unable to find link between ir remote and webserver code ,
i am using arduino ide for programming ESP32
Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)
Register dump:
PC : 0x400811df PS : 0x00060034 A0 : 0x80081830 A1 : 0x3ffc0bd0
A2 : 0xbad00bad A3 : 0x20000000 A4 : 0x00000400 A5 : 0x3ffd56b0
A6 : 0x00000003 A7 : 0x00060823 A8 : 0x3ffc354c A9 : 0x3f400020
A10 : 0x00000001 A11 : 0x3ffd3980 A12 : 0x800866a5 A13 : 0x3ffd5680
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x00000017 EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400811df:0x3ffc0bd0 0x4008182d:0x3ffc0bf0 0x40082ac1:0x3ffc0c10 0x4008fc8b:0x00000000

Rebooting...
ets Jun 8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0010,len:4
load:0x3fff0014,len:716
load:0x40078000,len:0
load:0x40078000,len:11572
entry 0x40078a14

Error in "LD build/esp32-duktape.elf"

LD build/esp32-duktape.elf
/duktape-esp32/build/main/libmain.a(module_aes.o):(.literal.js_fast_aes_unwrap+0x0): undefined reference to `mbedtls_aes_decrypt'
/duktape-esp32/build/main/libmain.a(module_aes.o):(.literal.js_fast_aes_wrap+0x0): undefined reference to `mbedtls_aes_encrypt'
/duktape-esp32/build/main/libmain.a(module_aes.o): In function `js_fast_aes_unwrap':
/duktape-esp32/main/module_aes.c:251: undefined reference to `mbedtls_aes_decrypt'
/duktape-esp32/build/main/libmain.a(module_aes.o): In function `js_fast_aes_wrap':
/duktape-esp32/main/module_aes.c:181: undefined reference to `mbedtls_aes_encrypt'
collect2: error: ld returned 1 exit status

How should I do to solve this problem? Thank you!

how to run tests?

There are two separate dirs full of tests; one in filesystem/tests/ and tests/. I'm not sure how to run them.

SPIFFS problems

I can use mkspiffs to build the SPIFFS filesystem image. esptool can flash it. In other words, make flashdata is successful, AFAICT.

However, upon mount, SPIFFS doesn't recognize the filesystem; it raises SPIFFS_ERR_NOT_A_FS:

D (354) duktape_spiffs: Loading SPIFFS at address 0x180000
E (364) duktape_spiffs: Error: rc from spiffs mount = -10025

I'm wondering if this could be a mismatch between the mkspiffs version and the SPIFFS version. My mkspiffs is v0.2.0; I have no idea what version is used in components/spiffs/. I know there are some backwards-compat concerns with SPIFFS.

I may be able to work around this by modifying duktape_spiffs.c to reformat, but that would necessarily remove all of the files in the image, and I'd have to upload them again manually (I think). Otherwise, I'll try to update the spiffs component, in case it's old.

alloc failed after http.js

Builds fine, but get alloc error on run. New to this so unsure if my device (ESP32 Thing) has less memory than other boards? Here is the relevant section of the boot log:

D (4402) log: Module: require("bootwifi.js") loading "bootwifi.js"
D (4406) dukf_utils: >> dukf_loadFile: (ESPFS) bootwifi.js, heapSize=30652
D (4412) espfs: >> espFsOpen: bootwifi.js
D (4415) dukf_utils: << duk_loadFile: Read file bootwifi.js for size 5556
D (4645) log: Module: require("nvs.js") loading "nvs.js"
D (4648) dukf_utils: >> dukf_loadFile: (ESPFS) nvs.js, heapSize=21260
D (4648) espfs: >> espFsOpen: nvs.js
D (4650) dukf_utils: << duk_loadFile: Read file nvs.js for size 1298
D (4741) modules: >> js_esp32_getNativeFunction
D (4742) modules: - nativeFunctionId that we are looking for is "ModuleNVS"
D (4742) modules: << js_esp32_getNativeFunction
D (4752) log: Module: require("http.js") loading "http.js"
D (4754) dukf_utils: >> dukf_loadFile: (ESPFS) http.js, heapSize=17800
D (4757) espfs: >> espFsOpen: http.js
D (4761) dukf_utils: << duk_loadFile: Read file http.js for size 8449
D (4799) duktape_utils: Error: Error: alloc failed
line: 29
Stack: Error: alloc failed
at [anon] (/home/edge/src/esp32/duktape-esp32/components/duktape/src/duktape.c:20666) internal
at require () native strict preventsyield
at bootwifi.js (bootwifi.js:29) preventsyield
at require () native strict preventsyield
at [anon] (start.js:57)
at global (start.js:64) preventsyield
D (4824) dukf_utils: << dukf_runFile: start.js
D (4828) duktape_task: Free heap at start of JavaScript main loop: 18620
D (4834) log: Console:


| |/ | __ _ _
| |
| (
| |) |) | ) |
| | _ | /| < / /
| |
___ ) | | ) / /
|
|/|| |/|
| __ \ | | | |
| | | |
| | | | __ _ _ __ ___
| | | | | | | |/ / / ` | ' \ / _
| |
| | |
| | <| || (
| | |_) | /
|
/ _,|_|_\
_,| ./ _|
| |
|_|
http://duktape.org
ESP32 port/framework: Neil Kolban
Build: Jan 18 2017 12:53:56

D (4883) duktape_task: Starting main loop!

Browser requirements ?

I have successfully installed the software and updated my ESP32. Connected it to my SSID, and is getting this screen:

image

But when I run the code there is no output to the console

I have tried the Enable options, and also the load, but nothing happens in the browser.

I get the following output if I monitor the UART

image

So it seems the code is executed, just not returned to the browser

Multithreading

Is this support creation threads or tasks?

Does this support socket programming for listener and sending using UDP and TCP.

Guru Mediation Error after changing access point

Hi, I managed to connect to ESP32 Duktape, and change the access point.
However, the device appears to have crashed

There appears to be a 'Guru Mediation Error'

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0008,len:0
load:0x3ffc0008,len:1580
load:0x40078000,len:3648
ho 0 tail 12 room 4
load:0x40080000,len:256
entry 0x40080034
I (1005) heap_alloc_caps: Initializing heap allocator:
I (1005) heap_alloc_caps: Region 19: 3FFC1C34 len 0001E3CC tag 0
I (1006) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (1010) cpu_start: Pro cpu up.
I (1013) cpu_start: Single core mode
I (1016) cpu_start: Pro cpu start user code
I (1030) rtc: rtc v160 Nov 22 2016 19:00:05
I (1037) rtc: XTAL 26M
D (1048) nvs: nvs_flash_init_custom start=9 count=6
D (1084) phy_init: loading PHY init data from application binary
D (1085) nvs: nvs_open phy 0
D (1086) nvs: nvs_get cal_version 4
V (1100) phy_init: phy_get_rf_cal_version: 258

D (1140) nvs: nvs_get_str_or_blob cal_mac
D (1176) nvs: nvs_get_str_or_blob cal_data
D (1219) nvs: nvs_close 1
V (1231) phy_init: register_chipv7_phy, init_data=0x3f400fe8, cal_data=0x3ffc2d18, mode=0
I (1487) phy: phy_version: 258, Nov 29 2016, 15:51:07, 1, 0
D (1488) nvs: nvs_open phy 1
V (1488) phy_init: phy_get_rf_cal_version: 258

D (1497) nvs: nvs_set cal_version 4 258
D (1631) nvs: nvs_set_blob cal_mac 6
D (1635) nvs: nvs_set_blob cal_data 1904
D (2531) nvs: nvs_close 2
I (2532) cpu_start: Starting scheduler on PRO CPU.
D (2533) bootwifi: >> bootWiFi
tcpip_task_hdlxxx : 3ffc5810, prio:18,stack:2048
D (2535) nvs: nvs_open misc 1
D (2538) nvs: nvs_get_str_or_blob log
I (2541) wifi: frc2_timer_task_hdl:3ffc7270, prio:22, stack:2048

D (2547) nvs: nvs_open nvs.net80211 1
D (2551) nvs: nvs_get opmode 1
D (2553) nvs: nvs_get country 1
D (2556) nvs: nvs_get_str_or_blob sta.ssid
D (2560) nvs: nvs_get_str_or_blob sta.mac
D (2564) nvs: nvs_get sta.authmode 1
D (2567) nvs: nvs_get_str_or_blob sta.pswd
D (2571) nvs: nvs_get_str_or_blob sta.pmk
D (2575) nvs: nvs_get sta.chan 1
D (2578) nvs: nvs_get auto.conn 1
D (2581) nvs: nvs_get bssid.set 1
D (2584) nvs: nvs_get_str_or_blob sta.bssid
D (2588) nvs: nvs_get sta.phym 1
D (2591) nvs: nvs_get sta.phybw 1
D (2594) nvs: nvs_get_str_or_blob sta.apsw
D (2597) nvs: nvs_get_str_or_blob sta.apinfo
D (2602) nvs: nvs_get_str_or_blob ap.ssid
D (2605) nvs: nvs_get_str_or_blob ap.mac
D (2609) nvs: nvs_get_str_or_blob ap.passwd
D (2613) nvs: nvs_get_str_or_blob ap.pmk
D (2616) nvs: nvs_get ap.chan 1
D (2619) nvs: nvs_get ap.authmode 1
D (2622) nvs: nvs_get ap.hidden 1
D (2625) nvs: nvs_get ap.max.conn 1
D (2629) nvs: nvs_get bcn.interval 2
D (2632) nvs: nvs_get ap.phym 1
D (2635) nvs: nvs_get ap.phybw 1
D (2638) nvs: nvs_get ap.sndchan 1
D (2641) nvs: nvs_set_blob sta.mac 6
D (2645) nvs: nvs_set_blob ap.mac 6
I (2648) wifi: pp_task_hdl : 3ffc9ae0, prio:23, stack:8192
E (2653) wifi: timer:0x3ffb1124 cb is null

D (2657) bootwifi: >> bootWiFi2
D (2660) nvs: nvs_open bootwifi 1
D (2662) nvs: nvs_get version 4
D (2665) nvs: nvs_get_str_or_blob connectionInfo
D (2670) nvs: nvs_close 5
D (2672) bootwifi: - Connecting to access point "AU" ...
I (2678) wifi: mode : sta (24:0a:c4:04:b9:a0)
D (2681) event: SYSTEM_EVENT_STA_START
V (2685) event: enter default callback
V (2688) event: exit default callback
D (2692) bootwifi: << bootWiFi2
D (2694) bootwifi: << bootWiFi
I (4015) wifi: n:9 0, o:1 0, ap:255 255, sta:9 0, prof:1
I (4664) wifi: state: 0 -> 2 (b0)
I (4666) wifi: state: 2 -> 3 (0)
I (4671) wifi: state: 3 -> 5 (10)
I (4684) wifi: connected with AU, channel 9
D (4684) event: SYSTEM_EVENT_STA_CONNECTED, ssid:AU, ssid_len:2, bssid:00:1f:5b:87:f7:38, channel:9, authmode:3
V (4687) event: enter default callback
V (4692) event: exit default callback
D (8667) event: SYSTEM_EVENT_STA_GOTIP, ip:10.1.10.14, mask:255.255.255.0, gw:10.1.10.1
V (8667) event: enter default callback
I (8667) event: ip: 10.1.10.14, mask: 255.255.255.0, gw: 10.1.10.1
V (8673) event: exit default callback
D (8676) bootwifi: ********************************************
D (8682) bootwifi: * We are now connected and ready to do work!
D (8688) bootwifi: * - Our IP address is: 10.1.10.14
D (8692) bootwifi: ********************************************
D (8698) esp32_specific: >> setupVFS
D (8701) esp32_specific: << setupVFS
D (8705) esp32_mongoose: Mongoose task starting
D (8706) duktape_task: >> duktape_task
D (8706) duktape_main: >> telnetTask
D (8710) esp32_mongoose: Mongoose: Starting setup
mg_socketpair: 0x100007f 0x100007f
mg_socketpair debug A
D (8730) esp32_mongoose: Mongoose: Succesfully inited
D (8733) esp32_mongoose: Mongoose: Successfully bound to address ":80"
D (8784) duktape_utils: Console:
 ______  _____ _____ ____ ___
|  ____|/ ____|  __ \___ \__ \
| |__  | (___ | |__) |__) | ) |
|  __|  \___ \|  ___/|__ < / /
| |____ ____) | |    ___) / /_
|______|_____/|_|  _|____/____|
|  __ \      | |  | |
| |  | |_   _| | _| |_ __ _ _ __   ___
| |  | | | | | |/ / __/ _` | '_ \ / _ \
| |__| | |_| |   <| || (_| | |_) |  __/
|_____/ \__,_|_|\_\\__\__,_| .__/ \___|
                           | |
                           |_|
 http://duktape.org
 ESP32 port/framework: Neil Kolban


D (8819) duktape_utils: Console: esp32_duktape>
Guru Meditation Error of type InstrFetchProhibited occurred on core   0. Exception was unhandled.
Register dump:
PC      :  002c002c  PS      :  00060d30  A0      :  800ea862  A1      :  3ffc56f0
A2      :  00000001  A3      :  3ffcab40  A4      :  002c002c  A5      :  00000008
A6      :  00000000  A7      :  3ffbd5b8  A8      :  800e6ff4  A9      :  00000002
A10     :  3ffcab40  A11     :  00000001  A12     :  3ffbf87c  A13     :  00000000
A14     :  3ffc4ff4  A15     :  3ffbf660  SAR     :  00000013  EXCCAUSE:  00000014
EXCVADDR:  002c002c  LBEG    :  4000c2e0  LEND    :  4000c2f6  LCOUNT  :  ffffffff
Entering gdb stub now.
$T0b#e6

Some notes regarding changing the access point which you might want to incorporate back into your instructions.

I followed the instruction here:
https://github.com/nkolban/duktape-esp32/blob/master/docs/README.md

  1. Your notes suggest typing "http://" in the url bar (without the quotes), which didn't work.
    Eventually I figured out that the url has to be http://192.168.4.1 or whatever is reported from screen.
D (2662) bootwifi: **********************************************
D (2668) bootwifi: * We are now an access point and you can point
D (2674) bootwifi: * your browser to http://192.168.4.1
D (2679) bootwifi: **********************************************

You might want to make that more explicit...

  1. Using the form to try and change the Access Point took a bit of trial and error, these were some of the issues:
  • I had the wrong password (there was no warning in screen about that)
  • I had to leave IP address, netmask and gateway blank
  • my laptop's wifi connection had a tendency to hop to another access point immediately following reset, probably correct behaviour on the part of the laptop, but worth reminding folks to make sure that they connect to the ESP32 access point as soon as screen says it's available.

So, now the ESP32 connects to the correct access point.
However, I was unable to ping the IP address 10.1.10.14, nor could I access it from a browser.

Request: commit messages & feature branches

Would be great if you could consider descriptive commit messages so it is easier to follow along and if you are adding or reworking a significant feature consider using branch and merge. Thanks.

Request: support Bluetooth

The beauty of the ESP32 is that it has Bluetooth, but I haven't seen support here. Are you planning to add it?

Request: move main modules into a subdir of components

Hello! I'd like to be able to use your duktape extensions, such as the networking code in main/module_os.c, in my own project. The IDF makefiles support this via a variable EXTRA_COMPONENT_DIRS.

For instance, by adding this to my Makefile:

DUK_PATH := /path/to/duktape-esp32

EXTRA_COMPONENT_DIRS := ${DUK_PATH}/components

I can compile the duktape interpreter into my project.

It's also possible to add a bare source dir via SRCDIRS. However, since your main directory contains a app_main() routine, I have to rely on ordering to override this.

Would you consider moving the module files and associated sources and includes into a subdirectory of components? Then your main dir would just contain the duktape_main.c file? I could then include your modules in my project just with the above. Thanks.

Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)

Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory region accessed)
Register dump:
PC : 0x400811df PS : 0x00060034 A0 : 0x80081830 A1 : 0x3ffc0bd0
A2 : 0xbad00bad A3 : 0x20000000 A4 : 0x00000400 A5 : 0x3ffd56b0
A6 : 0x00000003 A7 : 0x00060823 A8 : 0x3ffc354c A9 : 0x3f400020
A10 : 0x00000001 A11 : 0x3ffd3980 A12 : 0x800866a5 A13 : 0x3ffd5680
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x00000017 EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400811df:0x3ffc0bd0 0x4008182d:0x3ffc0bf0 0x40082ac1:0x3ffc0c10 0x4008fc8b:0x00000000

Rebooting...
ets Jun 8 2016 00:22:57

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.