ublox-configuration: Add power on

BugzID: 57325
This commit is contained in:
Alexandre Bard 2019-06-12 11:11:57 +02:00
parent 4f1be4fe1b
commit becbb56002
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import sys
import time import time
import os import os
import configparser import configparser
import gpiod
config_dump = __import__("modem-config-dump") config_dump = __import__("modem-config-dump")
SERIAL_DEV = '/dev/ttyACM0' SERIAL_DEV = '/dev/ttyACM0'
@ -122,6 +123,10 @@ def apn_setup(ser):
execute_and_check(ser, b'AT+CFUN=1\r') execute_and_check(ser, b'AT+CFUN=1\r')
def main(): def main():
line = gpiod.find_line('GSM_SUP_EN')
line.request(consumer='ublox-config', type=gpiod.LINE_REQ_DIR_OUT)
line.set_value(1)
rst = False rst = False
# Wait on device # Wait on device
while not os.path.exists(SERIAL_DEV): while not os.path.exists(SERIAL_DEV):