dgiardini / rtl-ais

A simple AIS tuner and generic dual-frequency FM demodulator
Other
267 stars 89 forks source link

Add make install for linux #19

Closed FredericGuilbault closed 4 years ago

FredericGuilbault commented 4 years ago

@mol1990 Hi, Im assuming you are not speaking English and gonna have to google translate it anyway.

Mon commit ne demande pas de déplacer le fichier dans /bin/ Ou vois tu ca ? Au contraire, il est question d'autmatiser la copie des fichier via make install.

Je recomande de passer /usr/local/ comme perfix a make install Les fichiers qui relèvent du userspace devraient être dans /usr et ceux installer manuellement devraient être dans local

==EDIT== Since I realized the issue tab is closed. To install rtl-ais on Linux one procedure you could do is.

    git clone https://github.com/dgiardini/rtl-ais 
    cd rtl-ais
    make
    sudo make install
    cd ..
    rm -r rtl-ais 

For reference this is how I do it in lysmarineOS https://github.com/lysmarine/lysmarine_gen/blob/master/lysmarine/33-rtl-ais/run.sh

FredericGuilbault commented 4 years ago

@dgiardini If you could open the issue tab, that would avoid having people asking for install instructions by blaming a closed PR.

dgiardini commented 4 years ago

Thanks for the feedback Frederic, issues tab is open now.

On Tue, May 5, 2020 at 10:01 AM Frederic Guilbault notifications@github.com wrote:

@dgiardini https://github.com/dgiardini If you could open the issue tab, that would avoid having people asking for install instructions by blaming a closed PR.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dgiardini/rtl-ais/pull/19#issuecomment-624040802, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBJPTZOA4BCEA3O4JAZGJ3RQAEZBANCNFSM4KX7SOOQ .

--

This message represents the official view of the voices in my head

FredericGuilbault commented 4 years ago

cool, thx

mol1990 commented 4 years ago

Здравствуйте мои друзья! Спасибо за помощь! Программа запустилась, но я не уверен что она работает корректно в связи с тем, что нет возможности принять AIS сигнал в данный момент. Я следовал инструкциям "FredericGuilbault" в следующем порядке:

$ apt-get install -y -q git librtlsdr-dev pkg-config
$ git clone —depth 1 https://github.com/dgiardini/rtl-ais/
$ cd /rtl-ais
$ sudo make
#It is strange that without "sudo" I did not miss it.

Result:

cc -c main.c -o main.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c rtl_ais.c -o rtl_ais.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c convenience.c -o convenience.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
convenience.c: In function ‘atofs’:
convenience.c:51:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
suff *= 1e3;
~~~~~^~~~~~
convenience.c:52:3: note: here
case 'm':
^~~~
convenience.c:54:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
suff *= 1e3;
~~~~~^~~~~~
convenience.c:55:3: note: here
case 'k':
^~~~
convenience.c: In function ‘atoft’:
convenience.c:78:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
suff *= 60;
~~~~~^~~~~
convenience.c:79:3: note: here
case 'm':
^~~~
convenience.c:81:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
suff *= 60;
~~~~~^~~~~
convenience.c:82:3: note: here
case 's':
^~~~
cc -c aisdecoder/aisdecoder.c -o aisdecoder/aisdecoder.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c aisdecoder/sounddecoder.c -o aisdecoder/sounddecoder.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c aisdecoder/lib/receiver.c -o aisdecoder/lib/receiver.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c aisdecoder/lib/protodec.c -o aisdecoder/lib/protodec.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c aisdecoder/lib/hmalloc.c -o aisdecoder/lib/hmalloc.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c aisdecoder/lib/filter.c -o aisdecoder/lib/filter.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc -c tcp_listener/tcp_listener.c -o tcp_listener/tcp_listener.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/
cc main.o rtl_ais.o convenience.o ./aisdecoder/aisdecoder.o ./aisdecoder/sounddecoder.o ./aisdecoder/lib/receiver.o ./aisdecoder/lib/protodec.o ./aisdecoder/lib/hmalloc.o ./aisdecoder/lib/filter.o ./tcp_listener/tcp_listener.o -o rtl_ais -lpthread -lm -lpthread -lm -lrtlsdr -L /usr/lib/arm-linux-gnueabihf/

Next, without using "sudo make install", I run the program: $ ./rtl_ais Result:

Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Log NMEA sentences to console OFF
AIS data will be sent to 127.0.0.1 port 10110
Tuner gain set to automatic.
Tuned to 162000000 Hz.
Sampling at 1600000 S/s.
Allocating 12 zero-copy buffers
^CSignal caught, exiting!

Did I do everything right? Thank you very much for your help!

dgiardini commented 4 years ago

Hi

Look at the readme file, at the "known issues" section. There is something inherent to rtl-sdr devices, called "ppm error". You must to find that number for your device and pass it as parameter to rtl_ais. There are some starting points in the readme file, or you can google something like "how to find ppm rtl-sdr"

Good luck !

On Tue, May 5, 2020 at 6:15 PM mol1990 notifications@github.com wrote:

Здравствуйте мои друзья! Спасибо за помощь! Программа запустилась, но я не уверен что она работает корректно в связи с тем, что нет возможности принять AIS сигнал в данный момент. Я следовал инструкциям "FredericGuilbault" в следующем порядке:

$ apt-get install -y -q git librtlsdr-dev pkg-config

$ git clone —depth 1 https://github.com/dgiardini/rtl-ais/

$ cd /rtl-ais

$ sudo make

It is strange that without "sudo" I did not miss it.

Result:

cc -c main.c -o main.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c rtl_ais.c -o rtl_ais.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c convenience.c -o convenience.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

convenience.c: In function ‘atofs’:

convenience.c:51:9: warning: this statement may fall through [-Wimplicit-fallthrough=]

suff *= 1e3;



convenience.c:52:3: note: here

case 'm':

^~~~

convenience.c:54:9: warning: this statement may fall through [-Wimplicit-fallthrough=]

suff *= 1e3;

~~~~~^~~~~~

convenience.c:55:3: note: here

case 'k':

^~~~

convenience.c: In function ‘atoft’:

convenience.c:78:9: warning: this statement may fall through [-Wimplicit-fallthrough=]

suff *= 60;

~~~~~^~~~~

convenience.c:79:3: note: here

case 'm':

^~~~

convenience.c:81:9: warning: this statement may fall through [-Wimplicit-fallthrough=]

suff *= 60;

~~~~~^~~~~

convenience.c:82:3: note: here

case 's':

^~~~

cc -c aisdecoder/aisdecoder.c -o aisdecoder/aisdecoder.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c aisdecoder/sounddecoder.c -o aisdecoder/sounddecoder.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c aisdecoder/lib/receiver.c -o aisdecoder/lib/receiver.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c aisdecoder/lib/protodec.c -o aisdecoder/lib/protodec.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c aisdecoder/lib/hmalloc.c -o aisdecoder/lib/hmalloc.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c aisdecoder/lib/filter.c -o aisdecoder/lib/filter.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc -c tcp_listener/tcp_listener.c -o tcp_listener/tcp_listener.o -O2 -g -Wall -W -I./aisdecoder -I ./aisdecoder/lib -I./tcp_listener -I/

cc main.o rtl_ais.o convenience.o ./aisdecoder/aisdecoder.o ./aisdecoder/sounddecoder.o ./aisdecoder/lib/receiver.o ./aisdecoder/lib/protodec.o ./aisdecoder/lib/hmalloc.o ./aisdecoder/lib/filter.o ./tcp_listener/tcp_listener.o -o rtl_ais -lpthread -lm -lpthread -lm -lrtlsdr -L /usr/lib/arm-linux-gnueabihf/

Next, without using "sudo make install", I run the program:
$ ./rtl_ais
Result:

Edge tuning disabled.

DC filter enabled.

RTL AGC disabled.

Internal AIS decoder enabled.

Buffer size: 163.84 mS

Downsample factor: 64

Low pass: 25000 Hz

Output: 48000 Hz

Found 1 device(s):

0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM

Found Rafael Micro R820T tuner

Log NMEA sentences to console OFF

AIS data will be sent to 127.0.0.1 port 10110

Tuner gain set to automatic.

Tuned to 162000000 Hz.

Sampling at 1600000 S/s.

Allocating 12 zero-copy buffers

^CSignal caught, exiting!

Did I do everything right?
Thank you very much for your help!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/dgiardini/rtl-ais/pull/19#issuecomment-624310078>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBJPT2QHWGQAAV7HH2YKBTRQB6VJANCNFSM4KX7SOOQ>
.

--

This message represents the official view of the voices in my head

mol1990 commented 4 years ago

Thank you mr friend. I use rtl-sdr.com v.3, ppm in the warmed state is 1. In practical use, I will definitely use this. Thank!