Elastor Carrier on Raspberry Pi

(Anders Alm) #1

Im trying to install Elastos Carrier on my Raspberry Pi.

So far I have followed this guide on github: elastos/Elastos.NET.Carrier.Native.SDK#5-cross-compilation-for-raspberry-pi

This left me with a 1.2mb file “elastos-carrier-5.1.71c4af-rpi-arm-Debug.tar.gz” which I sent to my Raspberry P.
However it looks incomplete or wrong.

When I untar, it has only 3 folders: bin, include and lib.
The bin folder has the executables test-pseudotcp and test-pseudotcp-fin and neither of them work:

./test-pseudotcp: error while loading shared libraries: libcrystal.so: cannot open shared object file: No such file or directory

./test-pseudotcp-fin: error while loading shared libraries: libcrystal.so: cannot open shared object file: No such file or directory

Please help :upside_down_face:

1 Like
(Peter Strauss) #2

The native carrier can only be used via the terminal by executing the files elashell.sh or elatests.sh, however these files are not generated when cross-compiling (eg. compiling on Linux OS for use on Raspbian).

I have opened an issue on GitHub in december when trying to create the elashell and elatests files: https://github.com/elastos/Elastos.NET.Carrier.Native.SDK/issues/143

I remember running into other issues when trying to compile on the Raspberry, but I have not tried since. If you do, please let me know if compilation on the raspberry was possible.

The files test-pseudotcp and test-pseudotcp-fin are used for testing within a script (I think by elatests.sh) and cannot be executed separately.

1 Like
(Anders Alm) #3

Thanks for your reply.

I opened a new issue here: Elastos.NET.Carrier.Native.SDK/issues/173 (sorry cant post links)

Cmake worked, but not make so far.

(Anders Alm) #4

Got it up and running now!

The workaround was “replace “x86_64-unknown-linux-gnu” with “armv7l-unknown-linux-gnueabihf” around line144 in deps/pjsip/CMakeLists” until they get this fixed.

Check the issue previously mentioned for more details

(Kevin Zhang) #5

Hi Anders, have you tried running carrier node inside a docker container? I know Clarence made the docker images. we should just recompile to ARM ISA and it should work. I have not tried, but would like to hear from you first.

(Anders Alm) #6

Hi Kevin.

I was able to run it with docker based on this: https://github.com/elastos/Elastos.NET.Carrier.Native.SDK/blob/master/docker/HOWTO.md

docker run -tiv ~/elastos-carrier-5.1.2f09cc-linux-armv7l-Debug:/home/elastos/Projects --tmpfs=/tmp elastos-dev /bin/bash

PS: I dont have much experience with docker.

EDIT: Its working now

(Kevin Zhang) #7

Hi Anders,

Thank you for your reply.
May I know why you are using Raspberry Pi running Carrier? What kind of project are you working on?
I am working on the next generation Digital Capsule on Elastos, I am working on a POC using raspberry Pi, just want to connect with you so that we can share some experiences together. my email [email protected]

(Anders Alm) #8

Hi Kevin,

Im just using it for fun and to get more familiar with the tech. Still have a lot to learn.
No concrete project yet, but I have some ideas for one or more future projects.

Digital Capsule sounds very interesting. Would this be encrypting files on Hive/IPFS where access is managed by smart contracts?

(Kevin Zhang) #9

Digital capsule is a pretty big project. It is hard to explain in few sentences. I am writing something but it takes some time. There are too many moving parts at this moment, need to solid before release the idea.
Basically it is encrypted data wrapped by code which will be executed with smart contract. So what you explained is correct. More than that, the wrapped code need to leverage smart contract to detect the running environment is a trusted execution envrionment before it ask for the unlock key. The hardest part is here, how it can know the environment is trusted? That is what I am working on.

(Kevin Zhang) #10

You can find my article here in linkedin. Hopefully I can write one article every 2 days.
If the link does not work to you please let me know

(Anders Alm) #11

The link works, thanks.

Looks like Elastos DMA is doing something similar with their “Digital copyright-ed content”:

“The digital content, such as e-book, music, pictures, documents, can be managed by DMA framework’s digital asset controller. The controller features several smart contracts defining the rights and duties as well as profit distribution mechanisms.”