Skip to content
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

SDK is missing on 3.0.0-alpha1 #8746

Closed
1 task done
orkungedik opened this issue Oct 9, 2023 · 10 comments
Closed
1 task done

SDK is missing on 3.0.0-alpha1 #8746

orkungedik opened this issue Oct 9, 2023 · 10 comments
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Type: Question Only question

Comments

@orkungedik
Copy link

orkungedik commented Oct 9, 2023

Board

ESP32C313

Device Description

DevkitC

Hardware Configuration

No

Version

latest master (checkout manually)

IDE Name

Arduino IDE

Operating System

Windows 11

Flash frequency

80 Mhz

PSRAM enabled

yes

Upload speed

921600

Description

Hi,

As far as I am not wrong SDK is not exits under \AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha1\tools so that compiler is generating bunch or errors, below;

c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
74 | mbedtls_md5_starts_ret(&_ctx);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_starts
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp:75:3: error: 'mbedtls_md5_update_ret' was not declared in this scope; did you mean 'mbedtls_md5_update'?
75 | mbedtls_md5_update_ret(&_ctx, data, len);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_update
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp:76:3: error: 'mbedtls_md5_finish_ret' was not declared in this scope; did you mean 'mbedtls_md5_finish'?
76 | mbedtls_md5_finish_ret(&_ctx, _buf);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_finish
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncEventSource.cpp: In member function 'void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage*)':
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncEventSource.cpp:188:7: error: 'ets_printf' was not declared in this scope; did you mean 'vswprintf'?
188 | ets_printf("ERROR: Too many messages queued\n");
| ^~~~~~~~~~
| vswprintf
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp: In constructor 'AsyncWebSocketResponse::AsyncWebSocketResponse(const String&, AsyncWebSocket*)':
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp:1262:3: error: 'mbedtls_sha1_starts_ret' was not declared in this scope; did you mean 'mbedtls_sha1_starts'?
1262 | mbedtls_sha1_starts_ret(&ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_sha1_starts
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp:1263:3: error: 'mbedtls_sha1_update_ret' was not declared in this scope; did you mean 'mbedtls_sha1_update'?
1263 | mbedtls_sha1_update_ret(&ctx, (const unsigned char*)key.c_str(), key.length());
| ^~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_sha1_update
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp:1264:3: error: 'mbedtls_sha1_finish_ret' was not declared in this scope; did you mean 'mbedtls_sha1_finish'?
1264 | mbedtls_sha1_finish_ret(&ctx, hash);
| ^~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_sha1_finish

Best regards,

Orkun Gedik

Sketch

#include "WebAuthentication.h"
#include <libb64/cencode.h>
#ifdef ESP32
#include "mbedtls/md5.h"
#else
#include "md5.h"
#endif

static bool getMD5(uint8_t * data, uint16_t len, char * output){//33 bytes or more
#ifdef ESP32
    mbedtls_md5_context _ctx;
#else
    md5_context_t _ctx;
#endif
  uint8_t i;
  uint8_t * _buf = (uint8_t*)malloc(16);
  if(_buf == NULL)
    return false;
  memset(_buf, 0x00, 16);
#ifdef ESP32
  mbedtls_md5_init(&_ctx);
  mbedtls_md5_starts_ret(&_ctx);
  mbedtls_md5_update_ret(&_ctx, data, len);
  mbedtls_md5_finish_ret(&_ctx, _buf);
#else
  MD5Init(&_ctx);
  MD5Update(&_ctx, data, len);
  MD5Final(_buf, &_ctx);
#endif
  for(i = 0; i < 16; i++) {
    sprintf(output + (i * 2), "%02x", _buf[i]);
  }
  free(_buf);
  return true;
}

Debug Message

c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp: In function 'bool getMD5(uint8_t*, uint16_t, char*)':
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
74 | mbedtls_md5_starts_ret(&_ctx);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_starts
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp:75:3: error: 'mbedtls_md5_update_ret' was not declared in this scope; did you mean 'mbedtls_md5_update'?
75 | mbedtls_md5_update_ret(&_ctx, data, len);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_update
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\WebAuthentication.cpp:76:3: error: 'mbedtls_md5_finish_ret' was not declared in this scope; did you mean 'mbedtls_md5_finish'?
76 | mbedtls_md5_finish_ret(&_ctx, _buf);
| ^~~~~~~~~~~~~~~~~~~~~~
| mbedtls_md5_finish
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncEventSource.cpp: In member function 'void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage*)':
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncEventSource.cpp:188:7: error: 'ets_printf' was not declared in this scope; did you mean 'vswprintf'?
188 | ets_printf("ERROR: Too many messages queued\n");
| ^~~~~~~~~~
| vswprintf
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp: In constructor 'AsyncWebSocketResponse::AsyncWebSocketResponse(const String&, AsyncWebSocket*)':
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp:1262:3: error: 'mbedtls_sha1_starts_ret' was not declared in this scope; did you mean 'mbedtls_sha1_starts'?
1262 | mbedtls_sha1_starts_ret(&ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_sha1_starts
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp:1263:3: error: 'mbedtls_sha1_update_ret' was not declared in this scope; did you mean 'mbedtls_sha1_update'?
1263 | mbedtls_sha1_update_ret(&ctx, (const unsigned char*)key.c_str(), key.length());
| ^~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_sha1_update
c:\Users\OneDrive\Documents\Arduino\libraries\ESP_Async_WebServer\src\AsyncWebSocket.cpp:1264:3: error: 'mbedtls_sha1_finish_ret' was not declared in this scope; did you mean 'mbedtls_sha1_finish'?
1264 | mbedtls_sha1_finish_ret(&ctx, hash);
| ^~~~~~~~~~~~~~~~~~~~~~~
| mbedtls_sha1_finish

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@orkungedik orkungedik added the Status: Awaiting triage Issue is waiting for triage label Oct 9, 2023
@me-no-dev
Copy link
Member

sdk is still there. It is renamed to esp32-arduino-libs and is installed as package. Did you run tools/get.py?

@orkungedik
Copy link
Author

orkungedik commented Oct 9, 2023

This is an ArduinoIDE 2.2.1 problem, I guess. Thank you.

@VojtechBartoska VojtechBartoska added 3.0 migration issue relates to migration from 2.X to 3.X version Type: Question Only question and removed Status: Awaiting triage Issue is waiting for triage labels Oct 16, 2023
@supersebbo
Copy link

I am still encountering this issue even after running python3 get.py

Is there a workaround?

@kklmn
Copy link

kklmn commented Apr 4, 2024

Hi @orkungedik,
I have exactly same error messages. What was your resolution when you 'completed' the issue?
Thanks!

@Marczello00
Copy link

Marczello00 commented Apr 17, 2024

Have you tried changing functions in the source code in files where errors show up to recommended ones? For me it worked but I am using PlatformIO

@khawajamechatronics
Copy link

Hi
I have exactly same error messages. Using Arduino IDE.
Thanks!

@lbernstone
Copy link
Contributor

Arduino 3.0.0 uses a new version of the SDK. There are breaking changes. The underlying mbedtls API has changed.

@Kv603
Copy link

Kv603 commented May 7, 2024

Not being willing to wait for a new release of ESP_Async_WebServer leveraging the new mbedtls API, I tried Marczello00's idea, which at least got me a compiled binary.

I ran into some other unrelated incompatibility-related PANIC's, long before my program got anywhere into the crypto libraries.

@orkungedik
Copy link
Author

Hi @orkungedik, I have exactly same error messages. What was your resolution when you 'completed' the issue? Thanks!

Update ESP32 to 3.0.2

1 similar comment
@orkungedik
Copy link
Author

orkungedik commented Jul 5, 2024

Hi @orkungedik, I have exactly same error messages. What was your resolution when you 'completed' the issue? Thanks!

Update ESP32 to 3.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Type: Question Only question
Projects
None yet
Development

No branches or pull requests

9 participants