Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code doesn't seem to be executing #43

Open
davidmoshal opened this issue May 31, 2019 · 2 comments
Open

code doesn't seem to be executing #43

davidmoshal opened this issue May 31, 2019 · 2 comments

Comments

@davidmoshal
Copy link

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

@davidmoshal
Copy link
Author

correction: rebooting the esp32 while connected to serial port and with screen open, results in:

D (10371) duktape_task: Starting main loop!
I (11481) wifi: n:8 0, o:1 0, ap:255 255, sta:8 0, prof:1
I (12141) wifi: state: init -> auth (b0)
I (12141) wifi: state: auth -> assoc (0)
I (12141) wifi: state: assoc -> run (10)
I (12191) wifi: connected with aleph, channel 8
D (12191) event: SYSTEM_EVENT_STA_CONNECTED, ssid:aleph, ssid_len:5, bssid:50:0f:f5:88:a2:f1, channel:8, authmode:3
V (12191) event: enter default callback
V (12191) event: exit default callback
D (12201) module_wifi: >> esp32_wifi_eventHandler
D (12201) module_wifi: << esp32_wifi_eventHandler
D (15161) event: SYSTEM_EVENT_STA_GOTIP, ip:192.168.0.179, mask:255.255.255.0, gw:192.168.0.1
V (15161) event: enter default callback
I (15161) event: ip: 192.168.0.179, mask: 255.255.255.0, gw: 192.168.0.1
V (15161) event: exit default callback
D (15171) module_wifi: >> esp32_wifi_eventHandler
D (15171) duktape_event: >> event_newCallbackRequestedEvent stashKey=1
D (15181) duktape_event: << event_newCallbackRequestedEvent
D (15181) module_wifi: << esp32_wifi_eventHandler
V (15191) duktape_task: >> processEvent: eventType=ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED
D (15201) duktape_task: Process a callback requested event: callbackType=1, stashKey=1
D (15201) duktape_task: ESP32_DUKTAPE_EVENT_CALLBACK_REQUESTED: #params: 0
D (15211) log: Now connected as a station! - err: null
D (15211) log: Onwards ... we are now network connected!
D (15221) log: start.js: bootwifi callback arrived ... starting ide
D (15231) log: Module: require("ide_webserver.js") loading "ide_webserver.js"
D (15231) dukf_utils: >> dukf_loadFile: (ESPFS) ide_webserver.js, heapSize=52852
D (15241) espfs: >> espFsOpen: ide_webserver.js
D (15241) dukf_utils: << duk_loadFile: Read file ide_webserver.js for size 5771
D (15521) log: Module: require("http") loading "http"
D (15521) dukf_utils: >> dukf_loadFile: (ESPFS) http.js, heapSize=43468
D (15521) espfs: >> espFsOpen: http.js
D (15521) dukf_utils: << duk_loadFile: Read file http.js for size 8449
D (15851) log: Module: require("url") loading "url"
D (15851) dukf_utils: >> dukf_loadFile: (ESPFS) url.js, heapSize=36784
D (15851) espfs: >> espFsOpen: url.js
D (15851) dukf_utils: << duk_loadFile: Read file url.js for size 2430
D (15961) log: Module: require("fs") loading "fs"
D (15961) dukf_utils: >> dukf_loadFile: (ESPFS) fs.js, heapSize=34556
D (15961) espfs: >> espFsOpen: fs.js
D (15961) dukf_utils: << duk_loadFile: Read file fs.js for size 847
D (16011) modules: >> js_esp32_getNativeFunction
D (16011) modules: - nativeFunctionId that we are looking for is "ModuleFS"
D (16011) modules: << js_esp32_getNativeFunction
D (16021) log: About to start ide_webserver()
D (16021) module_os: >> js_os_socket
D (16031) module_os: New socket fd=0
D (16031) module_os: << js_os_socket
D (16041) module_os: >> js_os_bind
D (16041) module_os: About to call bind on fd=0 with port=8000
D (16041) module_os: << js_os_bind
D (16041) module_os: >> js_os_listen
D (16051) module_os: About to call listen on fd=0
D (16051) module_os: << js_os_listen
D (16061) log: IDE_WebServer listening on port 8000
D (16061) dukf_utils: #C: heapSize=28776
D (16061) log: ESP32 Heap: 28728
V (16071) duktape_task: << processEvent
I (22141) wifi: pm start, type:0

but no ability to enter anything, all I can do is reboot.

@davidmoshal
Copy link
Author

davidmoshal commented May 31, 2019

... and with both the serial port connected, and the browser connected,
I still get nothing when I click 'run' with the default hello world snippet.

If I check the "enabled" check box, then I get this message:

ide.js:52 WebSocket connection to 'ws://192.168.0.179:8002/console' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
createConsoleWebSocket @ ide.js:52
(anonymous) @ ide.js:155
dispatch @ jquery.min.js:3
r.handle @ jquery.min.js:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant