Giter Club home page Giter Club logo

Comments (11)

dadopap avatar dadopap commented on July 21, 2024

Hi, I have updated the package and compiled it with gnuradio 3.7, I will issue a pull request

from ais.

dadopap avatar dadopap commented on July 21, 2024

Hi I have created a pull request with trendmicro

In the meanwhile you can find the code at https://github.com/dadopap/ais

Please note that the make install installs the new block into /usr/local/share/gnuradio/blocks
I had to manually copy the blocks into /usr/share/gnuradio/blocks to have GRC see them.

from ais.

CyberLab85 avatar CyberLab85 commented on July 21, 2024

Hi, I have some trouble with "unpacker.c".

When I try to get AIS frame with ./AIVDM_Encoder.py --type=1 --vsize=30x10 | xargs -IA ./unpacker.c A 1 A, I have this:

"./unpacker.c: Syntax error: "(" unexpected" refer to line "unsigned long unpack(char *buffer, int start, int length)"

how can I fix it?

thanks

from ais.

mikeream avatar mikeream commented on July 21, 2024

To get the unpacker working you need to compile it.
type "g++ unpacker.c -o unpacker"

After compiling it then you can use it as:
"./AIVDM_Encoder.py --type=1 --vsize=30x10 | xargs -IA ./unpacker A 1 A"

from ais.

saltperfect avatar saltperfect commented on July 21, 2024

I was not able to compile the blocks using python2 or 3. Can someone help. It was searching this whole day, tried all the forks but all in vain. The last error I could come up was this and I simply don't know how to pass through it. I have tried the mod_tools hint but later found the forks but nothing worked out.
`(pytenv2) rupank@vanepill:~/ais/gr-aistx/build$ cmake ../
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- filesystem
-- system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'gnuradio-runtime'
-- Found gnuradio-runtime, version 3.7.9
-- Found GNURADIO_RUNTIME: /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so
-- Checking for module 'cppunit'
-- Found cppunit, version 1.13.2
-- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl
-- Found SWIG: /usr/bin/swig2.0 (found version "2.0.12")
-- Found PythonLibs: /usr/local/lib/libpython3.5m.a (found version "3.5.0")
CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/local/bin/python3.5 (found version "3.5")
File "", line 3
print sysconfig.get_python_lib(plat_specific=True, prefix='')
^
SyntaxError: invalid syntax
CMake Error at cmake/Modules/GrPython.cmake:103 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
exactly three arguments.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
swig/CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
swig/CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
swig/CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:182 (include)
swig/CMakeLists.txt:47 (GR_SWIG_INSTALL)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:182 (include)
swig/CMakeLists.txt:47 (GR_SWIG_INSTALL)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:182 (include)
swig/CMakeLists.txt:47 (GR_SWIG_INSTALL)
This warning is for project developers. Use -Wno-dev to suppress it.

Traceback (most recent call last):
File "", line 2, in
TypeError: Unicode-objects must be encoded before hashing
CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

File "", line 3
print sysconfig.get_python_lib(plat_specific=True, prefix='')
^
SyntaxError: invalid syntax
CMake Error at cmake/Modules/GrPython.cmake:103 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
exactly three arguments.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)

Traceback (most recent call last):
File "", line 2, in
TypeError: Unicode-objects must be encoded before hashing
CMake Error at cmake/Modules/GrPython.cmake:115 (add_custom_target):
add_custom_target cannot create target "ALL" because another target with
the same name already exists. The existing target is a custom target
created in source directory "/home/rupank/ais/gr-aistx/swig". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/Modules/GrPython.cmake:214 (GR_UNIQUE_TARGET)
python/CMakeLists.txt:31 (GR_PYTHON_INSTALL)

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

File "", line 3
print sysconfig.get_python_lib(plat_specific=True, prefix='')
^
SyntaxError: invalid syntax
CMake Error at cmake/Modules/GrPython.cmake:103 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
exactly three arguments.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)

Traceback (most recent call last):
File "", line 2, in
TypeError: Unicode-objects must be encoded before hashing
CMake Error at cmake/Modules/GrPython.cmake:115 (add_custom_target):
add_custom_target cannot create target "ALL" because another target with
the same name already exists. The existing target is a custom target
created in source directory "/home/rupank/ais/gr-aistx/swig". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/Modules/GrPython.cmake:214 (GR_UNIQUE_TARGET)
apps/CMakeLists.txt:22 (GR_PYTHON_INSTALL)

-- Configuring incomplete, errors occurred!
`
If some could help please. A total noob of git and python here just want the ais signal from gnu radio. End up at this git and don't know what to do next.

from ais.

 avatar commented on July 21, 2024

@saltperfect you mention you have tried all the branches but which one are you using when you get this error? Also next time go ahead and run with -Wno-dev to suppress all the syntax warnings.

from ais.

saltperfect avatar saltperfect commented on July 21, 2024

@zhudsonSM i have used https://github.com/dadopap/ais and yours also. I always get the same error with the swig error in the end.

from ais.

 avatar commented on July 21, 2024

Perhaps this isn't an ideal solution for you but I just created a Pybombs recipe to install gr-aistx here: https://github.com/zhudsonSM/gr-etcetera try installing with that and see if it works.

from ais.

lYlantis avatar lYlantis commented on July 21, 2024

@zhudsonSM I have tried your fork, your pybomb and the fork from @dadopap , but none have worked for me. I built everything, but when I try to run the python script or the graph from gnuradio-companion, I get the following error:

Traceback (most recent call last):
  File "/home/aces/Desktop/ais/top_block.py", line 31, in <module>
    import AISTX
  File "/usr/local/lib/python2.7/dist-packages/AISTX/__init__.py", line 45, in <module>
    from AISTX_swig import *
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 17, in <module>
    _AISTX_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_AISTX_swig')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: dynamic module does not define init function (init_AISTX_swig)

Any idea for what the issue might be?

from ais.

 avatar commented on July 21, 2024

Do you get the same error when using pybombs?

Am I correct in assuming that the build and install process completed successfully?

from ais.

embyte0 avatar embyte0 commented on July 21, 2024

Code merged. This should be fixed now. Let us know, thanks!

from ais.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.