update
This commit is contained in:
12
README.md
12
README.md
@@ -4,9 +4,19 @@ Based on the Rpi4 or CM4.
|
|||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
|
# Express
|
||||||
|
|
||||||
|
You can download the `installation.sh` and run it:
|
||||||
|
```
|
||||||
|
wget http://gitea.aircarto.fr/PaulVua/nebuleair_pro_4g/raw/branch/main/installation.sh
|
||||||
|
chmod +x installation.sh
|
||||||
|
./installation.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
See `installation.sh`
|
Line by line installation.
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|||||||
@@ -128,9 +128,13 @@ try:
|
|||||||
print(response_SARA_1)
|
print(response_SARA_1)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
#2. Set uSpot URL (TODO)
|
#2. 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'
|
||||||
|
ser_sara.write(command.encode('utf-8'))
|
||||||
|
response_SARA_2 = read_complete_response(ser_sara, wait_for_lines=["OK"])
|
||||||
|
print(response_SARA_2)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
#3. Get localisation (CellLocate)
|
#3. Get localisation (CellLocate)
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"ttyAMA5"
|
"ttyAMA5"
|
||||||
],
|
],
|
||||||
"i2C_sound": false,
|
"i2C_sound": false,
|
||||||
"i2c_BME": false,
|
|
||||||
"i2c_RTC": false,
|
"i2c_RTC": false,
|
||||||
"local_storage": false,
|
"local_storage": false,
|
||||||
"sshTunnel_port": 59228,
|
"sshTunnel_port": 59228,
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ window.onload = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//creates i2c BME280 card
|
//creates i2c BME280 card
|
||||||
if (data.i2c_BME) {
|
if (data["BME280/get_data_v2.py"]) {
|
||||||
const i2C_BME_HTML = `
|
const i2C_BME_HTML = `
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -68,4 +68,27 @@ echo "Set Up Apache"
|
|||||||
sudo sed -i 's|DocumentRoot /var/www/html|DocumentRoot /var/www/nebuleair_pro_4g|' /etc/apache2/sites-available/000-default.conf
|
sudo sed -i 's|DocumentRoot /var/www/html|DocumentRoot /var/www/nebuleair_pro_4g|' /etc/apache2/sites-available/000-default.conf
|
||||||
sudo systemctl reload apache2
|
sudo systemctl reload apache2
|
||||||
|
|
||||||
|
#add sudo authorization
|
||||||
|
if ! sudo grep -q "/usr/bin/nmcli" /etc/sudoers; then
|
||||||
|
echo "Setting up sudo authorization..."
|
||||||
|
echo -e "ALL ALL=(ALL) NOPASSWD: /usr/bin/nmcli, /usr/sbin/reboot\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/git pull\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/ssh\nwww-data ALL=(ALL) NOPASSWD: /usr/bin/python3 *" | sudo EDITOR="tee -a" visudo
|
||||||
|
else
|
||||||
|
echo "Sudo authorization already set. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Open all serial ports
|
||||||
|
if ! grep -q "enable_uart=1" /boot/firmware/config.txt; then
|
||||||
|
echo "Adding UART configuration..."
|
||||||
|
echo -e "\nenable_uart=1\ndtoverlay=uart0\ndtoverlay=uart1\ndtoverlay=uart2\ndtoverlay=uart3\ndtoverlay=uart4\ndtoverlay=uart5" | sudo tee -a /boot/firmware/config.txt > /dev/null
|
||||||
|
else
|
||||||
|
echo "UART configuration already set. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo chmod 777 /dev/ttyAMA*
|
||||||
|
|
||||||
|
#Open I2C ports
|
||||||
|
echo "Open I2C ports"
|
||||||
|
sudo raspi-config nonint do_i2c 0
|
||||||
|
|
||||||
echo "Setup completed successfully!"
|
echo "Setup completed successfully!"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user