LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2016, 11:07 AM   #1
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Rep: Reputation: Disabled
How to run this python app, gr_ais


I built gnuradio and gr-ais, all ok.

However trying the command, it can not be found.

scott@scott-P5QC:~$ ais_rx -sosmocom -g35 -r250e3 > ais_pipe
ais_rx: command not found

scott@scott-P5QC:~$ ais_rx.py -h
ais_rx.py: command not found

File exists, so why is it being stupid?
scott@scott-P5QC:~/gnuradio/gr-ais/apps$ python ais_rx.py
python: can't open file 'ais_rx.py': [Errno 2] No such file or directory
scott@scott-P5QC:~/gnuradio/gr-ais/apps$ ls
ais_rx CMakeLists.txt
scott@scott-P5QC:~/gnuradio/gr-ais/apps$


from instructions here for gr-ais

https://www.reddit.com/r/RTLSDR/comm...s_and_opencpn/

I built gnuradio and now have 3.7.9
using the script here
https://gnuradio.org/redmine/project...ngGRFromSource

here was messages after the builds
after building gr-ais, I get this

Warning: Tag `SYMBOL_CACHE_SIZE' at line 278 of file /home/scott/gnuradio/gr-ais/build/docs/doxygen/Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `SHOW_DIRECTORIES' at line 462 of file /home/scott/gnuradio/gr-ais/build/docs/doxygen/Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `HTML_ALIGN_MEMBERS' at line 814 of file /home/scott/gnuradio/gr-ais/build/docs/doxygen/Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.
[100] Built target doxygen_target
scott@scott-P5QC:~/gnuradio/gr-ais/build$

After building gnu radio, get this

Done function rtl_build at: Tue Feb 2 11:27:16 EST 2016
Starting function mod_groups at: Tue Feb 2 11:27:16 EST 2016
Group 'usrp' already in /etc/group
********************************************************************************
This script has just modified /etc/group to place your userid '('$USER')' into group 'usrp'
In order for this change to take effect, you will need to log-out and log back
in again. You will not be able to access your USRP1 device until you do this.

If you wish to allow others on your system to use the USRP1 device, you will need to use:

sudo usermod -a -G usrp userid

For each userid you wish to allow access to the usrp

********************************************************************************

Further
Done function mod_groups at: Tue Feb 2 11:27:16 EST 2016
Starting function mod_udev at: Tue Feb 2 11:27:16 EST 2016
udevd: no process found
Done function mod_udev at: Tue Feb 2 11:27:16 EST 2016
Starting function mod_sysctl at: Tue Feb 2 11:27:16 EST 2016
Applying updates to /etc/sysctl.conf
Group 'usrp' now has real-time scheduling privileges
You will need to log-out and back in again for this to
take effect
Done function mod_sysctl at: Tue Feb 2 11:27:17 EST 2016
Starting function pythonpath at: Tue Feb 2 11:27:17 EST 2016


************************************************************
You should probably set your PYTHONPATH to:

/usr/local/lib/python2.7/dist-packages

Using:

export PYTHONPATH=/usr/local/lib/python2.7/dist-packages

in your .bashrc or equivalent file prior to attempting to run
any Gnu Radio applications or Gnu Radio Companion.
*************************************************************
Done function pythonpath at: Tue Feb 2 11:27:17 EST 2016
Starting function extras at: Tue Feb 2 11:27:17 EST 2016
Done function extras at: Tue Feb 2 11:27:17 EST 2016
Done all functions at: Tue Feb 2 11:27:17 EST 2016
All Done

=======================================================================
If you have found this script useful and time-saving, consider a
donation to help me keep build-gnuradio, simple_ra, SIDsuite,
meteor_detector, simple_fm_rcv, and multimode maintained and up to date.
A simple paypal transfer to mleech@ripnet.com is all you need to do.
======================================================================
Send success/fail info to sbrac.org?success

As a python test, the os runs this clock python http://code.activestate.com/recipes/...ock-in-python/

Last edited by sdowney717; 02-02-2016 at 11:59 AM.
 
Old 02-02-2016, 12:35 PM   #2
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
I reboot and get this different error

"ImportError: No module named ais"

I was wondering if maybe the usb device needs to be plugged in first?

scott@scott-P5QC:~$ cd /home/scott/gnuradio/gr-ais/apps
scott@scott-P5QC:~/gnuradio/gr-ais/apps$ ls
ais_rx CMakeLists.txt
scott@scott-P5QC:~/gnuradio/gr-ais/apps$ python ais_rx
Traceback (most recent call last):
File "ais_rx", line 6, in <module>
import ais
ImportError: No module named ais
scott@scott-P5QC:~/gnuradio/gr-ais/apps$ python ais_rx
Traceback (most recent call last):
File "ais_rx", line 6, in <module>
import ais
ImportError: No module named ais
scott@scott-P5QC:~/gnuradio/gr-ais/apps$

the contents of file ais_rx is here
#!/usr/bin/env python
#ais decoder, main app

from gnuradio.eng_option import eng_option
from optparse import OptionParser
import ais

import time
import sys
import socket

def main():
# Create Options Parser
parser = OptionParser (option_class=eng_option, conflict_handler="resolve")
ais.radio.ais_radio.add_radio_options(parser)
(options, args) = parser.parse_args ()

tb = ais.radio.ais_radio(options)
tb.run()
tb.close()

if __name__ == '__main__':
main()
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python app to run on KDE startup mpmackenna Linux - Desktop 13 04-08-2019 04:11 PM
Have newer python, but an app requires older python postcd Linux - General 2 05-05-2014 12:35 AM
python sms based app Money Mike Programming 1 11-13-2012 05:00 PM
How do I make python programs run without entering the command python? trist007 Programming 5 03-22-2009 08:21 PM
python threading - IM app vargadanis Programming 9 03-02-2007 09:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration