update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'''
|
||||
Check if the main loop is running
|
||||
/usr/bin/python3 /var/www/nebuleair_pro_4g/tests/check_running.py
|
||||
/usr/bin/python3 /var/www/moduleair_pro_4g/tests/check_running.py
|
||||
'''
|
||||
import psutil
|
||||
import json
|
||||
@@ -12,7 +12,7 @@ def is_script_running(script_name):
|
||||
return True # Script is running
|
||||
return False # Script is not running
|
||||
|
||||
script_to_check = "/var/www/nebuleair_pro_4g/loop/SARA_send_data_v2.py"
|
||||
script_to_check = "/var/www/moduleair_pro_4g/loop/SARA_send_data_v2.py"
|
||||
|
||||
# Determine script status
|
||||
is_running = is_script_running(script_to_check)
|
||||
|
||||
10
SARA/sara.py
10
SARA/sara.py
@@ -1,13 +1,13 @@
|
||||
'''
|
||||
Script to see if the SARA-R410 is running
|
||||
ex:
|
||||
python3 /var/www/nebuleair_pro_4g/SARA/sara.py ttyAMA2 AT+CCID? 2
|
||||
python3 /var/www/moduleair_pro_4g/SARA/sara.py ttyAMA2 AT+CCID? 2
|
||||
ex 2 (turn on blue light):
|
||||
python3 /var/www/nebuleair_pro_4g/SARA/sara.py ttyAMA2 AT+UGPIOC=16,2 2
|
||||
python3 /var/www/moduleair_pro_4g/SARA/sara.py ttyAMA2 AT+UGPIOC=16,2 2
|
||||
ex 3 (reconnect network)
|
||||
python3 /var/www/nebuleair_pro_4g/SARA/sara.py ttyAMA2 AT+COPS=1,2,20801 20
|
||||
python3 /var/www/moduleair_pro_4g/SARA/sara.py ttyAMA2 AT+COPS=1,2,20801 20
|
||||
ex 4 (get HTTP Profiles)
|
||||
python3 /var/www/nebuleair_pro_4g/SARA/sara.py ttyAMA2 AT+UHTTP? 2
|
||||
python3 /var/www/moduleair_pro_4g/SARA/sara.py ttyAMA2 AT+UHTTP? 2
|
||||
|
||||
'''
|
||||
|
||||
@@ -33,7 +33,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'''
|
||||
Script to connect SARA-R410 to network SARA-R410
|
||||
python3 /var/www/nebuleair_pro_4g/SARA/sara_connectNetwork.py ttyAMA2 20801 10
|
||||
python3 /var/www/moduleair_pro_4g/SARA/sara_connectNetwork.py ttyAMA2 20801 10
|
||||
|
||||
AT+COPS=1,2,20801
|
||||
mode->1 pour manual
|
||||
@@ -30,7 +30,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -22,7 +22,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -22,7 +22,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -23,7 +23,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Script to connect SARA-R410 to APN
|
||||
AT+CGDCONT=1,"IP","data.mono"
|
||||
|
||||
/usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_setAPN.py ttyAMA2 data.mono 2
|
||||
/usr/bin/python3 /var/www/moduleair_pro_4g/SARA/sara_setAPN.py ttyAMA2 data.mono 2
|
||||
'''
|
||||
|
||||
import serial
|
||||
@@ -27,7 +27,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
'''
|
||||
Script to set the URL for a HTTP request
|
||||
Ex:
|
||||
/usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_setURL.py ttyAMA2 data.nebuleair.fr 0
|
||||
/usr/bin/python3 /var/www/moduleair_pro_4g/SARA/sara_setURL.py ttyAMA2 data.moduleair.fr 0
|
||||
To do: need to add profile id as parameter
|
||||
|
||||
First profile id:
|
||||
AT+UHTTP=0,1,"data.nebuleair.fr"
|
||||
AT+UHTTP=0,1,"data.moduleair.fr"
|
||||
Second profile id:
|
||||
AT+UHTTP=1,1,"api-prod.uspot.probesys.net"
|
||||
'''
|
||||
@@ -33,7 +33,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
'''
|
||||
Script to set the URL for a HTTP request
|
||||
Ex:
|
||||
/usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_setURL_uSpot_noSSL.py ttyAMA2 api-prod.uspot.probesys.net
|
||||
/usr/bin/python3 /var/www/moduleair_pro_4g/SARA/sara_setURL_uSpot_noSSL.py ttyAMA2 api-prod.uspot.probesys.net
|
||||
To do: need to add profile id as parameter
|
||||
|
||||
First profile id:
|
||||
AT+UHTTP=0,1,"data.nebuleair.fr"
|
||||
AT+UHTTP=0,1,"data.moduleair.fr"
|
||||
Second profile id:
|
||||
AT+UHTTP=1,1,"api-prod.uspot.probesys.net"
|
||||
'''
|
||||
@@ -51,7 +51,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
@@ -22,7 +22,7 @@ def load_config(config_file):
|
||||
return {}
|
||||
|
||||
# Define the config file path
|
||||
config_file = '/var/www/nebuleair_pro_4g/config.json'
|
||||
config_file = '/var/www/moduleair_pro_4g/config.json'
|
||||
# Load the configuration data
|
||||
config = load_config(config_file)
|
||||
# Access the shared variables
|
||||
|
||||
Reference in New Issue
Block a user