bistromath / gr-ais

Automatic Information System decoder for shipborne position reporting for the Gnuradio project
134 stars 47 forks source link

Doesn't work with Gnuradio 3.8 #21

Closed darkstar007 closed 3 years ago

darkstar007 commented 4 years ago

I tried to install with GR3.8 and it doesn't work. I see you mention this here - but as I see no changes in master or a suitably named branch, I assume this hasn't happened yet?

Thanks,

Matt

bistromath commented 4 years ago

Sorry, dropped off my radar. Let me do it this weekend, it's pretty quick to do.

On Sat, Jun 6, 2020 at 1:58 AM darkstar007 notifications@github.com wrote:

I tried to install with GR3.8 and it doesn't work. I see you mention this here https://www.mail-archive.com/discuss-gnuradio@gnu.org/msg70113.html

  • but as I see no changes in master or a suitably named branch, I assume this hasn't happened yet?

Thanks,

Matt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bistromath/gr-ais/issues/21, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADBTK4IRJQQ2CSPR75IRRLRVIAJZANCNFSM4NVYV5LQ .

darkstar007 commented 4 years ago

Thanks - I started it but are having dependency issues (libboost 1.67 vs 1.71) in debian unstable.

mpaxson commented 4 years ago

+1, any progress on this?

darkstar007 commented 4 years ago

I think my fork may now work.

https://github.com/darkstar007/gr-ais

(a.k.a. it works for me on debian testing with my rtl-sdr dongle)

bistromath commented 4 years ago

Sorry, it needed a lot more work than I thought it would. It's updated and working on GR3.8 now, although it still has a lot of cruft -- 3.8 upstreamed a much nicer version of the MSK synchronizer I wrote for gr-ais, as well as the correlation estimator I pulled out of master years ago.

It should be good to go (master branch), but I'll be periodically fixing it up to use more mainline GR blocks (and probably move to SoapySDR as a radio backend). Really the whole thing should be a GRC flowgraph anyway.

Please test -- I've only tested it briefly with GR 3.8.1, UHD 3.15, and a B200-mini.

mpaxson commented 4 years ago

I have tested it with a b200mini and I have not been able to get it to work. UHD version 3.15.0.0-44-g5a9f9ed9 GNUradio companion 3.8.1.0 (Python 3.6.9) I also don't see the modules in gnuradio_companion, probably since they changed the modules to yml format.

python3 ais_rx.exe -s uhd -g 50 -r 256000 -S -A RX2
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-44-g5a9f9ed9
[INFO] [B200] Detected Device: B200mini
[INFO] [B200] Operating over USB 3.
[INFO] [B200] Initialize CODEC control...
[INFO] [B200] Initialize Radio control...
[INFO] [B200] Performing register loopback test... 
[INFO] [B200] Register loopback test passed
[INFO] [B200] Setting master clock rate selection to 'automatic'.
[INFO] [B200] Asking for clock rate 16.000000 MHz... 
[INFO] [B200] Actually got clock rate 16.000000 MHz.
Tuned to 162.000MHz
[INFO] [B200] Asking for clock rate 32.768000 MHz... 
[INFO] [B200] Actually got clock rate 32.768000 MHz.
Setting gain to 50
Gain is 50
Rate is 255999
.....

and nothing comes up. I've tested with sdr sharp with an airspy, but couldn't get either to work with this.

bistromath commented 4 years ago

The blocks have not been GRC'ed yet. I'm rewriting the core demodulator to use more standard blocks, and adding GRC blocks to for the custom blocks will be part of that.

Try omitting the single-channel option. Does that change anything?

bmagistro commented 3 years ago

Is there an active branch for this or are folks working with the current code in "master"? I will need the blocks but recently did some work to update gr-aistx so willing to help make some updates if I know where to start from.

bistromath commented 3 years ago

Master branch works with GR 3.8. I'm working on reworking things so that it uses more native GR blocks, and adding a GRC flowgraph in addition to ais_rx. This work is hung up while I fix the MSK synchronizer in GR 3.8.

On Tue, Oct 13, 2020 at 9:32 AM bmagistro notifications@github.com wrote:

Is there an active branch for this or are folks working with the current code in "master"? I will need the blocks but recently did some work to update gr-aistx so willing to help make some updates if I know where to start from.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bistromath/gr-ais/issues/21#issuecomment-707862737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADBTKZLQFJOGFN6R56HUGDSKR6JJANCNFSM4NVYV5LQ .

af4ex commented 3 years ago

I have a question about the GR3.8 fix. Will gr-ais still work with GR3.7?

I am trying to build gr-ais on a old RPi2-B+ under Raspian/stretch. Apt-get installs only GR3.7. So I was getting an error which said GR3.8 was required. Is that now the minimum requirement? Why isn't it possible to run also under 3.7, like it used to?

As a workaround, I tried changing the required find_package version to 3.7. The cmake build seemed to run much longer, but with this final message

CMake Error at /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrMiscUtils.cmake:146 (install):
  install TARGETS given no LIBRARY DESTINATION for shared library target
  "gnuradio-ais".
Call Stack (most recent call first):
  lib/CMakeLists.txt:54 (GR_LIBRARY_FOO)

-- Using install prefix: /usr/local
-- Building for version: .. / ..
-- 
-- Checking for module SWIG
-- Found SWIG version 3.0.10.
-- Found SWIG: /usr/bin/swig3.0  
-- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found version "2.7.13") 
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.13", minimum required is "2") 
-- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found suitable version "2.7.13", minimum required is "2") 
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Configuring incomplete, errors occurred!
See also "/home/pi/gr-ais/build/CMakeFiles/CMakeOutput.log"

Apparently I did not specify a target destination. Can this be fixed? Thanks.

bistromath commented 3 years ago

For the time being, check out 1863d1:

$ git checkout 1863d1

...and then build it.

On Sat, Dec 19, 2020 at 12:05 PM af4ex notifications@github.com wrote:

I have a question about the GR3.8 fix. Will gr-ais still work with GR3.7?

I am trying to build gr-ais on a old RPi2-B+ under Raspian/stretch. Apt-get installs only GR3.7. So I was getting an error which said GR3.8 was required. Is that now the minimum requirement? Why isn't it possible to run also under 3.7, like it used to?

As a workaround, I tried changing the required find_package version to 3.7. The cmake build seemed to run much longer, but with this final message

CMake Error at /usr/lib/arm-linux-gnueabihf/cmake/gnuradio/GrMiscUtils.cmake:146 (install): install TARGETS given no LIBRARY DESTINATION for shared library target "gnuradio-ais". Call Stack (most recent call first): lib/CMakeLists.txt:54 (GR_LIBRARY_FOO)

-- Using install prefix: /usr/local -- Building for version: .. / ..

-- Checking for module SWIG -- Found SWIG version 3.0.10. -- Found SWIG: /usr/bin/swig3.0 -- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found version "2.7.13") -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.13", minimum required is "2") -- Found PythonLibs: /usr/lib/arm-linux-gnueabihf/libpython2.7.so (found suitable version "2.7.13", minimum required is "2") -- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE -- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success -- Configuring incomplete, errors occurred! See also "/home/pi/gr-ais/build/CMakeFiles/CMakeOutput.log"

Apparently I did not specify a target destination. Can this be fixed? Thanks.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bistromath/gr-ais/issues/21#issuecomment-748518827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADBTKZSFYX7RJ7KTMV4GPTSVUBPVANCNFSM4NVYV5LQ .

af4ex commented 3 years ago

I checked out and built 1863d1. The RPi-2 B+ locked up, didn't seem to have enough RAM, so retried with a RPi-3 B+. Then it compiled, linked and installed OK.

It ran first time with no apparent errors, but running again I got various runtime errors.

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya 
*** Error in `/usr/bin/python2': corrupted double-linked list: 0x00670c20 ***
Aborted
pi@pi3ais:~ $ ais_rx --gain 40 -s osmocom
linux; GNU C++ version 6.2.0 20161010; Boost_106100; UHD_003.009.005-0-unknown

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya 
*** Error in `/usr/bin/python2': malloc(): memory corruption: 0x76e717cb ***
Aborted
af4ex commented 3 years ago

I also tried installing and running gqrx. It ran, on the RPi 3B+, after some startup errors, but no GUI appeared.

sudo apt install gqrx-sdr
pi@pi3ais:~ $ gqrx
linux; GNU C++ version 6.2.0 20161010; Boost_106100; UHD_003.009.005-0-unknown

libEGL warning: DRI2: failed to authenticate
Controlport disabled
No user supplied config file. Using "default.conf"
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.10
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy soapy redpitaya 
FM demod gain: 1.52789
IQ DCR alpha: 1.04166e-05
gr::fft: can't import wisdom from /home/pi/.gr_fftw_wisdom
/build/gqrx-sdr-yvpXgs/gqrx-sdr-2.6/src/pulseaudio/pa_sink.cc: pa_simple_new() failed: Connection refused
Using audio backend: auto
BookmarksFile is /home/pi/.config/gqrx/bookmarks.csv
^C
bistromath commented 3 years ago

I've updated gr-ais (on the "grc" branch for now) to include GRC blocks and a GRC top-level application for GR3.8. Please note that it will only work with a version of Gnuradio which includes fixes to the MSK timing error detector -- see gnuradio/gnuradio#4335.

After a bit more work getting it working well on GR 3.8 with the GRC application, I will tag one more GR 3.8 release and then migrate the package to GR 3.9 moving forward.