jvde-github / AIS-catcher

AIS receiver for RTL SDR dongles, Airspy R2, Airspy Mini, Airspy HF+, HackRF, SDRplay and SoapySDR
https://aiscatcher.org
GNU General Public License v3.0
515 stars 78 forks source link

RTL-SDR device selected regardless of input parameters #47

Closed tjswe closed 1 year ago

tjswe commented 1 year ago

Hi!

First of all i have to say thank you for this awesome piece of software! I have been running AIS-receivers for 12 years and this summer i replaced both my hardware AIS receivers (True Heading AIS Carbon RX and a SR-161) at two locations with AIS-catcher after comparing them in parallell for a few weeks.

Having an issue with a Raspberry Pi 3B running one RTL-SDR device (for other stuff) and one Airspy HF+ for AIS.

I have had this running on another Raspberry with version 0.38 and 0.39 for five months straight, and for reasons i had to move the Airspy HF+ to this Raspberry Pi instead. Doing a git clone today, compiled it and got into trouble....

AIS-catcher seems to select the RTL-SDR dongle regardless of input parameters. As long as the RTL-SDR stick is connected it will be the device it starts with.

I have a systemd service file where all things are defined so nothing i know of changed.

I removed start-parameters one at the time but still, with only device type selection left, still goes for SDR-stick.

root@ais:~# /usr/local/bin/AIS-catcher -gh AIS-catcher (build Dec 28 2022) v0.42 (C) Copyright 2021-2022 jvde-github and other contributors This is free software; see the source for copying conditions.There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Found Rafael Micro R820T tuner [R82XX] PLL not locked! Allocating 15 zero-copy buffers

If i unplug the SDR-stick, then it goes for the Airspy

root@ais:~# /usr/local/bin/AIS-catcher -gh AIS-catcher (build Dec 28 2022) v0.42 (C) Copyright 2021-2022 jvde-github and other contributors This is free software; see the source for copying conditions.There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. !AIVDM,1,1,,B,D02D3VQHHNfq6DO6D0,427 ( MSG: 20, REPEAT: 0, MMSI: 1255130) !AIVDM,1,1,,A,138ONn0000Q7RuPP8nv21BK20<0I,02C ( MSG: 1, REPEAT: 0, MMSI: 260231000) !AIVDM,1,1,,B,15?dMJh0usQ9FGdOoLd9n7u00HD4,04E ( MSG: 1, REPEAT: 0, MMSI: 352003287) !AIVDM,1,1,,B,338ibr001a18nK8P3gLpNnm40000,061 ( MSG: 3, REPEAT: 0, MMSI: 210529000) !AIVDM,1,1,,B,33u?db0PAH2aaBBP7umqAWQ80000,031 ( MSG: 3, REPEAT: 0, MMSI: 115546920) !AIVDM,1,1,,B,13u?mVPP00122`nP8MHs4Owp2pDS,02C ( MSG: 1, REPEAT: 0, MMSI: 222554920)

Running Raspbian Debian 10 (via Dietpi).

Any idea if i am doing anything wrong or perhaps a bug somewhere?

jvde-github commented 1 year ago

Hi, thanks for using the software!

If you type the command AIS-catcher -l it will list the available devices. Then you can start AIS-catcher either as:

AIS-catcher -d:x (whereby the x is the number in front of the AirSpy HF+)

or

AIS-catcher -d xxxxxx (whereby xxxxx is the serial number of the AirSpy HF+).

The latter approach is the best as the RPi might change the ordering of the SDRs and then you end up starting the RTL-SDR. Using the serial number to identify and activate the device is robust.

The parameter -gh sets the hardware parameters of the AirSpy HF but does not instruct AIS-catcher to use this device. The only way to select a device is the d switch.

In fact -gh without any parameters to set is not doing anything. So to use the AirSpy HF+ you use a combination of -gh and -d where the first can be left out if you are happy with the default parameters (which for the AirSpy HF likely is the case).

Can you get the AirSpy HF+ to start using the d-switch? Otherwise we need to dive a bit deeper.

Thanks and kind regards, Jasper

tjswe commented 1 year ago

That did it. It was an error behind the keyboard :)

Thank you!