As both the remote station pc and the control pc external IP address are dynamically assigned, the first step is to get the address of the remote station computer. This python script does the job in combination with a cron job and associated cron mail output.
---------------------------------------------------------------------------
#!usr/bin/python
#
# Program gets your external IP address
#
# This program reads the title from
# the whatismyip.com website
#
# set up SSMTP then put the following line in crontab:
# 0 * * * * python /home/geoff/python/ipadd3_new.py
#
# Cron job will mail output to nominated mail a/c
# on the hour with the above.
#
# The ip address is written to file
# ext_ip_add.txt (overwritten)
#
# Version 1.0 Geoff Robinson Aug 09
fileobject1=open('/home/geoff/python/ext_ip_add.txt','r')
oldipaddress = fileobject1.readline()
fileobject1.close
import urllib
url = urllib.URLopener()
resp = url.open('http://www.whatismyip.com/automation/nxxxxxxxx.asp')
html = resp.read()
newipaddress = html
if newipaddress == oldipaddress:
print 'your external inter net address has not changed, your address is still'
print oldipaddress
else:
print 'you have a new external inter net address, your address is now'
print newipaddress
# This section writes the external
# IP address to ext_ip_add.txt file
fileobject=open('/home/geoff/python/ext_ip_add.txt','w')
fileobject.write(html)
fileobject.close()
---------------------------------------------------------------------------
The simplest remote control method for a CW transmitter is with cwdaemon. Install in Ubuntu 9.04 and run cwsetup as root from /usr/share/cwdaemon on the remote station pc with sh cwdaemon.sh - ignore 'you must run as root'. Then from same directory
sudo cwdaemon -d ttyUSB0 -s 20
the serial port label (d = device) is got from running dmesg and the cw speed (-s) is 20 wpm.
on the control pc start netcat and use the ip address from the cron job mail as follows:
nc -u 82.34.192.65 6789
+ or - to change cw speed,
ESC5 to exit
ESC4 to abort message
ESC0 to reset to 24 wpm etc.
---------------------------------------------------------------------------
#!usr/bin/python
#
# Program gets your external IP address
#
# This program reads the title from
# the whatismyip.com website
#
# set up SSMTP then put the following line in crontab:
# 0 * * * * python /home/geoff/python/ipadd3_new.py
#
# Cron job will mail output to nominated mail a/c
# on the hour with the above.
#
# The ip address is written to file
# ext_ip_add.txt (overwritten)
#
# Version 1.0 Geoff Robinson Aug 09
fileobject1=open('/home/geoff/python/ext_ip_add.txt','r')
oldipaddress = fileobject1.readline()
fileobject1.close
import urllib
url = urllib.URLopener()
resp = url.open('http://www.whatismyip.com/automation/nxxxxxxxx.asp')
html = resp.read()
newipaddress = html
if newipaddress == oldipaddress:
print 'your external inter net address has not changed, your address is still'
print oldipaddress
else:
print 'you have a new external inter net address, your address is now'
print newipaddress
# This section writes the external
# IP address to ext_ip_add.txt file
fileobject=open('/home/geoff/python/ext_ip_add.txt','w')
fileobject.write(html)
fileobject.close()
---------------------------------------------------------------------------
The simplest remote control method for a CW transmitter is with cwdaemon. Install in Ubuntu 9.04 and run cwsetup as root from /usr/share/cwdaemon on the remote station pc with sh cwdaemon.sh - ignore 'you must run as root'. Then from same directory
sudo cwdaemon -d ttyUSB0 -s 20
the serial port label (d = device) is got from running dmesg and the cw speed (-s) is 20 wpm.
on the control pc start netcat and use the ip address from the cron job mail as follows:
nc -u 82.34.192.65 6789
+ or - to change cw speed,
ESC5 to exit
ESC4 to abort message
ESC0 to reset to 24 wpm etc.
Comments