Error Building Firmware

I am trying to compile the IoTaWatt firmware using the latest vscode and platformIO. I have ran into issues with platformIO not finding the Crypto@0.1.3 library. Is there a specific PlatformIO version that needs to be used? There error received is:

LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing Crypto @ 0.1.3
Library Manager: Warning! More than one package has been found by Crypto @ 0.1.3 requirements:
Library Manager: - rweather/Crypto@0.4.0
Library Manager: - intrbiz/Crypto@1.0.0
Library Manager: - operatorfoundation/Crypto@0.4.0
Library Manager: - mbed-feb11/Crypto@0.0.0+sha.f04410cef037
Library Manager: - mbed-geremia/Crypto@0.0.0+sha.4399e2e6260b
Library Manager: Please specify detailed REQUIREMENTS using package owner and version (shown above) to avoid name conflictsWarning! Could not find the package with ‘Crypto @ 0.1.3’ requirements for your system ‘windows_amd64’

Any insight would be much appreciated! Thanks!

I currently use 0.4.0, but any subsequent version should work. IoTaWatt uses pretty basic crypto.

I have been able to get it to build using the rweather/Crypto@0.4.0 library. However it looks like CBC.h is no longer in that library. For that I also included obsttube/CryptoAES_CBC@1.0.0 as it is an upload of the older rweather/Crypto library before CBC.h was removed.

Are you able to use just the Crypto@0.4.0 library on its own?

Sorry, When I check the libdeps I was looking at the ESP32 project which is using 0.4. The ESP8266 still uses 0.1.3.

The code uses SHA256, Ed25519 (verify signature), MD5 and it alsouses CBC (AES128) to encrypt Emoncms. I don’t need to encrypt Emoncms in the ESP32 version because it supports TLS (HTTPS).

I have had 0.1.3 installed for years and found no need to upgrade. That’s the big advantage of PlatformIO - you can control versions. Here is the 0.1.3 version from .platformio.lib.Crypto_ID1168. Not sure if you can just drop it in, but worth a shot.

Crypto_ID1168.zip (262.3 KB)

I know this was from 6 months ago, and you probably have it working by now, but I figured I’d leave this for posterity sake. Version 0.1.3 no longer exists in the Platformio artifact repositories. The only versions available now are 0.2.0 and 0.4.0. Both of those versions, however, have had the CBC.h libraries removed, as they are deprecated. To overcome this, there is another library that adds them back in. So, my Platformio.ini file changes Crypto to:

Crypto@0.4.0
CryptoAES_CBC@1.0.0

I was able to build just fine after that.

I also needed to change the
mcspr/toolchain-xtensa @ 5.100200.201223 line to
platformio/toolchain-xtensa@^2.100300.220621
since I was building on Windows instead of mac.