BLE init long time problem.

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
prem111
Posts: 111
Joined: Sun Feb 23, 2020 3:18 pm

BLE init long time problem.

Post by prem111 » Tue Aug 18, 2020 2:59 pm

BLE initializes sometimes for 2 seconds and sometimes more than 10. Does anyone know the solution to this problem?

micropython 1.12 / esp-idf 4.0

https://github.com/micropython/micropy ... sues/5489

User avatar
jimmo
Posts: 2244
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: BLE init long time problem.

Post by jimmo » Thu Sep 03, 2020 5:59 am

prem111 wrote:
Tue Aug 18, 2020 2:59 pm
Does anyone know the solution to this problem?
It's a bug in the ESP32 IDF. The issue you linked to has all the details, but the workaround means we have to pin everything to one core. Like I said on the issue, I think we should still do that, but this wasn't a change that we were prepared to make just before releasing v1.13. Now that v1.13 is released, hopefully #6343 gets merged soon. (In my testing, I no longer see this issue).

prem111
Posts: 111
Joined: Sun Feb 23, 2020 3:18 pm

Re: BLE init long time problem.

Post by prem111 » Tue Sep 08, 2020 7:40 am

Im have 1.13 (MP_TASK_COREID to code 0) with idf 4.0, Sometimes there is this problem, sometimes it is not...

User avatar
jimmo
Posts: 2244
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: BLE init long time problem.

Post by jimmo » Tue Sep 08, 2020 7:46 am

prem111 wrote:
Tue Sep 08, 2020 7:40 am
Im have 1.13 (MP_TASK_COREID to code 0) with idf 4.0, Sometimes there is this problem, sometimes it is not...
Not quite sure what you mean?

v1.13 doesn't have a fix for this.

The absolutely latest revision on master (literally merged a few hours ago) does.

What are you using?

prem111
Posts: 111
Joined: Sun Feb 23, 2020 3:18 pm

Re: BLE init long time problem.

Post by prem111 » Tue Sep 08, 2020 8:11 am

Ok, then what to do to use version 1.13 without this problem, compile the latest master but with or without pinned MP to core 0?

prem111
Posts: 111
Joined: Sun Feb 23, 2020 3:18 pm

Re: BLE init long time problem.

Post by prem111 » Tue Sep 08, 2020 8:25 am

Oh ok, I haven't noticed that latest master is already core = 0 ok thanks.

prem111
Posts: 111
Joined: Sun Feb 23, 2020 3:18 pm

Re: BLE init long time problem.

Post by prem111 » Sat Feb 20, 2021 8:35 am

How to fix this problem in v.1.12? Is the only solution to going to core 0? (sometimes I have a crash panic) I noticed that in the latest 1.14 for esp32 there is "MicroPython and NimBLE tasks to core 0" How can you do that only when bluetooth is on?

Post Reply