You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have an ESP32 board with version 1.25.0 (2025-04-15) and the MicroPython version. When running the attached script, I get the following error:
"MPY: soft reboot
PROBLEM IN THONNY'S BACK-END: Exception while handling 'get_globals' (thonny.plugins.micropython.mp_back.ManagementError: Script produced errors).
See Thonny's backend.log for more information.
You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.
Process ended with exit code 1."
Could the soft reboot after attempting to launch PPP indicate that the PPP implementation in this version is unstable or that there is a problem with the PPP stack? Would it work with previous versions?
Script:
importmachineimporttimeimportnetworkfromumqtt.simpleimportMQTTClientimportsys# --- CONFIGURACION PERSONAL ---ADAFRUIT_USER=""ADAFRUIT_KEY=""FEED=""UART_TX=17UART_RX=16UART_BAUD=115200APN=""# --- INICIALIZA UART ---uart=machine.UART(1, baudrate=UART_BAUD, tx=UART_TX, rx=UART_RX)
defsend_at(cmd, timeout=3000):
uart.write(cmd+b'\r\n')
time.sleep(0.25) # MicroPython no siempre soporta sleep_msresp=b''start=time.ticks_ms()
whiletime.ticks_diff(time.ticks_ms(), start) <timeout:
ifuart.any():
resp+=uart.read()
try:
decoded=resp.decode('utf-8', 'replace')
print(decoded)
returndecodedexceptExceptionase:
print("Error decodificando:", e)
return""# --- SECUENCIA DE INICIALIZACION ---print("Inicializando SIM800L...")
if"OK"notinsend_at(b'AT'):
sys.exit("No responde AT. Revisa conexiones y alimentación.")
if"+CPIN: READY"notinsend_at(b'AT+CPIN?'):
sys.exit("SIM no lista o sin PIN.")
send_at(b'AT+CSQ')
if"+CREG: 0,1"notinsend_at(b'AT+CREG?'):
sys.exit("No registrado en red móvil.")
if"OK"notinsend_at(b'AT+CGDCONT=1,\"IP\",\"movistar.es\"'):
sys.exit("No se configuró APN.")
# --- MARCA PARA DATOS ---print("Marcando para datos...")
resp=send_at(b'ATD*99#', timeout=8000)
if"CONNECT"notinresp:
sys.exit("No se recibió CONNECT. No se puede levantar PPP.")
# --- LEVANTA PPP ---print("Levantando PPP...")
ppp=network.PPP(uart)
ppp.active(True)
ppp.connect()
foriinrange(30):
ifppp.isconnected():
print("PPP conectada!")
print("Datos IP:", ppp.ifconfig())
breakprint("Esperando PPP...")
time.sleep(1)
else:
sys.exit("PPP no conectada.")
# --- MQTT ADAFRUIT IO ---print("Conectando a Adafruit IO MQTT...")
client=MQTTClient("SIM800L", "io.adafruit.com", user=ADAFRUIT_USER, password=ADAFRUIT_KEY, port=1883)
try:
client.connect()
print("Conectado a Adafruit IO!")
client.publish(FEED, "Hola desde SIM800L y ESP32!")
print("Mensaje publicado en el feed:", FEED)
client.disconnect()
exceptExceptionase:
print("Error en conexión MQTT:", e)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have an ESP32 board with version 1.25.0 (2025-04-15) and the MicroPython version. When running the attached script, I get the following error:
"MPY: soft reboot
Could the soft reboot after attempting to launch PPP indicate that the PPP implementation in this version is unstable or that there is a problem with the PPP stack? Would it work with previous versions?
Script:
Beta Was this translation helpful? Give feedback.
All reactions