But, it always gave these error:
c:\users\xxx\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\esp32-psram\no-rtti\bits\gthr-default.h:781:12: error: ‘pthread_mutex_timedlock’ was not declared in this scope
and
Cannot find “C:\Users\xxx\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\nimble”.
Cannot find “C:\Users\xxx\.platformio\packages\framework-arduinoespressif32\tools\sdk\include\husarnet”.
I also try to manually use Arduino IDE but i got either library error such as:
cannot found lwip_connect_r (and anything in lwip with _r)
or error with the compiler
I want to use ESP32-cam to stream image (video), but can also be accessed using different wifi without using another device (like raspy) beside esp32-cam. And after some search i found that it is possible using husarnet, but because i’m still learning in this programming topic so i can only rely to the example first.
I am also experiencing the same, using the Firebeetle ESP32-E. Interestingly enough - I tested the functionality on the same board on 27 March 2022, and it all worked perfectly. Now I’m experiencing the exact same issue - you described.
What I have found is that when I comment out the platform_packages (see below) in the platformio.ini file - the pthread_mutex_timedlock error goes away - only to end up with one error > src/main.cpp:3:10: fatal error: Husarnet.h: No such file or directory
Just a gut feeling, after doing some more investigation - I think that the issue came in when the toolchain xtensa version was upgraded. When I started off with VS Platormio on 27 March 2022, the toolchain xtensa version was 2.50200.9 and the Husarnet functionality with the ESP32 worked.
I see that the toolchain xtensa was upgraded to 8.4.0+2021r2-patch3 on 26 April 2022.
Could this be the reason for the below errors?
c:\users\xxx.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\xtensa-esp32-elf\esp32-psram\no-rtti\bits\gthr-default.h:781:12: error: ‘pthread_mutex_timedlock’ was not declared in this scope?
Just to add, I am experiencing the same problem with husarnet and nimble errors quoted above with the simple basic example at the bottom of https://husarnet.com/docs on the ESP32 tab.
If any have solved the error I’d appreciate if you can drop a hint.
Platformio automatically uses the latest release of https://github.com/platformio/platform-espressif32/releases, and between releases there seems to be a breaking change for previous versions of Arduino Core for ESP32 (used in Husarnet package).
To use older releases, you need to specify the version in platformio.ini:
platform = espressif32@2.1.0
Here’s a full example with ESP32-Cam and GitHub Action workflow that is a proof that the project is building fine:
I have not tested on Mac and Windows so far.
Please let me know whether it works also on your end guys.
Hi Fajar, since you mentioned Windows…Are you using Windows 10?
I have not been able to get a Windows 10 client to join my Husarnet network as yet. A couple things…
The husarnet-gui short cut points to nowhere.
The husarnet command in an Admin command prompt indicates it has an IPV6 assigned but when I take the “husarnet websetup” URL provided to join the network, after giving it a name the browser returns the error re: Unable to join the network.
I have disabled all firewalls/real time protections.
Platform Manager: Installing espressif32 @ 2.0.1
Error: Could not find the package with ‘espressif32 @ 2.0.1’ requirements for your system ‘windows_amd64’
Using a backlevel Platform allows me to compile for one board which has an ESP32. But when I try to build for a newer board that uses the esp32s3, it doesn’t work. I suspect that espressif32@2.0.1 platform is missing lots of newer boards, such as the Heltec Wireless Stick Lite, which use the esp32s3. I am totally stymied how to proceed.
if board = heltec_wireless_stick_lite, I get:
Error: Unknown board ID ‘heltec_wireless_stick_lite’
if board = heltec_wireless_stick and
board_build.target = esp32s3
board_build.mcu = esp32s3
I get:
‘xtensa-esp32s3-elf-g++’ is not recognized as an internal or external command, operable program or batch file.