Got timeout with BLE in MicroPython 1.15

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
meebox
Posts: 11
Joined: Sat Feb 01, 2020 4:41 am

Got timeout with BLE in MicroPython 1.15

Post by meebox » Sat Jun 19, 2021 5:59 am

I try to run the ble_simple_peripheral.py by ampy.It seems to work fine, but get timeout error if not connected in 30 secs shown as bellow:
❯ ampy -p com9 run .\ble_simple_peripheral.py
Starting advertising
Traceback (most recent call last):
File "d:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\program files\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\Program Files\Python39\Scripts\ampy.exe\__main__.py", line 7, in <module>
File "d:\program files\python39\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "d:\program files\python39\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "d:\program files\python39\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "d:\program files\python39\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "d:\program files\python39\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "d:\program files\python39\lib\site-packages\ampy\cli.py", line 338, in run
output = board_files.run(local_file, not no_output, not no_output)
File "d:\program files\python39\lib\site-packages\ampy\files.py", line 309, in run
self._pyboard.execfile(filename, stream_output=True)
File "d:\program files\python39\lib\site-packages\ampy\pyboard.py", line 285, in execfile
return self.exec_(pyfile, stream_output=stream_output)
File "d:\program files\python39\lib\site-packages\ampy\pyboard.py", line 277, in exec_
ret, ret_err = self.exec_raw(command, data_consumer=data_consumer)
File "d:\program files\python39\lib\site-packages\ampy\pyboard.py", line 266, in exec_raw
return self.follow(timeout, data_consumer)
File "d:\program files\python39\lib\site-packages\ampy\pyboard.py", line 230, in follow
raise PyboardError('timeout waiting for first EOF reception')
ampy.pyboard.PyboardError: timeout waiting for first EOF reception


If I run the same program in Thonny, it works well without any problem. Is there anyone getting the same problem?

I use esp32-20210418-v1.15.bin download from MicroPython site.

The v1.16 firmware also got the same problem.

Post Reply