Issue_Disappeared/Solved_for_now: ubluetooth.BLE.active(True) gives EOF error

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
xwb
Posts: 12
Joined: Sun Oct 25, 2020 8:33 am

Issue_Disappeared/Solved_for_now: ubluetooth.BLE.active(True) gives EOF error

Post by xwb » Sun Oct 25, 2020 8:54 am

Hello all,

I am new to micropython and esp32 and I will keep it short. I successfully configured my WIFI on my esp32 board and I am now trying to activate bluetooth on the board. My end goal is to scan for surrounding beacons and get the RSSI signal strength values of them.

When I do:

Code: Select all

import os
import ubluetooth
bt = ubluetooth.BLE()

print("inital-success")

bt.active(1)

print("success")
The output is "initial sucess" ........ and then it gives me an EOF timeout error

it has no issues importing any libraries until I start calling bt.active(True) / bt.active(1) (Same thing)
Ampy gives me

Code: Select all

ampy.pyboard.PyboardError: timeout waiting for first EOF reception
Is this the proper way of starting up bt on the esp32? If not, what do I need to change? Thank you very much for your kind help in advance!

Clement
Secondary School Student.
Last edited by xwb on Wed Oct 28, 2020 11:44 am, edited 1 time in total.

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

Re: ubluetooth.BLE.active(True) gives EOF error

Post by jimmo » Sun Oct 25, 2020 11:17 pm

Hi
xwb wrote:
Sun Oct 25, 2020 8:54 am
The output is "initial sucess" ........ and then it gives me an EOF timeout error
Can you please confirm which version of MicroPython you're running (hit Ctrl-B at the REPL) and copy the output here. Also if you know the filename of the .bin file you flashed that would be helpful too.

I think probably the answer is https://github.com/micropython/micropython/issues/6423
Sorry I haven't had a chance to investigate this further yet.

If you're using the IDF4 version can you try the IDF3 version? Or the other way around?

xwb
Posts: 12
Joined: Sun Oct 25, 2020 8:33 am

Re: ubluetooth.BLE.active(True) gives EOF error

Post by xwb » Mon Oct 26, 2020 2:55 am

jimmo wrote:
Sun Oct 25, 2020 11:17 pm
Hi
xwb wrote:
Sun Oct 25, 2020 8:54 am
The output is "initial sucess" ........ and then it gives me an EOF timeout error
Can you please confirm which version of MicroPython you're running (hit Ctrl-B at the REPL) and copy the output here. Also if you know the filename of the .bin file you flashed that would be helpful too.

I think probably the answer is https://github.com/micropython/micropython/issues/6423
Sorry I haven't had a chance to investigate this further yet.

If you're using the IDF4 version can you try the IDF3 version? Or the other way around?
Hello thanks for your help and reply! I am using v1.13 -

Code: Select all

MicroPython v1.13 on 2020-09-02; ESP32 module with ESP32
When running this command on repl, there is no issue but it takes a very long time. When running it with ampy, it throws the error.

Thank you very much for including the link to the github issue. I will have a look through the comments there.

Regarding the IDF version, I will investigate. However, do you know of any simple way to check which version I am on? Thank you very much. On google, I can see that you can check it with a few git commands like git describe (?) Thanks very much.


Since we are on the subject of ampy, I figured out maybe it will be a good idea to ask some extra questions here. If it is not appropriate, I will remove them:
Does ampy even count as burning or is it just running commands from this computer one by one?
Also, how to include other python files with ampy? Thank you very much for your kind help in advance.

xwb
Posts: 12
Joined: Sun Oct 25, 2020 8:33 am

Re: ubluetooth.BLE.active(True) gives EOF error

Post by xwb » Wed Oct 28, 2020 11:43 am

Update : The issue seems to have solved itself. I didn't do anything special. However, I will investigate when I have more time. Thank you very much.

Post Reply