Teltonika WiFi (EN)

Modified on Wed, 13 Aug at 12:50 PM

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

  1. If the device password is unknown, it can be changed from Devices \> Management \> Password management \> Set password

  2. Access the device console (CLI) with the root user

  3. Copy the content of the sniffer.sh script to the /root/sniffer.sh file

  4. Give execution permissions to the script with chmod +x /root/sniffer.sh

  5. Repeat steps 3 and 4 with the sender.sh script

  6. Change the organization's secret in the sender.sh script

  7. Access the device UI with the admin user

  8. Update the firmware from System \> Firmware \> Update Firmware

  9. 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


  10. 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

  11. Install the TCPdump package from Services \> Package Manager \> Packages

  12. Restart the device

  13. Get the MAC with cat /sys/class/net/sniffer/address after the script has execute

Others


  1. Access the device via SSH

  2. 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

  3. Copy the content of the flame script to /etc/init.d/flame and give it execution permissions with chmod +x /etc/init.d/flame

  4. 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

  5. After starting the service, get the device's MAC with cat /sys/class/net/flame0/address

  6. 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

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article