Example on running python3 with boto3 library in WP76 modules

Boto3 is a software development kit (SDK) designed to improve the use of the Python programming language in Amazon Web Services.
Here is an example on how to import Boto3 library in python3 with WP76 module R17 firmware:

1 Like


Have you been able to connect a mangOH yellow device to AWS IOT Core (and publish messages over MQTT)? Can you please guide me on how to do that? I would be really grateful!! Thanks a lot!!

no, i have not tried that
I only show the boto3 can be imported
But I think you should be able to find some boto3 example

1 Like

Hi jyijyi, Can I message you?

Hi @jyijyi , I was trying to follow the steps mentioned in the doc you shared in this post, but a few things I am not able to follow:

I assume this is the python3 source code to be downloaded from python.org website, so I did that (I downloaded Python 3.8.1) and followed the remaining steps, but in the step:

cp -rf /home/root/python3.8/usr/include/* /usr/include

I don’t see a folder usr in the Python directory that I had extracted from the tar:

root@swi-mdm9x28-wp:~# cd Python-3.8.1/
Doc/ Include/ Mac/ Modules/ PC/ Parser/ Python/ m4/
Grammar/ Lib/ Misc/ Objects/ PCbuild/ Programs/ Tools/

This might be a silly question, but I am not sure how Python would work without installation, so I also tried to install:

root@swi-mdm9x28-wp:~/Python-3.8.1# ./install-sh
./install-sh: no input file specified.
root@swi-mdm9x28-wp:~/Python-3.8.1# ./configure --enable-optimizations --with-ensurepip=install
checking build system type… ./config.guess: line 1: command: not found
checking host system type… armv7l-unknown-linux-gnueabihf
checking for python3.8… no
checking for python3… no
checking for python… python
checking for --enable-universalsdk… no
checking for --with-universal-archs… no
checking MACHDEP… “linux”
checking for gcc… no
checking for cc… no
checking for cl.exe… no
configure: error: in /home/root/Python-3.8.1': configure: error: no acceptable C compiler found in $PATH See config.log’ for more details

but it looks like there is no C compiler also on the device to build the source code. Can you please guide me?

Thanks a lot!!

That python3.8.tar is compiled from the yocto source code of R17.
There is no need to download source code from python.org.

If you follow the document in the last session, those python3 and boto3 libraries should be found in

•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.8.13-r0/image/usr
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3/3.8.13-r0/image/usr/lib/python3.8
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3-boto3/1.26.160-r0/image/usr/lib/python3.8/site-packages/
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3-botocore/1.29.160-r0/image/usr/lib/python3.8/site-packages/
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3-jmespath/1.0.1-r0/image/usr/lib/python3.8/site-packages
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3-python-dateutil/2.8.2-r0/image/usr/lib/python3.8/site-packages
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3-six/1.16.0-r0/image/usr/lib/python3.8/site-packages
•	R17_SWI9X07Y_03.01.07.00/yocto/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/python3-urllib3/1.25.7-r0/image/usr/lib/python3.8/site-packages

Actually if you don’t want to compile it, it can directly use the binaries in tar file in your WP76 module with FW R17.

Thanks a lot for your reply @jyijyi
Actually I have WP7702 MangOH yellow device. I am guessing the same procedure should work? I will just need to download the base image from this link instead? -


Instead of this mentioned in the doc’s last session:


Basically I want to publish messages from my mangOH yellow device over MQTT directly to AWS IOT Core. AWS provides a connection kit but that runs only on Python3, and then there might be other challenges. I am willing to compensate for this work/guidance on this. Can I please message you in person?

Wp77 r14.1 or r15 is using kernel 3.18
Wp76 r17 is using new kernel 4.14

I am not sure if it can run, but you can give a try

1 Like

Thanks for the reply @jyijyi
where can I get the following zip file mentioned in the last session of the doc:


I used “pipoe -p boto3 --python python3” in ubuntu 18 PC

Somehow it is still not letting me to use pipoe command, even though I installed it :frowning:

Setting up libpython3.6-dev:amd64 (3.6.9-1~18.04ubuntu1.12) …
Setting up python3.6-dev (3.6.9-1~18.04ubuntu1.12) …
Setting up libpython3-dev:amd64 (3.6.7-1~18.04) …
Setting up python3-dev (3.6.7-1~18.04) …
Processing triggers for man-db (2.8.3-2ubuntu0.1) …
ravneetsingh@RavneetPersonal:~/myWorkspace$ pip3 install pipoe
Collecting pipoe
Downloading https://files.pythonhosted.org/packages/27/79/7b7ebeb35791ee65139a0828adeeb31ba039edda96d9725cff9915127671/pipoe-2019.11-py3-none-any.whl
Collecting pep508-parser==2019.3 (from pipoe)
Downloading https://files.pythonhosted.org/packages/70/d7/56c24c2bb9bce7a9b2c1c4b78b57ad126dcd20bad73fedce3556ceb963c2/pep508_parser-2019.3-py3-none-any.whl
Collecting pkginfo== (from pipoe)
Downloading https://files.pythonhosted.org/packages/e6/d5/451b913307b478c49eb29084916639dc53a88489b993530fed0a66bab8b9/pkginfo-
Collecting Parsley==1.3 (from pipoe)
Downloading https://files.pythonhosted.org/packages/2b/d6/4fed8d65e28a970e1c5cb33ce9c7e22e3de745e1b2ae37af051ef16aea3b/Parsley-1.3-py2.py3-none-any.whl (88kB)
100% |████████████████████████████████| 92kB 238kB/s
Installing collected packages: Parsley, pep508-parser, pkginfo, pipoe
Successfully installed Parsley-1.3 pep508-parser-2019.3 pipoe-2019.11 pkginfo-
ravneetsingh@RavneetPersonal:~/myWorkspace$ pipoe -p boto3 --python python3

Command ‘pipoe’ not found, did you mean:

command ‘pppoe’ from deb pppoe

Try: sudo apt install

ravneetsingh@RavneetPersonal:~/myWorkspace$ python --version
Python 2.7.17
ravneetsingh@RavneetPersonal:~/myWorkspace$ python3 --version
Python 3.6.9

No idea, i can install it

Why don’t you just use the files inside bb_files.zip?

1 Like

I would want to do that ideally! I don’t know where they are! In the doc, there is just an image with no link to download the bb_files.zip file

That is not an image, you need to double click the tar file to get those bb files

Can you give me the link? I am not able to double click on this (It shows as an image which just gets selected on double clicking). This is the doc I am trying to use:

Thanks a lot!!

Did you download the WORD document and open in your PC?

Yes yes. This is how it looks like:


Did you double click it?
It should be ok to open by 7zip or winrar tool

Oh it worked this time! Strange it didn’t open after several attempts at double/triple/multiple clicking the image previously! My apologies for this!!

Perhaps the only change i did was download the file again and click on “enable editing” in MS word this time. Thanks a lot!!