Skip to content

Feature Request: the inclusion of professionally constructed websocket server and client WiFi and Ethernet examples in Arduino Pro. #602

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

Open
hpssjellis opened this issue Dec 28, 2022 · 3 comments

Comments

@hpssjellis
Copy link
Contributor

Feature Request: the inclusion of professionally constructed websocket server and client WiFi and Ethernet examples in Arduino Pro.

As the use of microcontrollers in IoT continues to grow, there is an increasing demand for fast and secure data transfer both over the internet and within local networks. Providing websocket examples in Arduino Pro would allow users to more easily implement these features in their projects and meet the growing demand for secure and fast data transfer in IoT systems. (Generated by ChatGPT)

I have already hacked together some forms of solutions to at least the WiFiSSLClient side of websockets using the Arduino Portenta in these 2 closed issues:

#599
#589

but my solutions have a few minor issues which Arduino could tidy. I would be willing to help where I can.

@hpssjellis
Copy link
Contributor Author

I am going to leave this issue open, as I do not know how to make a websocket server, but I have got working the WiFiSSLclient as a websocket. I had to actually do a fair bit of the work to get it going. My "Portenta Pro Community Solutions" library release version 0.9.3 has a few examples of working websockets in the dot36 area.

The best example is probably dot364 here.

@hpssjellis
Copy link
Contributor Author

@facchinm Arduino MBED doesn't seem to have a WiFiSSLServer library in the WiFi library at

https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/WiFi/src or in the socketWrapper libarary at

https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/SocketWrapper/src

does that mean there is no point my trying to make a websocket SSL server at the moment? I am reasonably happy with my WiFiSSLClient websocket examples at

https://github.com/hpssjellis/portenta-pro-community-solutions/tree/main/examples/dot3-portenta-vision-shields/dot36-camera-png-to-web

@facchinm
Copy link
Member

facchinm commented Jan 5, 2023

@hpssjellis acting as an SSL server is not trivial, especially setting up the CA chain. Since all the infrastructure is based on mbedtls, porting something like https://github.com/Mbed-TLS/mbedtls/blob/master/programs/ssl/ssl_server.c should be feasible, but the default wrapper (TLSSockerWrapper) can't be used out of the box (listen() and accept() are not implemented https://os.mbed.com/docs/mbed-os/v6.15/apis/secure-socket.html )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants