PPP.active freezes MicroPython
Checks
-
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
-
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
esp32 port, ESP32_GENERIC_C3
MicroPython version
MicroPython v1.22.2 on 2024-02-22; ESP32C3 module with ESP32C3
Reproduction
import network
import time
import machine
uart = machine.UART(1, baudrate=115200, tx=18, rx=19)
ppp = network.PPP(uart)
ppp.active(True)
ppp.connect()
ppp.active(False)
ppp.active(True)
Expected behaviour
I would expect MicroPython to activate PPP or return an exception.
Observed behaviour
After re-activating the PPP, MicroPython freezes, even to the point of not detecting a KeyboardInterrupt.
Additional Information
The problem is independent of whether or not there is a PPP module connected to that Uart, and it is also independent of the activation of the PPP module with the AT commands.
I understand that the problem occurs whenever PPP is deactivated and reactivated.
rp2: code sometimes hangs when doing `bluetooth.BLE().active(True)`
Checks
-
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
-
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
rp2 port with RPI_PICO_W
MicroPython version
RPI_PICO_W-20240105-v1.22.1.uf2
Reproduction
Run the application at https://github.com/Gaudon/zephyr-cycling:
- install
RPI_PICO_W-20240105-v1.22.1.uf2to a Pico W board - copy all files from the above repo to the board (omit
firmwaredirectory) - copy
config/template-primary.txtorconfig/template-secondary.txtto the board atconfig/config.txt(they can be changed to assign different GPIO if needed) - reset the board to run the code in
main.py
Expected behaviour
Application starts and continues to run.
Observed behaviour
Code sometimes hangs at ble.active(True).
Additional Information
This is branched off from issue #6423 at https://github.com/micropython/micropython/issues/6423#issuecomment-1995163998
Note that I cannot reproduce this issue, but @Gaudon can in the above thread.