I would like to ask an expert on Teltonika / OpenWRT to comment on this question and as to whether this is possible or not.
My goal:
To use the AWS IoT Device SDK for Python on the Teltonika RUT956 so that I can integrate with the AWS IoT Shadow service.
The problem:
To use the AWS IoT Device SDK it requires using the AWS Common Run Time (AWS CRT) for Python.
This cannot be directly installed from OPKG or even PIP because I believe it depends on C libraries that need to be compiled and I don’t know if this can be done or how. I would assume maybe it can be compiled somehow into Teltonika firmware SDK? I have no idea.
Alternative solution:
I am aware that I could use the “raw” SDK together with library like Paho MQTT and achieve an outcome. However, the AWS IoT Device SDK provides a lot of the implementation and best practices out of the box in Python, which I would like to leverage so that I don’t have to re-invent the whole MQTT messaging process myself.
My equipment:
Teltonika RUT956
Storage extended on USB flash memory
What have I tried:
I installed the Python module
I also installed the OPKG modules for AWS Boto Core and AWS SDK (but I don’t think these are necessary or related to this issue or question)
I tried installing using PIP:
python3 -m pip install awsiotsdk
However, the awscrt
package is 30+mb and I think the Teltonika takes hours to download and extract this and then it will most likely fail anyway because there is a dependency on CMAKE and other compilation tools which are not available on OpenWRT.
Is there a way to build the awscrt
Python package into the Teltonika firmware?
I would like to ask Teltonika experts if building the AWS Common Run Time would be possible so that it becomes a Python module that I can import in a Python script. The AWS CRT is based on C as in the previously provided Github link.
I have no idea how to even begin trying to manually build such a thing into the Teltonika firware. If someone could comment if that’s even possible or if there is a clear blocker due to some dependency issue or architecture not being supported.