Request to add information to a sms message

Request to add information to a status message via SMS or email.

  1. Uptime Device.
  2. Uptime Connection time.
  3. A score in text on the signal strength of the connection is excellent or good or poor.

Hello,

Thank you for your suggestion! I have forwarded it to our RnD team for further consideration. Once I receive any updates from them, I will let you know.

Thank you for your patience.

Best regards,

Hello,

I received a response that these parameters could be added in future firmware releases. Unfortunately, there is no time frame available at the moment for their implementation.

If I receive any updates, I will share them here.

Best regards,

Hello,

You could try creating a custom SMS command that returns the values you are missing.

The router has plenty of command line tools to get the data you need or at least derive the desired output (the string regarding the mobile signal in particular).

It does take some time to find what you need, but may in the end be a quicker solution until/if it is implemented in the base firmware.

There especially is a lot of data that can be recovered through the API of the router, documented here: https://developers.teltonika-networks.com/

With that in mind, you can add a new SMS command in Services → Mobile utilities → SMS utilities of Action type to execute a custom script:

Example of the script (really amateurish):

#!/bin/sh

number=$1

# Get device uptime
device_uptime=$(api GET /system/device/usage/status | jsonfilter -e '@.http_body.data.uptime')

# Create a string to be sent via SMS
SMS_uptime=$(echo "Device uptime: $device_uptime")

# Get mobile connection uptime in seconds
mobile_uptime_seconds=$(api GET /interfaces/basic/status | jsonfilter -e '@.http_body.data[@.interface="mob1s1a1"].uptime')

# Calculate it to hours, minutes, and seconds
hours=$((mobile_uptime_seconds / 3600))
minutes=$(((mobile_uptime_seconds % 3600) / 60 ))
seconds=$((mobile_uptime_seconds % 60))

# Format the output from seconds to hh:mm:ss
formatted_uptime=$(printf "%02dh %02dm %02ds" $hours $minutes $seconds)

# Create a string to be sent via SMS
SMS_time=$(echo "Mobile uptime: $formatted_uptime")

# Get mobile signal strength value
signal_strength=$(gsmctl -q | grep 'RSSI' | awk '{print $2}')

# Sors the signal to excellent/good/fair to poor/poor
if [ "$signal_strength" -gt -65 ]; then
    signal="Excellent"
elif [ "$signal_strength" -gt -75 ]; then
    signal="Good"
elif [ "$signal_strength" -gt -85 ]; then
    signal="Fair to Poor"
else
    signal="Poor"
fi

SMS_signal=$(echo "Signal strength: $signal_strength ($signal)")

# Create a string to be sent via SMS
echo $SMS_signal

# Send the data via SMS 
gsmctl -S -s "$number $SMS_signal,$SMS_time,$SMS_uptime"

With the above script, you will need to add one additional component to the SMS message before sending it - the receiver’s number. The overall SMS command will look as follows:

  • Password123 Some_custom_data 003706xxxxxxx
    • 003706xxxxxxx is a placeholder for a phone number.

Here is the actual result:

It is by no means ideal, but shows how much customization can be achieved on Teltonika devices.

Best regards,