Author Topic: AIS Decoder - beta release  (Read 32037 times)

shaolin

  • Seaman
  • *
  • Posts: 3
    • View Profile
Re: AIS Decoder - beta release
« Reply #30 on: 03 August, 2014, 10:41:59 am »
Ok, thank you very much!

timyboyb

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - beta release
« Reply #31 on: 21 November, 2014, 03:29:05 pm »
Hello,

I've just tried to install the soundcard version (just AISdecoder) but when I use the cmake command it asks for libasound-dev and libpulse-dev. When I install them it installs an newer version: libasound2-dev so still says it needs libasound-dev.  How can I solve this problem?

Where can I find a good walktrough for the RTL-SDR version on a raspberry Pi? I have an RTL-SDR as well but I-m still a newby on the linux part. I have a kplex running so I understand a little now.

sven98de

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - beta release
« Reply #32 on: 12 December, 2014, 04:06:04 pm »
Hi,
is it possible to receive both AIS channels simultaneously with the RTL2832 as well,
or is this only possible with the soundcard ?

Sven


Hi this also works with the RTL2832U (RTL SDR usb sticks) tested with R820T tuner.

Usage is as follows:

create a common fifo
mkfifo /tmp/aisdata

open one terminal with rtl_fm, writes to fifo:
rtl_fm -f 161975000 -g 40 -p 95 -s 48k -r 48k /tmp/aisdata

open a second terminal with aisdecoder, reads from fifo:
./aisdecoder -h 127.0.0.1 -p 10110 -a file -c mono -d -l -f /tmp/aisdata

using opencpn and configuring a UDP port with IP 0.0.0.0 and port 10110 you can see received AIS positions in realtime.

important usage of rtl_fm:
for second AIS frequency use  -f 162025000
fine tune gain parameter (-g )  and most important ppm error ( -p )

best
Fred

dirk

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - beta release
« Reply #33 on: 24 December, 2014, 03:22:32 pm »
Hi folks,

i have build the aisdecoder on raspberry, but shipplotter or opencpn don't show any results. How coult i test the aisdecoder?

The output from RTL2832U Stick

root@raspberrypi:~# rtl_fm -f 161975000 -g 40 -p 95 -s 48k -r 48k /tmp/aisdata
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner

Tuner gain set to 40.20 dB.
Tuner error set to 95 ppm.
Tuned to 162227000 Hz.
Oversampling input by: 21x.
Oversampling output by: 1x.
Buffer size: 8.13ms
Exact sample rate is: 1008000.009613 Hz
Sampling at 1008000 S/s.
Output at 48000 Hz.

start the docoder with
./aisdecoder -h <receiverIP e.g. Shipplotter> -p 10110 -a file -c mono -d -l -f /tmp/aisdata

the start of aisdecoder show the result
Levol on ch 0: 50%

I am shure that in the near are sending ships

thanks
Dirk

ftollenaar

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - beta release
« Reply #34 on: 31 December, 2014, 02:48:00 pm »
Hi guys,

I have successfully built an collinear AIS antenna, and tested everything using SDR#, Shipplotter and AISMon. Works, but, I'm not a windows guy so I set about doing the same on Linux by following the instructions on this forum.

aisdecoder isn't demodulating anything, which leads me to believe that the settings in rtl_fm aren't correct. How would I go about fine-tuning these? Please note how, in the results below, rtl_fm isn't actually tuned to the right frequency (I know it isn't hw frequency accurate, but no idea on how to fine tune this).

Commands (terminal 1):
Code: [Select]
$ mkfifo /tmp/aisdata
Code: [Select]
$ rtl_fm -f 162025000 -g 60 -p 95 -s 48k -r 48k /tmp/aisdata
Results (terminal 1):
Code: [Select]
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to 49.60 dB.
Tuner error set to 95 ppm.
Tuned to 162277000 Hz.
Oversampling input by: 21x.
Oversampling output by: 1x.
Buffer size: 8.13ms
Exact sample rate is: 1008000.009613 Hz
Sampling at 1008000 S/s.
Output at 48000 Hz.

Commands (terminal 2):
Code: [Select]
$ aisdecoder -h 127.0.0.1 -p 10110 -a file -c mono -d -l -f /tmp/aisdata
Results (terminal 2):
Code: [Select]
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 48 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 49 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 46 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
Level on ch 0: 50 %
# etc

Any ideas?

pit0711

  • New User
  • *
  • Posts: 4
    • View Profile
Re: AIS Decoder - beta release
« Reply #35 on: 03 January, 2015, 02:15:26 pm »
I have the same problem on my raspi with R820T stick.
No Data with that commands.
I receive Ships here, i tested with Windows Software.

Please help.


gustavo

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - beta release
« Reply #36 on: 13 January, 2015, 12:48:15 pm »
I'm trying to use the option -D because I have two audio cards one for each frequency, however unsuccessfully, give me an example of how to use?

Thank U.
thanks



/aisdecoder -hlocalhost -p12345 -aalsa -Dlist
Generic USB Audio Device, USB Audio
Default Audio Device
Input/Output: <default:CARD=Device>

Generic USB Audio Device, USB Audio
Default Audio Device
Input/Output: <sysdefault:CARD=Device>

Generic USB Audio Device, USB Audio
Front speakers
Input/Output: <front:CARD=Device,DEV=0>

Generic USB Audio Device, USB Audio
4.0 Surround output to Front and Rear speakers
Input/Output: <surround40:CARD=Device,DEV=0>

Generic USB Audio Device, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
Input/Output: <surround41:CARD=Device,DEV=0>

Generic USB Audio Device, USB Audio
5.0 Surround output to Front, Center and Rear speakers
Input/Output: <surround50:CARD=Device,DEV=0>

Generic USB Audio Device, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
Input/Output: <surround51:CARD=Device,DEV=0>

Generic USB Audio Device, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
Input/Output: <surround71:CARD=Device,DEV=0>

Generic USB Audio Device, USB Audio
IEC958 (S/PDIF) Digital Audio Output
Input/Output: <iec958:CARD=Device,DEV=0>


pit0711

  • New User
  • *
  • Posts: 4
    • View Profile
Re: AIS Decoder - beta release
« Reply #37 on: 12 February, 2015, 09:44:15 pm »
I got it working, with this settings and a new antenna.

rtl_fm -f 161974534 -g -10 -p 96 -s 48k -r 48k /tmp/aisdata

./aisdecoder -h 192.168.0.116 -p 10110 -a file -c mono -d -f /tmp/aisdata


The problem is, the aisdecoder is crashing ever ~5 minutes.
How to prevent this, or how to auto restart?

http://abload.de/img/ais2yvzvs.png
« Last Edit: 12 February, 2015, 09:59:49 pm by pit0711 »

pit0711

  • New User
  • *
  • Posts: 4
    • View Profile
Re: AIS Decoder - beta release
« Reply #38 on: 13 February, 2015, 02:35:07 pm »
to restart the decoder after crash i use deamontools as described in this tutorial, pretty easy: http://www.heise.de/developer/artikel/Serengeti-darf-nicht-sterben-2213734.html

next problem is aisdecoder and rtl_fm process have together 200% cpu load.
is there an way to optimize the load?

can someone with raspberry pi 2 please test perfomance, thanks.

pit0711

  • New User
  • *
  • Posts: 4
    • View Profile
Re: AIS Decoder - beta release
« Reply #39 on: 18 February, 2015, 02:41:59 am »
ok, the method with file output to /tmp/aisdata is not good because the tempfile gets bigger and bigger (2 Gb) and aisdecoder does wrong decoding.


i try now this method with piping:

First create a named pipe in a folder at your choice

Code: [Select]
mkfifo aispipe

rtl_fm -f 161974534 -g -10 -p 96 -s 48k -r 48k "path to aispipe"

./aisdecoder -h 192.168.0.116 -p 10110 -a file -c mono -d -f "path to aispipe"

i will test this now for a few days and i will watch data

jaherring

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - beta release
« Reply #40 on: 08 June, 2015, 05:04:46 am »
Hi, is there a way to use this software with a serial input instead of the audio input?  I basically want the sentence decoding and database logging part of the software but I'm using a receiver that has only serial output.

Thanks...

ulrikk

  • New user
  • Posts: 1
    • View Profile
Re: AIS Decoder - not able to start
« Reply #41 on: 28 July, 2015, 11:02:15 am »
Hello I have maybe a simple problem, but I am not very experienced in Linux on raspberry

I cannot run aisdecoder after the installation below. It it looks like this

 pi@fenixwx ~/Downloads/aisdecoder-1.0.0/build $ cmake ../ -DCMAKE_BUILD_TYPE=RELEASE
-- Build configuration: RELEASE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/Downloads/aisdecoder-1.0.0/build
pi@fenixwx ~/Downloads/aisdecoder-1.0.0/build $ make
[ 43%] Built target aisdecoder_static_lib
[ 56%] Built target aisdecoder
[100%] Built target aisdecoder_dynamic_lib

pi@fenixwx ~/Downloads/aisdecoder-1.0.0/build $ aisdecoder
-bash: aisdecoder: kommandot finns inte


the message is in Swedish but says that the command doesn't exist. 

The file aisdecoder exist in build.

Any suggestions how to proceed?
TIA
Ulrikk