Platformio and nrf52

I Bought 2 rak5005/rak4631, devices which I plan to use as solar powered repeaters.
I soldered an I2C display and dropped some UF2 files, 1.2.60 and 1.2.64 both seem to work, the rak communicates with my other devices.

So far so good, now want to compile the meshtastic source code. For ESP32 it is no problem but for nRF52 Platformio terminates compilation on this error:

src/nrf52/NRF52CryptoEngine.cpp:3:10: fatal error: ocrypto_aes_ctr.h: No such file or directory

  • Looking for ocrypto_aes_ctr.h dependency? Check our library registry!
  • CLI > platformio lib search “header:ocrypto_aes_ctr.h”
  • Web > PlatformIO Registry

The given link does not help, nothing found there.

Who knows the solution ?

on the root of ‘Meshtastic-device’ folder you cloned, run:

git submodule update --init --recursive


co@co-AMD:~/Documents/PlatformIO/Projects/Meshtastic-64$ git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git

create your work folder using:

git clone
(git will clone the repo and create ‘Meshtastic-device’ in your current folder)


cd Meshtastic-device
git submodule update --init --recursive

1 Like

Thank you for your help.

But the command :
git clone

installs version 1.3.10 which I do not want.
I want to stay on 1.2 until 1.3 is stable
You have any other suggestion?, because I still have the error about ocrypto_aes_ctr.h

The says:
major = 1
minor = 3
build = 10

So I assume it is version 1.3.10 and not a 1.2 version

Git branch -a will display all the branches on the repository. Then use git checkout 1.2-legacy to change to the 1.2.x branch.

It must be easy if you know what you are doing.

I only get errors like this :
fatal: not a git repository (or any of the parent directories): .git

I cannot use the simple command ‘git branch -a’ because of lack of understanding.

git can only do its magic inside the ‘Meshtastic-device’ folder. you can clone stright into 1.2.x branch adding -b, like:

git clone -b 1.2-legacy

then, same as before:

cd Meshtastic-device
git submodule update --init --recursive

1 Like

That is the solution, tnx a lot .

PlatformIO is compiling for the nRF52 now

I should have read this: Git - user-manual Documentation
but I probably was to tired last night.

1 Like

I am still very much learning git. As a Windows user I mainly use the GitHub Desktop app which makes life easy for me, but slowly trying to learn how to do things properly.