This commit is contained in:
Your Name
2025-02-25 11:55:44 +01:00
parent e3607143a1
commit 144d904813
5 changed files with 40 additions and 4 deletions

View File

@@ -4,9 +4,19 @@ Based on the Rpi4 or CM4.
# 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
See `installation.sh`
Line by line installation.
```
sudo apt update

View File

@@ -128,9 +128,13 @@ try:
print(response_SARA_1)
time.sleep(1)
#2. Set uSpot URL (TODO)
#2. Set uSpot URL
uSpot_profile_id = 1
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)
#3. Get localisation (CellLocate)

View File

@@ -18,7 +18,6 @@
"ttyAMA5"
],
"i2C_sound": false,
"i2c_BME": false,
"i2c_RTC": false,
"local_storage": false,
"sshTunnel_port": 59228,

View File

@@ -346,7 +346,7 @@ window.onload = function() {
});
//creates i2c BME280 card
if (data.i2c_BME) {
if (data["BME280/get_data_v2.py"]) {
const i2C_BME_HTML = `
<div class="col-sm-3">
<div class="card">

View File

@@ -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 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!"