Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Initial BLE implementation #73

Closed
wants to merge 5 commits into from
Closed

Conversation

danicampora
Copy link
Member

Mostly copied from: https://github.com/pycom/pycom-micropython-sigfox

The API is described here: https://docs.pycom.io/pycom_esp32/library/network.Bluetooth.html

At the moment the board crashes immediately at boot-up inside heap_alloc_caps_init(). I'm still trying to figure out what's the reason of the crash, but I could use some help if anyone here wants to try this patch and help investigate.

@danicampora
Copy link
Member Author

danicampora commented Apr 20, 2017

Comments and feedback at every level are more than welcome.

@dpgeorge
Copy link
Member

At the moment the board crashes immediately at boot-up inside heap_alloc_caps_init()

You'll probably need to decrease the uPy heap, try something like 32k to start with and if it works then you know that's the problem.

@danicampora
Copy link
Member Author

@dpgeorge thanks, I already tried that and it didn't help. I also tried allocating the MP heap dynamically (that's what we do in our repo), but no difference either. I'm sure I'm missing something really obvious so that's what I thought it'd be good to submit the PR and let others take a look :-)

@dpgeorge
Copy link
Member

I reduced the uPy heap to 16k, and didn't update the ESP IDF (ie I didn't include your last commit), and it booted ok. But doing network.Bluetooth() leads to a crash: E (30502) BT: Startup BTU

@danicampora
Copy link
Member Author

@dpgeorge ok I'll try that, thanks!

@rmokerone
Copy link

@danicampora I compiled successfully. But I can not enter the REPL when I'm testing on the ESP-WROOM-32 development board.
The results are shown below.
2017-04-20 10 30 59

@danicampora
Copy link
Member Author

I compiled successfully. But I can not enter the REPL when I'm testing on the ESP-WROOM-32 development board.

I know :-), that's why I meant with:

At the moment the board crashes immediately at boot-up inside heap_alloc_caps_init()

I tried @dpgeorge suggestion of lowering the RAM to 16K, but it didn't help with the latest IDF.

@dpgeorge
Copy link
Member

There were lots of changes recently in the ESP IDF so it was a non-trivial upgrade, but it's now done in 67d141c.

@danicampora you may want to remove from this PR the commit that updates the IDF, decrease heap size and try again.

@danicampora
Copy link
Member Author

Thanks @dpgeorge !

I pushed another commit. Now with Bluetooth linked the board boots (and the MicroPython heap is 64K), but trying to enable Bluetooth leads to the same crash: E (56743) BT: Startup BTU

@igrr igrr mentioned this pull request Jun 7, 2017
7 tasks
@BEMNETADEFIS
Copy link

linux is not compactible for micropython or requies more work on plugins

@BEMNETADEFIS
Copy link

BLE is among them

@aykevl
Copy link

aykevl commented Aug 27, 2018

This repository has been merged upstream, see #233.

For Bluetooth, take a look here: micropython/micropython#3809 (comment) (I should probably make a real PR out of that).

@BEMNETADEFIS
Copy link

BEMNETADEFIS commented Aug 28, 2018 via email

@aitjcize
Copy link
Contributor

aitjcize commented Feb 1, 2019

Is anyone still working on this?

@dpgeorge
Copy link
Member

BLE support for esp32 is being implemented upstream via the following PR: micropython/micropython#5051

@dpgeorge dpgeorge closed this Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants