Sockets and MQTT now on Espruino! #115
Replies: 9 comments
-
Posted at 2014-11-20 by @gfwilliams Just thought I'd also mention that you can now create a telnet server that allows remote access to Espruino's console, letting you write (and debug) code over the net!
This still needs work (coping with disconnects, multiple connections, and some attempt at a password), but it shows what can be done! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-11-21 by DaveNI I really want to get going with this but have been put off getting a wiznet device because of the delivery cost to UK. I'm planning to wait until I have a few items to order and get them all at once from Mouser (delivered from US). Does anyone know of a better source (hopefully within UK, free delivery?) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-11-21 by 4jochen Thanks Gordon for the nice work on the "Internet I/F". |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-05 by mhoneywill I notice that Espruino uses the WIZnet WIZ550io module containing a W5500 chip. There is another module on the Wiznet website Do you know if the current library will work with this chip? I like the idea of the smaller module, shame it costs half the price of the module to get it shipped. Although in the UK RS do supply them see http://goo.gl/itfy4O |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-08 by @gfwilliams I'm afraid that right now Espruino won't work with anything except the W5500 chip. It shouldn't actually be a big deal to use the W5200 instead (and someone was looking at this) - it'd require a recompile of the binary though. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-12-10 by mhoneywill Here is a message I got from Wiznet, looks like the W5500 is the more modern chip. Shame there isn't a small module.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-08 by user47006 Hello, are there any plans to make this work with the ESP8266? Thx |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-08 by @gfwilliams Yes, it should 'just work'. Have you tried it and had problems? The whole idea of the network API is that the same code can be run on any network device - ESP8266, W5500, CC3000, and even (thanks to @net-tobi) GSM |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-10-19 by Kolban Just tested the MQTT module on a very early version of Espruino on ESP32 and it worked first time without incident. Nice!!! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-11-20 by @gfwilliams
As the Espruino Pico KickStarter has now crossed the stretch goal for the implementation of sockets, I thought I'd better have a go at implementing them.
I had a dig around yesterday and found an old branch, and an hour ago I actually managed to get a socket API working... And now, I have a very simple piece of code that publishes the temperature via MQTT:
This is obviously pretty basic, but hopefully I'll get some better examples built up over time - maybe using the MQTT library on NPM (but the 11 source files there do make me wonder if it'll ever fit in a microcontroller!).
This should work with the latest build when it gets automatically uploaded in an hour or so, on Espruino boards with both CC3000 WiFi and WIZnet wired Ethernet.
And just to show that it does actually work on the KickStarter board - although this one is a very early prototype:
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions