From dc27e5f139ddec08016d41ef6c11b77bb7b96175 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 26 Mar 2025 08:25:42 +0100 Subject: [PATCH] update --- SARA/reboot/start.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SARA/reboot/start.py b/SARA/reboot/start.py index 7655a7c..46b1126 100644 --- a/SARA/reboot/start.py +++ b/SARA/reboot/start.py @@ -13,11 +13,19 @@ Script that starts at the boot of the RPI (with cron) ''' import serial +import RPi.GPIO as GPIO import time import sys import json import re +#GPIO +SARA_power_GPIO = 16 +SARA_ON_GPIO = 20 + +GPIO.setmode(GPIO.BCM) # Use BCM numbering +GPIO.setup(SARA_power_GPIO, GPIO.OUT) # Set GPIO17 as an output + #get data from config def load_config(config_file): try: @@ -122,6 +130,10 @@ def read_complete_response(serial_connection, timeout=2, end_of_response_timeout try: print('

Start reboot python script

') + #First we need to power on the module (if connected to mosfet via gpio16) + GPIO.output(SARA_power_GPIO, GPIO.HIGH) + time.sleep(5) + #check modem status #Attention: # SARA R4 response: Manufacturer: u-blox Model: SARA-R410M-02B