-
Can you please advise on how pycryptodome can be compiled (Python)? I was able to read BLE Advertisements through an Ai-Thinker TB-03F-KIT module connected via USB (/dev/ttyUSB0, Driver=ch341, At the moment we only have pycrypto compiled, which does not support AES.MODE_CCM. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
You habe to add this llike the other pythong things in /make/libs/python-* |
Beta Was this translation helpful? Give feedback.
-
It's really hard for me to understand :-(. I think the configuration should need a directory under freetz-ng/tree/master/make/pkgs, e.g., python-pycryptodome. Then I need to create:
Really so complex? |
Beta Was this translation helpful? Give feedback.
-
You have simplified it, but yes And test it with |
Beta Was this translation helpful? Give feedback.
-
Adding a Python module is too complex, it is unclear how to cross-compile a Python wheel. Trying to understand how it was done for some packages, I checked commits that were made many years ago, nothing recent. Besides the device does not have a compiler (you need to cross-compile into some other place). Also Python is the old 2.7. I give up. Maybe calling C functions from Python is easier. While the standard build of the firmware works, if I create a new project I cannot even get the cross-compiler to produce an executable that the device can run. For instance, I have freetz-ng installed in
Which is the right syntax to compile it so that the executable, when moved to the device, runs there? Also, how this function (my_function.c) can be compiled to create my_function.so running on the device?
|
Beta Was this translation helpful? Give feedback.
-
I never did this, maybe you find some docs if you search for it |
Beta Was this translation helpful? Give feedback.
-
Perhaps I found the answer:
import ctypes
so_file = "./my_function.so"
my_library = ctypes.CDLL(so_file)
my_library.square(4)
|
Beta Was this translation helpful? Give feedback.
Perhaps I found the answer: