Index: etc/2026 ASN RPi5/raspi5/drydemo.service =================================================================== diff -u --- etc/2026 ASN RPi5/raspi5/drydemo.service (revision 0) +++ etc/2026 ASN RPi5/raspi5/drydemo.service (revision 58f64cb635ca00fa114964c3fae606a9511ad0a4) @@ -0,0 +1,12 @@ +[Unit] +Description=Leahi DryDemo FW Simulator +After=leahi.service + +[Service] +Type=simple +ExecStart=/opt/leahi/drydemo --platform eglfs -L -A can1 +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target Index: etc/2026 ASN RPi5/raspi5/run.sh =================================================================== diff -u --- etc/2026 ASN RPi5/raspi5/run.sh (revision 0) +++ etc/2026 ASN RPi5/raspi5/run.sh (revision 58f64cb635ca00fa114964c3fae606a9511ad0a4) @@ -0,0 +1,76 @@ +#!/bin/bash + +export P_CANBUS="can0" +export V_CANBUS="can1" +export SSID_NAME="DilaityIoT" +export SSID_PASS="E6ACB9855B948EC3" +export TEMP=/tmp +export WORKSPACE=/opt/leahi +export LOGFILE=$TEMP/leahi.manufacturing.log +export DATE="date +%Y%m%d%H%M%S" + +# the application needs this variable to be correctly set to susccessfully launch. + +# the egls.json file shall also correctly set and put in the pointing location. +export QT_QPA_EGLFS_KMS_CONFIG=$WORKSPACE/eglfs.json +export QT_QPA_EGLFS_HIDECURSOR=1 +export QT_IM_MODULE=qtvirtualkeyboard +export QT_QPA_EGLFS_INTEGRATION=eglfs_kms +export QT_QPA_EGLFS_KMS_CONFIG=/etc/qt5/eglfs.json + +# TODO: +# 1 - separate the run.sh and the application service ( and even the cloudsync too ) +# 2 - mv LOGNAME post.log +# + +echo "" > $LOGFILE 2>&1 + +function setup_can() { + echo "[$($DATE)] Configuring the canbus '$P_CANBUS'" >> $LOGFILE 2>&1 + ip link set $P_CANBUS up type can bitrate 250000 >> $LOGFILE 2>&1 + ifconfig $P_CANBUS txqueuelen 4000 >> $LOGFILE 2>&1 + ifconfig $P_CANBUS up >> $LOGFILE 2>&1 +} + +function setup_can_virt() { + sudo modprobe vcan >> $LOGFILE 2>&1 + sudo ip link add dev $V_CANBUS type vcan >> $LOGFILE 2>&1 + sudo ip link set $V_CANBUS up >> $LOGFILE 2>&1 +} + +function application() { +echo "[$($DATE)] Application starting in '$(pwd)'" >> $LOGFILE 2>&1 +$WORKSPACE/leahi --platform eglfs -D -q -A can1 >> $LOGFILE 2>&1 & # -E removed for using -L for testing Leahi FW communication +if [[ $RES == 0 ]]; then + echo "[$($DATE)] Application launched" >> $LOGFILE 2>&1 +else + echo "[$($DATE)] Application failed to launch" >> $LOGFILE 2>&1 +fi + +} + + +function drydemo() { +echo "[$($DATE)] Dry-Demo starting in '$(pwd)'" >> $LOGFILE 2>&1 +$WORKSPACE/drydemo --platform eglfs -L -A can1 >> $LOGFILE 2>&1 & # -E removed for using -L for testing Leahi FW communication +if [[ $RES == 0 ]]; then + echo "[$($DATE)] Dry-Demo launched" >> $LOGFILE 2>&1 +else + echo "[$($DATE)] Dry-Demo failed to launch" >> $LOGFILE 2>&1 +fi +} + +ethtool -s eth0 speed 100 duplex full autoneg on >> $LOGFILE 2>&1 + +timedatectl set-timezone America/Los_Angeles >> $LOGFILE 2>&1 +timedatectl set-ntp 1 >> $LOGFILE 2>&1 +echo "[$($DATE)] Starting" >> $LOGFILE 2>&1 + +setup_can_virt + +echo "[$($DATE)] Configuring wifi '$SSID_NAME' connection" >> $LOGFILE 2>&1 +nmcli dev wifi connect "$SSID_NAME" password "$SSID_PASS" >> $LOGFILE 2>&1 + +cd $WORKSPACE + +application