Is it possible to add websockets primitive on ESP8266 board?

Issue #253 resolved
Tom Ming created an issue

I would like to use websockets lib with D1 mini board.

Is it possible to add websockets primitive on ESP8266 board?

Comments (6)

  1. John Maloney repo owner

    I haven’t tried it. RAM is very tight on the ESP8266 so it depends on how much RAM the websockets library uses both while in use and if not used. If it has a low RAM footprint when not in use we could make it available on the ESP8266.

    You or Wenjie could tweak the #ifdefs in netPrims.cpp to enable Websockets and do some testing…

  2. Wenjie Wu

    Note that in many of microblocks' comm libs, loop is implicit. Just start WebSocket server, the client cannot connect to it and needs to start loops (e.g. primWebSocketLastEvent). This may be puzzling. I made a demo for newbies, it might be a good idea to start with a scaffold.

    ps: the loop in the comm lib is very much like the Morphic step

  3. John Maloney repo owner

    I tested this. Unfortunately, just enabling Websockets on an ESP8266 makes normal HTTP calls unstable (due to lack of RAM, I think).

    If you need websockets, please use an ESP32.

  4. Log in to comment