pycom / pycom-libraries

MicroPython libraries and examples that work out of the box on Pycom's IoT modules
333 stars 374 forks source link

where can i find the code source of the network.Bluetooth file? #60

Closed MoustaphaDIENG closed 6 years ago

MoustaphaDIENG commented 6 years ago

I want to see the different methods of the class Bluetooth. which file I have to open? I use pymakr. Thanks!

Xykon commented 6 years ago

You can run this code directly on the device:

from network import Bluetooth
help(Bluetooth)

Otherwise you'll have to look here: https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modbt.c

MoustaphaDIENG commented 6 years ago

i only get a list of the fonctions with help(Bluetooth). I rather need to see the source code of each function of the Bluetooth class. ie: i work with the lopy4 board.

Xykon commented 6 years ago

You have the source code for the Bluetooth module I already linked earlier plus the Bluetooth component of the IDF.

MoustaphaDIENG commented 6 years ago

Thank you for the link. I looked at it and saw that the code is in c. But I thought that the libraries used on pymakr are in python. For example, I do not see the function Bluetooth.resolve_adv_data(). Is the link you gave me the one used by pymakr?

Xykon commented 6 years ago

Bluetooth is a module that's integrated in the firmware, and the firmware is written in C (using an external SDK for the processor that is written in C/C++), including the function Bluetooth.resolve_adv_data()