Greetings to all! I hope my article will be interesting not only to radio amateurs who are present at Habré, but also to the rest of the readers.
Who are radio amateurs, you can read
here , and what a Dx-cluster -
here .
A bit of background: once in one of the amateur radio
reflectors, the idea of sending a text message to the DX-cluster slipped, because there is no Internet coverage everywhere. But the idea was thrown back by radio amateurs who work / are directly related to mobile operators. This was motivated by the fact that the equipment will be very expensive, so the idea is not worth it.
')
I became interested in this topic and it was decided to put together a
smstools , a mobile phone and a DX cluster.
This scheme successfully started on my home server running FreeBSD. Now I decided to do everything too, but on the
D-link DIR-620 router
Equipment:
- Dir-620 router with Zyxel Keenetic firmware;
- Motorola v360 mobile phone (old phone of the wife, lying around as a reserve);
- straight arms and desire;
I will not tell about smstools, already this question was highlighted on Habré
here .
And the article on Habré how to flash a router is
here .
So, we connect the phone and make sure that the router sees it:
dmesg
...
...
cdc_acm 1-1.4.3:1.0: ttyACM0: USB ACM device
Next, collect smstools. How to build your packages is written in detail with
Zyxmon here . Because smstools is not included in the standard OpenWrt utilities, so download the source
from here and unzip it.
You need to build it using the Keenetic cross compiler. To do this, in the smstools3 / src / Makefile file you need in the line:
CC = gcc
specify the path to the cross compiler. I have so:
SS = / home / igor / keenetic / staging_dir / toolchain-mipsel_r2_gcc-4.1.2_uClibs-0.9.30.3 / bin / mipsel-openwrt-linux-uclibc-gcc
Make make. In smstools3 / src / we get the daemon file of the smsd sms server, which we copy to the file system in / media / DISK_A1 / system / usr / bin. At the same time in the directory / media / DISK_A1 / system / etc put the configuration file smsd.conf, which is required to run smsd.
My configuration file:
devices = GSM1
logfile = /media/DISK_A1/system/var/log/smstools/smsd.log
loglevel = 7
[GSM1]
device = /dev/ttyACM0
incoming = yes
check_memory_method = 31
smsc = 38097*******
baudrate = 115200
rtscts = no
Also for smsd to work, you need to create the following directories:
mkdir -p / media / DISK_A1 / system / var / log / smstools
mkdir -p / var / spool / sms / checked /
mkdir -p / var / spool / sms / outgoing /
mkdir -p / var / spool / sms / incoming /
We start the sms-server:
# smsd -c /media/DISK_A1/system/etc/smsd.conf
We send a test SMS message to the phone of this type:
(frequency DX station comment)
14144.0 UE1WFF WFF !!!
In the / var / spool / sms / incoming / directory there will be a text file of the following type:
From: 777
From_TOA: 81 unknown, ISDN/telephone
From_SMSC: 380672020000
Sent: 12-03-26 10:06:43
Received: 12-03-26 09:28:39
Subject: GSM1
Modem: GSM1
IMSI: 255030564719214
Report: no
Alphabet: ISO
Length: 57
14144.0 UE1WFF WFF!!!
***
It remains only to take the desired line and send it to the DX-cluster. To do this, we write a simple perl script. I have to say that I did not program in perl, so maybe the script can be written better ...
#!/media/DISK_A1/system/usr/bin/perl
$k=0;
my @curfiles=glob('*.{txt}');
$count=1;
while ($name=glob('*.{txt}')) {
$count++;
}
$count=$count-2;
for ($k=0; $k<=$count; $k++)
{
open FILE,$k.'.gsm.txt';
$i=0;
while ()
{
$i++;
if ($i==12) { $string=};
}
close FILE;.
unlink $k.'.gsm.txt';
use Net::Telnet ();
my $my_call = '******';
my $my_pass = '******';
my $myspot='DX '.$string;
my $t = Net::Telnet->new(Host => '19*.15*.23*.25*', Port => '9****', Timeout => 10);
$t->waitfor('/Callsign : /');
$t->print($my_call);
$t->waitfor('/Password : /');
$t->print($my_pass);
$t->waitfor('/****** de ****** >/');
$t->print($myspot);
print @lines;
$t->print("bye");
$t->close;
}
, . .
sms- ,
, - , :)
!