-
Notifications
You must be signed in to change notification settings - Fork 44
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
ESP32 support #7
Comments
I don't actually know what the difference is between ESP32 and ESP8266. I haven't done much work in micropython lately. In general this entire codebase could probably do with updating to be consistent with the most recent versions of micropython, in terms of using asyncio, etc. |
There isn't any difference between the Python API for networking on the ESP32 and the ESP8266 far as I can tell. socket.io, on the other hand, is a layer of protocol that sits on top of websockets and it requires code on both the client and the server side. In principle someone who knows what they are doing could get a Python socket.io client running over this websocket implementation on an ESP32. |
Thanks for your answers! @carterw - I will try to use this socket.on on websockets for ESP8266 on my ESP32... Do you have recommendation for the easiest way to start a testing-server, to test my client? =) |
Thanks Carter. I did write a socket.io implementations years ago. Tested against Python and the node reference implementation. Again the code is nearly 2 years old and I haven’t been keeping it up to date, so I don’t know how well it works against latest uPython. Send PRs :) |
I use node.js for everything on the server side (JavaScript on the server). I did successfully experiment with this socket.io package, it includes a JavaScript client that you can pull in to a browser app. It works. They communicate and you can send messages back and forth between browser app and server that trigger events on both sides. If it were me, and seeing as how I have a working example on both ends, I would look at the JavaScript client code and try to port it to MicroPython as a first attempt. If you are seeing a good socket.io Python client that works with a server implementation and you can make it run, that might be a better place to start. |
Sounds very useful. The ESP32 devices don't have a lot of memory and I have found that it is hard to cram network infrastructure in there and still have enough room to run significant application code. I have some event-driven client code that runs on a modified version of your repository here and had to be careful to make it all fit. |
You could try to get one of those modules with extra PSRAM. On the other hand if you are doing everything with javascript, I heard there was now embedded js for esp too. |
There are modules available with more memory for sure, but I am resisting moving to them because they are larger and more expensive. What I do now is make pared-down custom firmware for specific application use cases rather than attempt to have a large general-purpose image. |
Hi,
I'm looking for a socket.io client for ESP32.
How complicated would it be to adapt this project to ESP32? (estimations regarding what's there to do...)
=)
thanks
The text was updated successfully, but these errors were encountered: