I'm exploring the Espruino command line tool for uploading my sketches to an ESP8266 via this NPM module and so far its been great/intuitive.
I'm using the command line instead of the Web IDE as I prefer to modularise my code, edit it within Atom.io and run tools like eslinting etc.
Exploring the IDE however I have found its possible to upload sketches over wifi using the "Connect over TCP Address" option (see here for details) and wondered how this is achieved?!
While the Espruino module claims "it is used directly by the Espruino Web IDE" I don't see anyway within the code to connect via TCP (c.f. the port option).
Thanks for any help in advanced. I understand this is a rather niche use of the Espruino. The aim would be to allow for wireless updates
Footnote: Espruino has blown my mind. After working with Arduino and all its amazingness, I feel like Espruino has opened up a whole new world so cudos to everyone involved!!
The connect over tcp is using the telnet port 23 - so you could use anything that sends over telnet to send to the board.
It doesn't look like the Npm module supports this - only serial and ble.
It could be modified to open a tcp socket on port 23 and send and receive on that...
Yeah, the socket support is based on Chrome's socket API, which is different from Node's API.
Modifying https://github.com/espruino/EspruinoTools/blob/gh-pages/core/serial_socket.js or creating a new file that used Node's sockets wouldn't be too painful for someone to do though.
Either that or as @Wilberforce suggests, use -o to output to a temporary file, then use telnet to push it to the ESP8266
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem