-
Notifications
You must be signed in to change notification settings - Fork 833
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
[Bug]: wolfssl_server.ino doesn't even compile for ESP32 boards #6360
Comments
Hello @BojanJurca and thank you for taking a look at wolfSSL for the Arduino and pointing out this problem. I've been able to reproduce the error you are seeing. In my case, the first thing I did was try the default Espressif user_settings.h. This is not the file to use for Arduino. I followed the instructions on the wolfSSL with Arduino page. Although mentioned in the README there, I could not find a suitable The setup instructions for Arduino appear to a be a bit dated. I'll be working on tiding that up. For now, please be aware that in order to get things working, I needed to manually copy some source files from Using the Arduino environment for the ESP32, although possible, presents itself with a variety of challenges. Have you considered using the ESP-IDF? See the Espressif examples. Note that some of the examples no longer require a wolfSSL install process. For example, the wolfssl_benchmark is ready to go immediately upon cloning. I still need to update the TLS client and server examples. You'll notice that much of the work I do uses the VisualGDB extension for Visual Studio - basically a nice IDE on top of the Espressif ESP-IDF. This is a quite productive environment for me, but purely optional. I also use the Tigard JTAG for single-step debugging. (see my notes). Of course, there are many other environments and editors, such as VSCode, and more. If you definitely do not want to use the Espressif ESP-IDF, then perhaps you'd be interested in the Visual Micro Arduino Extension for Visual Studio. In any case, the Arduino examples definitely need to be fixed up a bit. Thanks again for bringing this to our attention. |
Hello @BojanJurca ! Good news! There's an Official Arduino wolfSSL coming soon to the integrated Arduino Library Manager!! The first release from the new Arduino-wolfSSL repository can be found here: https://github.com/wolfSSL/Arduino-wolfSSL/releases/tag/5.6.6-Arduino.1 I believe this release fixes all the problems encountered in the 3rd party library that had been published during the absence of any other wolfSSL Arduino library. Details of the new library publishing issues can be found in wolfSSL/Arduino-wolfSSL#1. TL;DR: The problems were extra files that cannot currently be excluded from the Arduino build process. Since this is a Moving forward, we'll have full support and more boards tested. See also #7177 specifically related to the ESP32 Arduino Examples. I hope you'll give this new library a try and let me know how it goes. Cheers |
Thank you very much. I tried the Arduino wolfssl_server example with my ESP32 board. It compiles now with some minor modifications (file is attached), but it doesn't really work. My ESP32 often crashes, even if there is no client trying to connect (please see console output) or when curl -k https://10.18.1.111/ command is executed. Console output:
|
Hello @BojanJurca and thank you so much for taking the wolfSSL on the Arduino for a test drive!
Ah yes, let's address each item separately:
Yes, the required-but-missing
What do you think; Any recommendations?
I've seen this when the exact model number of the ESP32 was not selected in the Arduino IDE and appropriate configuration parameters not set properly. For instance, the difference between the Although Arduino does a wonderful job on their own Arduino boards, needing to manually know and assign parameters on these other boards has been a bit more challenging. The I've been able to get both the client and server examples to work in as little as 32KB. Were you able to eventually resolve the error and get the code to run?
As for the default ports: I believe that should work with cURL, although I've only tested with wolfSSL clients & servers. I'll be taking a closer look at this in the coming days to confirm it works properly. Certainly the
The SSID and password is simply an oversight on my part & will be corrected in the next version. I appreciate you pointing this one out:
I missed this when I first replied here. Regarding the WiFi suggestions, yes, good point: Check out the latest WiFi code, that I think already addresses your suggestion.
Please see wolfSSL/Arduino-wolfSSL#6 for the latest version of wolfSSL for Arduino. Thanks again for trying this out. I'd like to make sure this is all working for you. Let me know how I can help. |
I believe the Arduino examples are considerable more robust at this point. Please open a new issue if any additional problems are encountered. See also: https://www.wolfssl.com/getting-started-with-wolfssl-on-arduino/ https://github.com/wolfSSL/wolfssl/tree/master/IDE/ARDUINO |
Contact Details
[email protected]
Version
5.5.4
Description
https://github.com/wolfSSL/wolfssl/blob/master/IDE/Espressif/ESP-IDF/user_settings.h
Reproduction steps
I managed to get rid of some compile-time errors, like #error and missing #include files, but than many others occur ...
Relevant log output
The text was updated successfully, but these errors were encountered: