Home/Support/Support Forum/Is it possible to restart the DIGI 3G Cellular device with some MicroPython command?

Is it possible to restart the DIGI 3G Cellular device with some MicroPython command?

+1 vote
Is it possible to restart the DIGI 3G Cellular device with some MicroPython command?
asked Mar 14, 2018 in MicroPython by a.u.jentze New to the Community (2 points)
recategorized Jun 24 by TomCollins

Please log in or register to answer this question.

2 Answers

+1 vote
import machine
import usocket
import gc

socketObject = usocket.socket(usocket.AF_INET, usocket.SOCK_STREAM)
socketObject.close()
gc.collect()
machine.reset()

This is from my M1 MicroPython code. It might be what you need to reset your 3G.

Or you could possibly put the device into a sleep level that disconnects the modem.
answered Mar 15 by Jexx New to the Community (15 points)
0 votes
Hi,
I'm doing it like this:

import xbee
x = xbee.XBee()
x.atcmd('FR') #Reset module
answered Dec 21, 2018 by a.u.jentze New to the Community (2 points)
...