Posts: 29
Threads: 8
Joined: 2013-03-19
Hello,
I want to restart my green station and use a raspberry pi 2 to transmit data. anyone have a tutorial for using a raspberry? Thank you in advance for your assistance.
Posts: 244
Threads: 23
Joined: 2013-02-20
2016-01-14, 20:34
(This post was last modified: 2016-01-14, 20:35 by Steph.)
I don't have a tutorial, but i would be starting with the openwrt tracker:
https://github.com/KiNgMaR/blitzortung_tracker_openwrt
It's compiling nicely on my x86 debian, so it should also work on the raspi;
fetch the package:
Code:
git clone https://github.com/KiNgMaR/blitzortung_tracker_openwrt.git
go to the subdirectory and build the tracker:
Code:
cd blitzortung_tracker_openwrt/package/blitzortung_tracker/src && make
after it compiled, you should have an executable blitzortung_tracker which can be invoked by a script in /etc/init.d/ so it will run on startup. Some example init-scripts are supplied by the package.
Posts: 29
Threads: 8
Joined: 2013-03-19
Sorry for the late response. I'll try your advice and I'll let you know. Thank you.
Posts: 29
Threads: 8
Joined: 2013-03-19
2016-02-02, 08:23
(This post was last modified: 2016-02-02, 08:24 by ArnouldJ.)
The configuration of my Raspberry Pi2 and over and I just finished compiling the tracker that seems to work. Only I do not know which lines to edit in the initscript to operate the tracker with my station.
Here is the script:
Code:
#!/bin/sh /etc/rc.common
# (C) Copyright 2012 Ingmar Runge <ingmar@irsoft.de>
START=97
APP=blitzortung_tracker
PID_FILE=/var/run/$APP.pid
EXTRA_COMMANDS="check"
EXTRA_HELP=" check Probes if the tracker is running and tries to start it if it isn't."
blitzortung_start() {
local section="$1"
local enabled
config_get_bool enabled "${section}" enable 1
[ "${enabled}" -eq 0 ] && return 1
local GPS
local BAUDRATE
local GPS_BAUDRATE
local SERIAL_DEVICE
local USERNAME
local PASSWORD
local REGION
config_get GPS "${section}" gps
config_get BAUDRATE "${section}" baudrate
config_get GPS_BAUDRATE "${section}" gps_baudrate
config_get SERIAL_DEVICE "${section}" device
config_get USERNAME "${section}" username
config_get PASSWORD "${section}" password
config_get REGION "${section}" region
if [ "${SERIAL_DEVICE}" = "auto" ]; then
for f in $(echo "/dev/ttyUSB0 /dev/usb/tts/0 /dev/ttyUSB1 /dev/usb/tts/1" | tr " " "\n"); do
if [ -e "$f" ]; then
SERIAL_DEVICE=$f
break
fi
done
fi
[ ! -e "${SERIAL_DEVICE}" ] && echo "Serial device not found." && return 1
[ -z "${USERNAME}" ] && echo "Empty username." && return 1
[ -z "${PASSWORD}" ] && echo "Empty password." && return 1
# not checking BAUDRATE, GPS_BAUDRATE and REGION because LuCi's should take care of getting those right
# and those using the uci command line should know what they are doing.
start-stop-daemon -S -x /bin/$APP -p $PID_FILE -m -b -- -L -bg $GPS_BAUDRATE -bt $BAUDRATE $GPS $SERIAL_DEVICE $USERNAME $PASSWORD $REGION
}
start() {
config_load "${APP}"
config_foreach blitzortung_start blitzortung
}
stop() {
start-stop-daemon -K -p $PID_FILE -s TERM
rm -f $PID_FILE
}
check() {
if [ -e $PID_FILE ]; then
# check if process accepts signals / is running:
kill -0 `cat $PID_FILE` >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Tracker running."
return
fi
fi
echo "Tracker not running, starting..."
start
}
Posts: 244
Threads: 23
Joined: 2013-02-20
I guess that init script is openwrt specific. Depending on the distribution you're running on the RasPi you should find some example init script.
You'll find the parameters need to be set by running ./blitzortung_tracker --help ;
Code:
****** Blitzortung.org Linux Tracker XT 3 OpenWrt ******
Usage:
./blitzortung_tracker [options] gps_type serial_device [username password region]
Main parameters:
gps_type : gps type (SANAV, Garmin, or SiRF)
use '-' for no initialization
serial_device : serial device (examples: /dev/ttyS0 or /dev/ttyUSB0)
username : username (example: PeterPim)
password : password (example: xxxxxxxx)
region : region (1 = Europe, 2 = Oceanien, 3 = USA, 4 = Japan)
Common options:
-bt baudrate : tracker baudrate (alternative: --baudrate)
possible values:
4800, 9600, 19200, 38400, 115200, 500000, 2500000
default = 115200
-bg baudrate : gps baudrate (alternative: --baudrate_gps)
possible values: 4800, 9600, 19200, 38400 (default = 4800)
-s : activate SBAS "WAAS/EGNOS/MSAS" (alternative: --SBAS)
-p port : activate HTTP Server on <port> (alternative: --server_port)
Note: Do not forward this port to the internet unless you
know what you are doing!
Posts: 41
Threads: 13
Joined: 2012-08-01
2018-04-15, 22:12
(This post was last modified: 2018-04-20, 22:45 by Phoenix-Blue.)
Hi,
I'm trying to run on the same wat on an raspberry pi the tracker, but I think I do something wrong in the command line.
I use now ./blitzortung_tracker -bg 9600 SiRF /dev/ttyUSB0 user password 1
But I see nothing happened, any tips?