FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
294 views 1 comments
by anonymous
When setting up NTRIP on the new RUT955 firmware (currently) 07.03.3

The NTRIP server form only allows for a ipv4 address - we prefer/need to use a hostname such as (for example) "ntrip.data.gnss.ga.gov.au" as sometimes the ip address of our server may/will change.

Is there a way to enable this?

Thankyou

1 Answer

+1 vote
by anonymous

Hi,

Currently, you cannot use a hostname for NTRIP client configuration.

As a workaround, you can use the following script:

#!/bin/sh

# Hostname to resolve

hostname=ntrip.use-snip.com

# Get current IP from UCI NTRIP

current_ip=$(uci get rs_ntrip.1.ntrip_ip)

# Resolve hostname to IP using nslookup

new_ip=$(nslookup $hostname | grep 'Address 1:' | cut -d ' ' -f3)

# Compare current and resolved IPs

if [ "$current_ip" != "$new_ip" ]; then

  # Update UCI NTRIP with new IP

  uci set rs_ntrip.1.ntrip_ip=$new_ip

  uci commit

  /etc/init.d/rs_ntrip restart

  logger "NTRIP IP updated to $new_ip"

else

  logger "No update needed, NTRIP IP is already set to $current_ip"

fi

To create a script, connect to the device via CLI/SSH (CLI information here) and execute the following commands to create a file, allow script execution and edit the file:

  • touch /etc/ntripip.sh
  • chmod +x /etc/ntripip.sh
  • vi /etc/ntripip.sh

You will open a text editor. Press 'i' to start editing. Copy this script (change the hostname that you want to resolve) and paste it into the file. Save the script by pressing  'esc' button, typing ':wq' and pressing 'enter'. The script should be created.

This script resolves your defined hostname to an IP address and checks if it is the same as in the NTRIP settings. If the IP address is different, it changes it to a newly resolved IP address.

You can add this script to crontab to execute at specific intervals. (Crontab information here). Hence, if the IP address of the hostname changes, the script should change the IP address in the NTRIP settings.

To add the script to crontab, execute the following command and add your script:

  • crontab -e

Add a line as in the image below. (you can refer to crontab wiki page mentioned before to change how often the script should run, in my example its every minute).

Kind Regards,

Andzej

by anonymous
Thanks for the reply,

Is then any eta as to when this may be implemented into the NTRIP package itself rather then a work around?

Thanks