External binary/lib C++

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
montyx
Posts: 3
Joined: Sat May 09, 2020 6:12 pm

External binary/lib C++

Post by montyx » Sat May 09, 2020 6:16 pm

Hey guys!
My question can be generic, but I describe my issue.
I really need a classic Bluetooth function in my ESP32 codebase. I've read in the ESP32 documentation that, the MP is built on-top of ESP-IDF.
Is there any way, to write my functionality with ESP-IDF framework, and use it from my MP codebase?
Or this should be much more better, if I could use the arduino bluetooth library of ESP32.
Is there any way to use external binaries or C++ libs?

Thanks a lot

zeilenschubser
Posts: 1
Joined: Sat May 09, 2020 10:22 pm

Re: External binary/lib C++

Post by zeilenschubser » Sat May 09, 2020 10:32 pm

Have a look at
  1. how Arduino does it / Look here too
  2. The SPP-Interface of the ESP-IDF Stack:
  3. The Bluedroid Implementation in the esp-idf
Feel free to then pullrequest your module!

montyx
Posts: 3
Joined: Sat May 09, 2020 6:12 pm

Re: External binary/lib C++

Post by montyx » Sun May 10, 2020 10:36 am

zeilenschubser wrote:
Sat May 09, 2020 10:32 pm
Have a look at
  1. how Arduino does it / Look here too
  2. The SPP-Interface of the ESP-IDF Stack:
  3. The Bluedroid Implementation in the esp-idf
Feel free to then pullrequest your module!
Thanks a lot for the useful links, but I was able to implement this part of my code. The only issue is that, how can I wrap it into my micropython project? I'd like to run this bluetooth based code as part of a micropython project.
My plan is to turn on/off the bluetooth connection from python on-demand. The firmware in my plans have two parts:
1. a python app, which running always, collecting data, transferring through mqtt to the server.
2. a bluetooth configuration part, which is needed on-demand, not always. It helps to configure the device with UART serial communication, that I can translate to bluetooth serial/rfcomm.
Both of these part of codes are already implemented. So I just looking for a solution, how can the python code start and stop a bluetooth service, which is implemented in arduino or EPS-IDF C++.

OutoftheBOTS_
Posts: 768
Joined: Mon Nov 20, 2017 10:18 am

Re: External binary/lib C++

Post by OutoftheBOTS_ » Sun May 10, 2020 10:30 pm

Have you read this http://docs.micropython.org/en/latest/d ... dules.html

I am also trying to find Mike's github where he had written a heap of examples for all sorts of data types.

There is also this viewtopic.php?t=6786

montyx
Posts: 3
Joined: Sat May 09, 2020 6:12 pm

Re: External binary/lib C++

Post by montyx » Sun May 10, 2020 11:47 pm

Thank you very much, I'm going to test it! :)

SpotlightKid
Posts: 404
Joined: Wed Apr 08, 2015 5:19 am

Re: External binary/lib C++

Post by SpotlightKid » Mon May 11, 2020 8:28 am

OutoftheBOTS_ wrote:
Sun May 10, 2020 10:30 pm
I am also trying to find Mike's github where he had written a heap of examples for all sorts of data types.
https://github.com/miketeachman/MicroPy ... examples.c

OutoftheBOTS_
Posts: 768
Joined: Mon Nov 20, 2017 10:18 am

Re: External binary/lib C++

Post by OutoftheBOTS_ » Mon May 11, 2020 11:21 am

SpotlightKid wrote:
Mon May 11, 2020 8:28 am
OutoftheBOTS_ wrote:
Sun May 10, 2020 10:30 pm
I am also trying to find Mike's github where he had written a heap of examples for all sorts of data types.
https://github.com/miketeachman/MicroPy ... examples.c
I will bookmark that :)

Post Reply