• As work progresses on the port to the ESP32, we are starting to look at networking. The ESP32 provides an implementation of the BSD Sockets APIs and so far, sniff tests seem to show that the network/linux implementation of the network layer is working out just fine for ESP32. From what I can tell by looking through some code, there was once thought of a network type called "JSNETWORKTYPE_SOCKET" which appears to map to the "network/linux" implementation.

    Might this be a good time to think about the broader story? Is this an opportunity to rework the naming across a number of boards?

  • That sounds great to me - the less duplication the better!

    So does this mean that the previous callback-based handling of sockets on ESP8266 has disappeared?

  • Yes ... the ESP32 supplies what appears to be a full implementation of BSD Sockets which, from all sniff tests appears to be working without incident. The ESP32 is a completely new story from the ESP8266. ESP32 is fully based on FreeRTOS, provides sockets APIs and has a whole new hardware interface/driver technology. The system level APIs are mostly distinct as well. If your time permits, it would be wonderful if you could tune in from time to time to the Espruino on ESP32 development gitter channel found here ... https://gitter.im/espruino/esp32 Thats where the day to day technical chat is happening.

  • Ok, great - that makes life a lot easier! Although I guess long-term you might want some separate thread handling network IO (it'd need some changes to the network stack). Because the network is only handled on idle, if you do while(1); then it'll never hit idle, and it wouldn't be able to read a Ctrl-C from the network to break out.

    I'm afraid I just don't have time at the moment - I've got a lot of work to do on Puck.js, as well as a bunch of consultancy work that I'm just not managing to find time to get done.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Suggestion: Rework and rename of network/linux to network/sockets

Posted by Avatar for Kolban @Kolban

Actions