update
This commit is contained in:
@@ -119,7 +119,7 @@ try:
|
|||||||
print('<h3>Start reboot python script</h3>')
|
print('<h3>Start reboot python script</h3>')
|
||||||
|
|
||||||
# 1. Set AIRCARTO URL
|
# 1. Set AIRCARTO URL
|
||||||
print('Set aircarto URL')
|
print('➡️Set aircarto URL')
|
||||||
aircarto_profile_id = 0
|
aircarto_profile_id = 0
|
||||||
aircarto_url="data.nebuleair.fr"
|
aircarto_url="data.nebuleair.fr"
|
||||||
command = f'AT+UHTTP={aircarto_profile_id},1,"{aircarto_url}"\r'
|
command = f'AT+UHTTP={aircarto_profile_id},1,"{aircarto_url}"\r'
|
||||||
@@ -129,7 +129,7 @@ try:
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
#2. Set uSpot URL
|
#2. Set uSpot URL
|
||||||
print('Set uSpot URL')
|
print('➡️Set uSpot URL')
|
||||||
uSpot_profile_id = 1
|
uSpot_profile_id = 1
|
||||||
uSpot_url="api-prod.uspot.probesys.net"
|
uSpot_url="api-prod.uspot.probesys.net"
|
||||||
command = f'AT+UHTTP={uSpot_profile_id},1,"{uSpot_url}"\r'
|
command = f'AT+UHTTP={uSpot_profile_id},1,"{uSpot_url}"\r'
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
'''
|
'''
|
||||||
|
____ _ ____ _
|
||||||
|
/ ___| / \ | _ \ / \
|
||||||
|
\___ \ / _ \ | |_) | / _ \
|
||||||
|
___) / ___ \| _ < / ___ \
|
||||||
|
|____/_/ \_\_| \_\/_/ \_\
|
||||||
|
|
||||||
Script to connect SARA-R410 to network SARA-R410
|
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/nebuleair_pro_4g/SARA/sara_connectNetwork.py ttyAMA2 20801 10
|
||||||
|
|
||||||
AT+COPS=1,2,20801
|
AT+COPS=1,2,20801
|
||||||
mode->1 pour manual
|
mode->1 pour manual
|
||||||
format->2 pour numeric
|
format->2 pour numeric
|
||||||
operator->20801 pour orange
|
operator->20801 pour orange, 20810 pour SFR
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import serial
|
import serial
|
||||||
|
|||||||
@@ -129,6 +129,18 @@ info "Enabling I2C ports..."
|
|||||||
sudo raspi-config nonint do_i2c 0
|
sudo raspi-config nonint do_i2c 0
|
||||||
success "I2C ports enabled."
|
success "I2C ports enabled."
|
||||||
|
|
||||||
|
#creates databases
|
||||||
|
info "Creates sqlites databases..."
|
||||||
|
/usr/bin/python3 /var/www/nebuleair_pro_4g/sqlite/create_db.py
|
||||||
|
|
||||||
|
#set up SARA R4 APN
|
||||||
|
info "Set up Monogoto APN"
|
||||||
|
/usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_setAPN.py ttyAMA2 data.mono 2
|
||||||
|
|
||||||
|
#Connect to network
|
||||||
|
info "Connect SARA R4 to network"
|
||||||
|
python3 /var/www/nebuleair_pro_4g/SARA/sara_connectNetwork.py ttyAMA2 20810 60
|
||||||
|
|
||||||
#Add master_nebuleair.service
|
#Add master_nebuleair.service
|
||||||
SERVICE_FILE="/etc/systemd/system/master_nebuleair.service"
|
SERVICE_FILE="/etc/systemd/system/master_nebuleair.service"
|
||||||
info "Setting up systemd service for master_nebuleair..."
|
info "Setting up systemd service for master_nebuleair..."
|
||||||
|
|||||||
Reference in New Issue
Block a user