• /// x-108.com in a new style
    /// After more than 4 years it was time to update the forum to the latest version. We also decided on a new design...

Tutorial DXSpider on Raspberry PI (1 Viewer)

What do you think about this tutorial ?

  • good only

    Stimmen: 0 0,0%

  • Umfrageteilnehmer
    2

admin

Administrator
Teammitglied
X-108 Member
SITE-ADMIN
SITE-MOD
Registriert
30 November 2014
Beiträge
113
Punkte Reaktionen
65
Punkte
1.027
Ort
Stuttgart
Country
de
Website
do7psl.de
Verified User
YES
Rufzeichen/Call
noCall
Installation of DXSpider on a Raspberry Pi

1. change to root
Code:
sudo su

2. Setup system to install DXSpider
Code:
$ groupadd spider
$ useradd -m sysop -G spider
$ usermod -g spider sysop
- follow the instructions to set the full name and password
- if you are not prompted for a password enter the following and add a password:

Code:
$ passwd sysop
$ adduser sysop sudo

Code:
$ hostname dx-pi
- any hostname will do


3. Begin downloading perl libraries.
Code:
$ apt-get install libtimedate-perl libnet-telnet-perl libcurses-perl libdigest-sha-perl libdata-dumper-simple-perl
- Adds the necessary perl modules for DXSpider
4. Finalize the Sysop setup and restart the RPi.
Code:
# cd ~sysop
# ln -s /home/sysop/spider /spider
# shutdown -r now
- after restart login as sysop

5. Load DXSpider software
Code:
$ cd ~
$ mkdir spider
$ git clone git://scm.dxcluster.org/scm/spider spider.new
$ cp -a /home/sysop/spider.new/.git /spider
$ rm -rf spider.new
$ cd /spider
$ git reset --hard

6. Setup permissions on DXSpider files

Code:
$ sudo su
# cd /home/sysop
# chown -R sysop:spider spider
# find . -type d -exec chmod 2775 {} \;
# find . -type f -exec chmod 775 {} \;
# exit

7. Setup DXSpider initialization and parameter files
Code:
$ cd /spider
$ mkdir local
$ mkdir local_cmd
$ cp perl/DXVars.pm.issue local/DXVars.pm
$ cp perl/Listeners.pm local/Listeners.pm
$ cd local
$ nano
- edit DXVars.pm following the instructions in the comments
- edit Listeners.pm to remove “#” from the line for the port, and add additional ports as needed:


Code:
@listen = (
    [“0.0.0.0”, 7300],
);
- exit mc

8. Begin setup of DXSpider
Code:
$ cd /spider/perl/
$ ./create_sysop.pl
$ cd /tmp
$ wget http://ftp.w1nr.net/usdbraw.gz

9. Begin Setup of usdbraw file
Code:
$ /spider/perl/create_usdb.pl /tmp/usdbraw.gz
- The step can take a few minutes

10. Compile DXSpider client
Code:
$ cd /spider/src
$ make

11. Launch DXSpider
Code:
$ cd /spider/perl
$ ./cluster.pl

12. On a separate ssh or system console, log into the system as sysop
Code:
$ /spider/perl/console.pl

13. From the command line of the console enter 'load/usdb':
Code:
dx-pi de dx-pi-6 16-Mar-2014 2106Z dxspider > load/usdb

14. Change /etc/inittab to add the following two lines at the end of the file to allow for initiation of DXSpider on boot, and respawning of the process in case of failure.
Code:
nano /etc/inittab
Code:
##Start DXSpider on bootup and respawn it should it crash
DX:2345:respawn:/bin/su -c "/usr/bin/perl -w /spider/perl/cluster.pl" sysop >/dev/tty6

Running your DXSpider node

To receive DX Spots you will have to arrange with another Sysop to connect to another node.

1. Contact a potential link partner, and arrange for a connection into the DX spotting network. You can do this by soliciting a link partner on the Dxpsider-support list. The list information is at . Once the partner is found and the adjacent node is configured to accept your connection, you can configure your DXSpider node to connect into the spotting network. There are excellent documented instructions available at in the “DXSpider Installation Manual” Paragraph 6.5.

To configure your node you must set the adjacent node by node type:
For connection to a DXSpider node use the set/spider command from the console

Code:
$ /spider/perl/console.pl
–-----
dx-pi de dx-pi-6 16-Mar-2014 2107Z dxspider > set/spider <adjacent_node_callsign>
- Enter your link partner as <adjacent_node_callsign> after set/spider

For a connection to an ARCluster node
Code:
$ /spider/perl/console.pl
–-----
dx-pi de dx-pi-6 16-Mar-2014 2108Z dxspider > set/arcluster <adjacent_node_callsign>

2. The next step is to create a connect script to allow connection to your adjacent node partner. Detailed information on connect scripts is containe in the “DXSpider Installation Manual” Paragraph 6.6.
Code:
$ touch /spider/connect/<adjacent_node_callsign>
$ nano /spider/connect/<adjacent_node_callsign>
- creates the connect script file and enters the editor

Your connect script should look similar to this script
Code:
# /spider/connect/<adjacent_node_callsign>
#
# Create a timeout for the connection attempt in seconds
timeout 15
#
# Initiate telnet connections via internet using telnet connection information
# This connection may be using IP address or hostname followed by port number
connect telnet cluster.xyz.com 7300
#
# substitute the callsigne of your DXSpider node as <your_node_callsign>
'login:' '<your_node_callsign>'
#
# If you require a password to connect to your adjacent node partner include the following # substitute the muturally arranged password for <password>
'Password:' '<password>'
#
# End of /spider/connect/<adjacent_node_callsign>

3. To initiate a connection to the your new adjacent node partner
Code:
$ /spider/perl/console.pl
–-----
dx-pi de dx-pi-6 16-Mar-2014 2108Z dxspider > connect <callsign>
- You should see the connection confirmation and DX spots should start appearing.

with netstat you can check the connections
Code:
netstat -tu

it seems something like this:cool: (to 2 nodes connected)
Code:
Proto Recv-Q Send-Q Local Address           Foreign Address         State     
tcp        0      0 192.168.2.10:32986      f6bvp.org:7300          VERBUNDEN
tcp        0      0 192.168.2.10:37536      89.81.132.153:7301      VERBUNDEN

 
Zuletzt bearbeitet:

X-Boarder

Crack-Boarder
X-108 Member
Registriert
16 Januar 2015
Beiträge
27
Punkte Reaktionen
8
Punkte
3
Alter
58
Verified User
YES
at least you need a cron and a connect script to connect to the nodes automatically WtfClown
for examble - your node parter is: dl1dl-3

become root
Code:
sudo su

cron
Code:
touch /spider/local_cmd/crontab
nano /spider/local_cmd/crontab

the cron like this:
Code:
# Check every 10 minutes to see if xxxx is connected and if not
# start a connect job

0,5,10,20,30,40,50 * * * * start_connect('dl1dl') unless connected('dl1dl-3')

connect script
Code:
touch /spider/connect/dl1dl-3
nano /spider/connect/dl1dl-3
Code:
timeout 60
abort (Busy|Sorry|Fail)
# don't forget to chmod 4775 netrom_call!
connect telnet dl1dl.org 7300
'login' 'do7psl-3'
client dl1dl-3 telnet

RememberWacky
you should ask your node partner for his node-Call (with SSID) and your node partner must register your node-Call (with SSID) in his configuration. otherwise your DXSpider does not workFinger
 
Zuletzt bearbeitet von einem Moderator:

X-108

Crack-Boarder
Teammitglied
X-108 Member
SITE-MOD
Registriert
17 Januar 2015
Beiträge
27
Punkte Reaktionen
19
Punkte
3
Alter
54
Ort
Stuttgart
Website
www.x-108.com
Verified User
YES
Cluster application is writing a lot of data taking a large disk space.Rage

In order to remove regularly old data in /spider/data/log, /spider/data/debug and /spider/data/spots a symbolic link has been created toward /NULL device and a script in /etc/cron.daily will clean up old cluster data automatically.

Code:
sudo su

create the scripts:

Code:
touch /etc/cron.daily/spider
nano /etc/cron.daily/spider

with this content: (think on the actually year!) Watching

Code:
#!/bin/sh

# We need to delete old files.

spiderdir="/spider/data/spots/2015"

if [ -n "$spiderdir" ] && [ -d "$spiderdir" ]; then
    # only keep three days' depth of these
    find "$spiderdir" -type f -mtime +3 -exec rm {} \;
fi
spiderdir="/spider/data/debug/2015"

if [ -n "$spiderdir" ] && [ -d "$spiderdir" ]; then
    # only keep a couple of day's depth of these
    find "$spiderdir" -type f -mtime +2 -exec rm {} \;
fi
spiderdir="/spider/data/log/2015"

if [ -n "$spiderdir" ] && [ -d "$spiderdir" ]; then
    # only keep a week's depth of these
    find "$spiderdir" -type f -mtime +7 -exec rm {} \;

fi

Code:
touch /etc/cron.weekly/clear_log.sh
nano /etc/cron.weekly/clear_log.sh

Code:
#!/bin/sh

# We need to delete old files.

logdir="/var/log"

    rm $logdir/*.gz

clear_log.sh must be executable (chmod a+x clear_log.sh) in order to clean up old log data and recover free space on SD disk.

Code:
chmod a+x /etc/cron.weekly/clear_log.sh
 
Zuletzt bearbeitet von einem Moderator:

X-Boarder

Crack-Boarder
X-108 Member
Registriert
16 Januar 2015
Beiträge
27
Punkte Reaktionen
8
Punkte
3
Alter
58
Verified User
YES
don´t forget to backup your partition Wideyed:mad:

check your hard drives and removal drives
Code:
lshw

In this example sda is your USB driveGreyalien i choose/root folder for store the file

For instance, to make an exact clone of the complete partition to a backup file, you could use:
Code:
dd if=/dev/sda of=/root/partition.img

The file can be compressed after the copy, or during by piping the input to gzip or bzip2:
Code:
dd if=/dev/sda | bzip2 -9f >/root/partition.img.bz2

-f --force
Force overwrite of output files. Normally, bzip2 will not overwrite existing output files. Also forces bzip2 to break hard links to files, which it otherwise wouldn't do.

bzip2 normally declines to decompress files which don't have the correct magic header bytes. If forced (-f), however, it will pass such files through unmodified. This is how GNU gzip behaves.

bzip2 compresses large files in blocks. The block size affects both the compression ratio achieved, and the amount of memory needed for ompression and decompression. The flags -1 through -9 specify the block size to be 100,000 bytes through 900,000 bytes (the default) respec-
tively. At decompression time, the block size used for compression is read from the header of the compressed file, and bunzip2 then allocates itself just enough memory to decompress the file. Since block sizes are stored in compressed files, it follows that the flags -1 to -9 are irrelevant to and so ignored during decompression.


Likewise, partitions can be restored from these backup copies:
Code:
dd if=/root/partition.img of=/dev/sda

or
Code:
bunzip2 -dc /root/partition.img.bz2 | dd of=/dev/sda
 
Zuletzt bearbeitet von einem Moderator:

DO7PSL

Crack-Boarder
Teammitglied
X-108 Member
Registriert
30 November 2014
Beiträge
100
Punkte Reaktionen
6
Punkte
1.008
Ort
Stuttgart
Country
de
Website
do7psl.de
Verified User
YES
Rufzeichen/Call
DO7PSL
to add a DX spider node it must be declared as a spider type.
This is done in file scripts/startup

In this example you want let the node dl1dl-3 connected to your DXSpider (do7psl-3)


Code:
nano /spider/scripts/startup

Code:
#
# startup script example
#
# set maximum no of spots allowed to 100
set/var $Spot::maxspots = 100
set/spider dl1dl-3

The other step is to connect your spider to another node

1) you want to check regularly that a node is connected by adding a dedicated command line in file:
Code:
nano /spider/local_cmd/crontab

For example if want above node do7psl-3 exchange Dx spots with dl1dl-3
Code:
# check every 10 minutes to see if f1oyp-8 is connected and if not
# start a connect job going
0,10,20,30,40,50 * * * * start_connect('dl1dl-3') unless connected('dl1dl-3')

2) you need a connect script
Code:
touch /spider/connect/dl1dl-3
nano /spider/connect/dl1dl-3

connect script for each call present in crontab
Code:
timeout 30
abort (Busy|Sorry|Fail)
connect telnet dl1dl.dyndns.org 7300
'login' 'do7psl-3'
client dl1dl-3 telnet
 
Zuletzt bearbeitet von einem Moderator:

X-Boarder

Crack-Boarder
X-108 Member
Registriert
16 Januar 2015
Beiträge
27
Punkte Reaktionen
8
Punkte
3
Alter
58
Verified User
YES
I recommend the raspberry pi 1x to reboot the day. It is strange - but does not go beyond a simple cronjob that. I have a script written that I will then run a cronjob

Code:
sudo su
touch /home/pi/rboot.sh
nano /home/pi/rboot.sh

rboot.sh
Code:
#!/bin/bash
#reboot the raspberry pi
sudo reboot

make it executable
Code:
chmod a+x /home/pi/rboot.sh

edit the crontab
Code:
crontab -e

Code:
0 0 * * *  sh /home/pi/rboot.sh
0 0 * * * means daily reboot
 
Zuletzt bearbeitet von einem Moderator:

X-108

Crack-Boarder
Teammitglied
X-108 Member
SITE-MOD
Registriert
17 Januar 2015
Beiträge
27
Punkte Reaktionen
19
Punkte
3
Alter
54
Ort
Stuttgart
Website
www.x-108.com
Verified User
YES
paspberry-pi-b+.jpg
 

Users who are viewing this thread

Oben
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock    No Thanks