Esp32 driver for mbedtls problem occured

Dear members,

I had problem about using esp32 driver for mbedtls on STM32 Nucleo
Source code is below,
https://os.mbed.com/teams/Renesas/code/ … mple-wifi/

I migrated to STM32 board and seems to be good to communicate with esp32

however, the error occurred at reset(),

Could you let me know if you have any information ?

the message is:

++ MbedOS Fault Handler ++

FaultType: HardFault

Context:
R0 : FFFFFFFF
R1 : 00000000
R2 : 20001E8C



++ MbedOS Error Info ++
Error Status: 0x80FF013D Code: 317 Module: 255
Error Message: Fault exception
Location: 0x80144E1
Error Value: 0x8019292
Current Thread: Id: 0x20002270 Entry: 0x8014E11 StackSize: 0x200 StackMem: 0x200022F8 SP: 0x20017EB0
For more info, visit: https://armmbed.github.io/mbedos-error/ … 0x80FF013D
– MbedOS Error Info –
Regards,

I think the esp32-driver in the example project is out-of-date.
You can use latest version of this in the ArmMbed GitHub.

cd mbed-os-example-wifi
mbed remove esp32-driver
mbed add https://github.com/ARMmbed/esp32-driver

Dear Toyama san

Thank you for your quick reply.

I’m not familiar with mbed environment.

Could you let me know how to update on online compiler ?
Because, I want to export the package for Keil IDE.
or if it’s possible to do with CUI, please let me know how to do together.

Best regards

Hi Shimizu-san,

Sure. Please follow the steps below.

  1. Remove existing library
  • Right click the esp32-driver icon
  • Select Delete…

  1. Add new library from GitHub
  • Right click your project
  • From pop-up menu, [Import Library…] - [From URL]

  1. Enter URL and import
  • Put the GitHub URL in the “Source URL:” field
  • Press “Import” button to import new library

Hi Toyama san

Thank you for your kind explanation.
I understood.
However, (added) esp32 driver not get valid,
maybe, after updating, driver/mbed-os , any configuration for driver or anything is missing.

If you have any notice, please let me know.

Best regards

Hi Shimizu-san,

The mbed-os version of this example code is also out-of-date (5.10.4).
You can update the mbed-os version as well.

Then, you can see some compile errors in the main.cpp, because Socket APIs has been changed between 5.10 and latest 6. I have quickly fixed this and posted here:

1 Like

Hi Toyama san

I’m sorry that I missed notified mail.

I also noticed the reason from error message.
So I just wanted to know what you mentioned and highly appreciate your “main.cpp” update.
At last, the code run well thanks to your kind help.

Best regards,

BTW
Originally, I would like to use cURL, however, I cannot find any solution. (Now, struggling creation command payload with JSON format)

If you have any information about cURL for mbed or equivalent solution,
please let me know.

Best regards

Hi

I don’t know about curl on mbed, but you can find some json parser code.

https://os.mbed.com/search/?q=Jason#gsc.tab=0&gsc.q=json%20parser&gsc.sort=

Thank you for your quick reply.

Thank you..