Get your FOX board a host and domain name via no-ip dyndns service.
Approach your FOX board from all over the world, via world wide web ...
Dyndns is a good solution, your current foxBoard IP address is monitored by a daemon who forwards it to a dyndns server,
which updates the dns-server.
A lot of these services are for free !
One of these free services is http://www.no-ip.com.
Register at their website and add a host.
Install the Axis SDK on your Linux box and go to the /home/fox/devboard-R_01 directory and type:
# . init_env Prepending "/..../devboard-R2_01/tools/build/bin" to PATH. Prepending "/usr/local/cris/bin" to PATH. # cd apps
Install no-ip client software: http://www.no-ip.com/downloads.php?page=linux
# wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz # tar xzvf noip-duc-linux.tar.gz # cd noip-2.1.7
Do NOT use the Makefile from noip ...
Edit a new file and save it with the name makefile:
AXIS_USABLE_LIBS = UCLIBC GLIBC include $(AXIS_TOP_DIR)/tools/build/Rules.axis PROGS = noip2 all: $(PROGS) $(PROGS): $(PROGS).o $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ clean: rm -f $(PROGS) *.o core
If your program will run on a FOX with glibc library (delivered by default with the FOX with Kernel 2.4.x) type:
# make cris-axis-linux-gnu make[1]: Entering directory `/home/devboard-R2_01/apps/noip-2.1.7' make[1]: Leaving directory `/home/devboard-R2_01/apps/noip-2.1.7'
Inside the directory noip-2.1.7 will be created a hidden file .target-makefrag that has instructions for the make process on which general library and environment to consider during the compilation phase.
# make
Now to run this program you have to transfer it on the FOX board. The easiest way is to use SCP:
# scp noip2 root@192.168.1.90:/mnt/flash
Open a putty session and login
go to the directory /mnt/flash
# cd /mnt/flash
and launch your No-IP program on the FOX board:
# ./noip2 -C -c /tmp/no-ip2.conf
The installation wizard is started, and a conf file is created:
Auto configuration for Linux client of no-ip.com. Please enter the login/email string for no-ip.com: xxxxxxx Please enter the password for user 'xxxxxxx' ******** Only one host [inktvis75.no-ip.org] is registered to this account. It will be used. Please enter an update interval:[30] Do you wish to run something at successful update?[N] (y/N) N New configuration file "/tmp/no-ip.conf" created.
Move the config file:
# cd tmp # mv no-ip2.conf /etc/ # cd ..
Start the daemon:
# ./noip2 -c /etc/no-ip2.conf
Enable the same port in your router, modem, as you defined in /mnt/flash/etc/httpd.conf.
... server.port = 80 ...
You can create a start/stop script
#!/bin/sh
# Description: Start / Stop No-IP service
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME="No-IP"
DESC="DNS Services"
case "$1" in
start)
echo "Starting $DESC: $NAME."
/mnt/flash/noip2 -c /etc/no-ip2.conf
/mnt/flash/noip2 -S -c /etc/no-ip2.conf
echo " "
;;
stop)
echo -n "Stopping $DESC: $NAME"
killall noip2
echo "."
;;
restart)
$0 stop
$0 start
;;
show)
/mnt/flash/noip2 -S -c /etc/no-ip2.conf
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|show}" >&2
exit 2
;;
esac
exit 0
And run the following to have it startup and stop on system start/shutdown.
Give noip its access rights. Then make a symbolic link to
stop the service when the FOX board is shutting down.
# cd /etc/init.d # chmod 0700 /etc/init.d/noip # chown root:root /etc/init.d/noip # ln -s /etc/init.d/noip S97noip # ln -s /etc/init.d/noip K04noip
The scripts in the directory/etc/init.d/starting withS[number]are automatically run during system startup with parameterstart.
The number defines the order the scripts are run.
Likewise, scripts starting withK[number]are run when the system is shutting down with parameterstop.