Configuration for install script that obtains device probe requests and sends them to Flame.
Configuration
To adapt the script to each device, you only need to change the organization's secret and, if necessary, change the URL. The antenna's MAC address is obtained automatically.
Installation
Teltonika
If the device password is unknown, it can be changed from Devices \> Management \> Password management \> Set password
Access the device console (CLI) with the root user
Copy the content of the sniffer.sh script to the /root/sniffer.sh file
Give execution permissions to the script with chmod +x /root/sniffer.sh
Repeat steps 3 and 4 with the sender.sh script
Change the organization's secret in the sender.sh script
Access the device UI with the admin user
Update the firmware from System \> Firmware \> Update Firmware
Configure the following command from System \> Custom Scripts so that the scripts start with the system:
sleep 10 /sbin/start-stop-daemon -S -q -m /root/sniffer.pid -p /root/sniffer.pid -x /root/sniffer.sh -b sleep 5 /sbin/start-stop-daemon -S -q -m /root/sender.pid -p /root/sender.pid -x /root/sender.sh -b
Schedule a daily reboot from Services \> Auto Reboot \> Reboot Scheduler:
Enable: on
Action: Device reboot
Interval type: Week days
Week days: all
Day time: 00:00
Save & Apply
Install the TCPdump package from Services \> Package Manager \> Packages
Restart the device
Get the MAC with cat /sys/class/net/sniffer/address after the script has execute
Others
Access the device via SSH
Copy the content of the flame.sh script, changing the organization's token, to /root/flame.sh and give it execution permissions with chmod +x /root/flame.sh
Copy the content of the flame script to /etc/init.d/flame and give it execution permissions with chmod +x /etc/init.d/flame
Execute /etc/init.d/flame enable to activate the service with system startup and /etc/init.d/flame start to start it immediately without having to reboot
After starting the service, get the device's MAC with cat /sys/class/net/flame0/address
Configure a daily reboot just in case with crontab -e:
# Reboot at 1:00am every day # Note: To avoid infinite reboot loop, wait 70 seconds # and touch a file in /etc so clock will be set # properly to 1:01 on reboot before cron starts. 0 1 * * * sleep 70 && touch /etc/banner && reboot
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article