Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnuradio error #480

Open
nocomp opened this issue Sep 17, 2019 · 64 comments
Open

gnuradio error #480

nocomp opened this issue Sep 17, 2019 · 64 comments

Comments

@nocomp
Copy link

nocomp commented Sep 17, 2019

hi folks,
first of all thxx for this great tool i used to have working, but no idea what i ve did, almost spend a day to get it back on rails with no luck.
you are my last chance
here is the situation:
i ve installed on last kali version (used to work) using apt-get and now when i launch it i get:

nocomp@8uR34ud3sL1c0rn35:~/tools/sdr/gr-gsm$ grgsm_scanner
Traceback (most recent call last):
File "/usr/bin/grgsm_scanner", line 24, in
from gnuradio import blocks
ImportError: No module named gnuradio

so i ve pulled the git and when i try to build it i get for cmake ..

CMake Warning at CMakeLists.txt:135 (find_package):
Found package configuration file:

/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake

but it set Gnuradio_FOUND to FALSE so package "Gnuradio" is considered to
be NOT FOUND. Reason given by package:

Gnuradio could not be found because dependency Volk could not be found.

CMake Error at CMakeLists.txt:150 (message):
GnuRadio Runtime required to compile gr-gsm

i ve uninstall and reinstall gnuradio gr-gsm many times still same error :'(

grc is in /usr/lib/python3/dist-packages/gnuradio/grc

and here are my paths:

sh -c 'set | grep -i path'
DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/1000/bus'
PATH='/home/nocomp/.local/bin:/home/nocomp/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin'
WINDOWPATH='2'

all kind of helps are welcome, receiving my limesdr in 2 days and my whole world is broken... #HELPPPPPPPPPPPPPPPPPP

thxx for your time

@velichkov
Copy link
Contributor

Hi @nocomp,

first of all thxx for this great tool i used to have working, but no idea what i ve did, almost spend a day to get it back on rails with no luck.
you are my last chance
here is the situation:
i ve installed on last kali version (used to work) using apt-get and now when i launch it i get:

It's quite typical for Kali (and other rolling distributions) something that have worked yesterday to no longer works today.

nocomp@8uR34ud3sL1c0rn35:~/tools/sdr/gr-gsm$ grgsm_scanner
Traceback (most recent call last):
File "/usr/bin/grgsm_scanner", line 24, in
from gnuradio import blocks
ImportError: No module named gnuradio

In Debian Testing and Kali they have updated gnuradio to 3.8 but still have not updated all dependent packages.

so i ve pulled the git and when i try to build it i get for cmake ..

CMake Warning at CMakeLists.txt:135 (find_package):
Found package configuration file:

/usr/lib/x86_64-linux-gnu/cmake/gnuradio/GnuradioConfig.cmake

but it set Gnuradio_FOUND to FALSE so package "Gnuradio" is considered to
be NOT FOUND. Reason given by package:

Gnuradio could not be found because dependency Volk could not be found.

CMake Error at CMakeLists.txt:150 (message):
GnuRadio Runtime required to compile gr-gsm

We are working on adding support for gnuradio 3.8 in #475. Try building from maint-3.8 branch from my fork and have a look at Kali.docker that is used in our travis builds

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

hi
thx a lot for your reponse
i check that in a hour
thxx again for your time

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

-- Found libosmogsm: /usr/local/lib/libosmogsm.so
CMake Error at CMakeLists.txt:150 (message):
GnuRadio Runtime required to compile gr-gsm

-- Configuring incomplete, errors occurred!
See also "/home/nocomp/tools/sdr/gr-gsm/build/CMakeFiles/CMakeOutput.log".
See also "/home/nocomp/tools/sdr/gr-gsm/build/CMakeFiles/CMakeError.log".
nocomp@8uR34ud3sL1c0rn35:~/tools/sdr/gr-gsm/build$

so i guess there is nothing i can do ?

@velichkov
Copy link
Contributor

CMake Error at CMakeLists.txt:150 (message):
GnuRadio Runtime required to compile gr-gsm

so i guess there is nothing i can do ?

As I said in my previous message you need to checkout and build maint-3.8 branch from my fork.

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

oh i thought i just had to git clone your repo and then go to the install process like the on in installation page.
do you have a tutorial i can follow?
thxx for your time

@velichkov
Copy link
Contributor

velichkov commented Sep 17, 2019

rm -rf gr-gsm
git clone -b maint-3.8 https://github.com/velichkov/gr-gsm.git
cd gr-gsm
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

damm , no luck :/
62%] Building CXX object lib/CMakeFiles/grgsm.dir/trx/trx_burst_if_impl.cc.o
make[2]: *** Aucune règle pour fabriquer la cible « /usr/lib/x86_64-linux-gnu/liborc-0.4.so », nécessaire pour « lib/libgrgsm.so.v0.41.1-342-g70cf13d6 ». Arrêt.
make[1]: *** [CMakeFiles/Makefile2:353: lib/CMakeFiles/grgsm.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

i ve installed liborcus-dev no luck same error

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

tried after installing sudo apt-get install liborc-0.4-0 no luck, same error

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

well got docker error too :/

Removing intermediate container f7f273aac7ed
---> d8f696f11bbf
Step 7/7 : RUN PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH cmake .. && mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/ && make -j $(nproc) && make install && ldconfig && make CTEST_OUTPUT_ON_FAILURE=1 test
---> Running in 377a86ee05f4
CMake Error: The source directory "/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
The command '/bin/sh -c PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH cmake .. && mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/ && make -j $(nproc) && make install && ldconfig && make CTEST_OUTPUT_ON_FAILURE=1 test' returned a non-zero code: 1
nocomp@8uR34ud3sL1c0rn35:~/tools/sdr/docker-grgsm$

@velichkov
Copy link
Contributor

i ve installed liborcus-dev no luck same error
tried after installing sudo apt-get install liborc-0.4-0 no luck, same error

You need to install liborc-dev and not liborcus-dev nor liborc-0.4-0. You could find the full list of packages in the docker file.

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    cmake \
    autoconf \
    libtool \
    pkg-config \
    build-essential \
    libcppunit-dev \
    swig \
    doxygen \
    liblog4cpp5-dev \
    python3-docutils \
    python3-scipy \
    gnuradio-dev gnuradio libgmp-dev libboost-regex-dev liborc-dev \
    libosmocore-dev \
    gr-osmosdr

well got docker error too :/

CMake Error: The source directory "/src" does not appear to contain CMakeLists.txt.

From the top gr-gsm directory you need to execute

docker build -f tests/dockerfiles/Kali.docker .

Note that there is a dot (.) at the end of the command, you need it.

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

i ve installed liborcus-dev no luck same error
tried after installing sudo apt-get install liborc-0.4-0 no luck, same error

You need to install liborc-dev and not liborcus-dev nor liborc-0.4-0. You could find the full list of packages in the docker file.

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    cmake \
    autoconf \
    libtool \
    pkg-config \
    build-essential \
    libcppunit-dev \
    swig \
    doxygen \
    liblog4cpp5-dev \
    python3-docutils \
    python3-scipy \
    gnuradio-dev gnuradio libgmp-dev libboost-regex-dev liborc-dev \
    libosmocore-dev \
    gr-osmosdr

well got docker error too :/
CMake Error: The source directory "/src" does not appear to contain CMakeLists.txt.

From the top gr-gsm directory you need to execute

docker build -f tests/dockerfiles/Kali.docker .

Note that there is a dot (.) at the end of the command, you need it.

hi
thxx a lot for your reply
i ve been able to compile following your advice, but when i run it, i get this module error:

nocomp@8uR34ud3sL1c0rn35:~/tools/sdr/gr-gsm/build$ grgsm_scanner
Traceback (most recent call last):
File "/usr/local/bin/grgsm_scanner", line 33, in
import grgsm
ModuleNotFoundError: No module named 'grgsm'

;
what did i do wrong?

compilation worked like a charm with your fork, well done!
thxx for your time
cant find using pip or apt any module named like this

@velichkov
Copy link
Contributor

nocomp@8uR34ud3sL1c0rn35:~/tools/sdr/gr-gsm/build$ grgsm_scanner
Traceback (most recent call last):
File "/usr/local/bin/grgsm_scanner", line 33, in
import grgsm
ModuleNotFoundError: No module named 'grgsm'

You need to add /usr/local/lib/python3/dist-packages/ to PYTHONPATH, in your shell execute

export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH

or to make it permanent add this to your shell profile (~/.bashrc or ~/.bash_profile)

That's needed because of this debian's patch

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

yeaaaaaaaaaaaaaaaaaaaaaaaaaa works like a charm,
thank you so much:!!!!
the docker installed work, but wont use it, need to fgure out how clean that in order to get some hd space.
thx again for your time, truelly appreciate.
next challenge: decode sms :))

@velichkov
Copy link
Contributor

but wont use it, need to fgure out how clean that in order to get some hd space.

Run docker ps -a and then for every CONTAINER ID or NAMES run docker rm 895e7a7b445d gnuradio-ubuntu-16.04 ....

Then run docker images and for every IMAGE ID run `docker rmi c3e52da505c6 ...

next challenge: decode sms :))

See our Decoding-How-To. Please close this issue and post your questions to our mailing list.

@nocomp
Copy link
Author

nocomp commented Sep 17, 2019

thx for your help!

@nocomp nocomp closed this as completed Sep 17, 2019
@nocomp
Copy link
Author

nocomp commented Sep 18, 2019

hi,
just find out that grgsm_scanner is not working
no error message, just nothing showin up one you press enter (no hardware detection either as you can have with livemmon)

@nocomp nocomp reopened this Sep 18, 2019
@nocomp
Copy link
Author

nocomp commented Sep 18, 2019

if i sudo i get
nocomp@8uR34ud3sL1c0rn35:/tools/sdr/phone-hack$ sudo grgsm_scanner
[sudo] Mot de passe de nocomp : 
Traceback (most recent call last):
File "/usr/local/bin/grgsm_scanner", line 33, in
import grgsm
ModuleNotFoundError: No module named 'grgsm'
nocomp@8uR34ud3sL1c0rn35:
/tools/sdr/phone-hack$

here is my bashrc
export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH

@nocomp
Copy link
Author

nocomp commented Sep 18, 2019

just tried using docker version:

build went fine:
Total Test time (real) = 4.71 sec
Removing intermediate container 5e20fdd9d7d4
---> 5047a68a9fcd
Successfully built 5047a68a9fcd

but it doesn t run
nocomp@8uR34ud3sL1c0rn35:/tools/sdr/gr-gsm$ docker run 5047a68a9fcd
nocomp@8uR34ud3sL1c0rn35:
/tools/sdr/gr-gsm$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c6b767394bd4 5047a68a9fcd "bash" 3 seconds ago Exited (0)

not much logs either
nocomp@8uR34ud3sL1c0rn35:/Documents$ docker logs fac618223384
nocomp@8uR34ud3sL1c0rn35:
/Documents$

hope this help
thxx for your time

@nocomp
Copy link
Author

nocomp commented Sep 20, 2019

just reinstalled and now it works, just takes a bit of time
thxx @velichkov for your priceless time

@nocomp nocomp closed this as completed Sep 20, 2019
@nocomp
Copy link
Author

nocomp commented Sep 20, 2019

in fact there is an issue (sorry again)
when i grgsm_scanner with your fork version i get only one result
if i grgsm_scanner on another computer that has it preinstalled i get 14 results

any idea why?

thxx for your help

@nocomp nocomp reopened this Sep 20, 2019
@velichkov
Copy link
Contributor

velichkov commented Sep 23, 2019

when i grgsm_scanner with your fork version i get only one result
if i grgsm_scanner on another computer that has it preinstalled i get 14 results

any idea why?

Do you use the same SDR device with the same antenna on both computers?
What are the hardware specs of the two computers - CPU, RAM, USB port types, etc...?

@nocomp
Copy link
Author

nocomp commented Sep 23, 2019

hi,
yes same sdr device and same antenna and same computer lenovo x280 in multiboot
your fork on kali boot, and the normal version on HamOS
8gb ram USB 3 ssd hd i3 8th gen

@velichkov
Copy link
Contributor

and the normal version on HamOS

What is the exact version?
What SDR device do you use and how is connected to the host - USB 2/3 or ethernet?

@nocomp
Copy link
Author

nocomp commented Sep 23, 2019

hamos runs 0.42.2-1+b2
i ve used a standard nooelec blue rtlsdr to usb3

@kiransgk1si18lvs04
Copy link

Hi @anandpandey786
Use this command grgsm_livemon_headless --args=rtl -f 952.4M
you have missed headless in command.

@anandpandey786
Copy link

Thanks for reply
I deliberated omitted headless .... wanted to see the pixmap/monitor
Every thing is running in my build but despite that gsm data is not visible on monitor tried several frequencies...

@velichkov
Copy link
Contributor

Hi @anandpandey786,

avahi bad state error was also seen which was eradicated by args argument

What args did you used to solve the avahi errors?

but invalid source error...what is the reason for that...

I don't know.

livemon monitor is running but no gsm data being captured so far
Every thing is running in my build but despite that gsm data is not visible on monitor tried several frequencies...

First try finding a frequency of a nearby C0 BCCH channel using grgsm_scanner and then specify that frequency when running grgsm_livemon. Also make sure there are GSM networks where you live in the bands supported by your RTL device.

@anandpandey786
Copy link

Hi @anandpandey786,

avahi bad state error was also seen which was eradicated by args argument

What args did you used to solve the avahi errors?

but invalid source error...what is the reason for that...

I don't know.

livemon monitor is running but no gsm data being captured so far
Every thing is running in my build but despite that gsm data is not visible on monitor tried several frequencies...

First try finding a frequency of a nearby C0 BCCH channel using grgsm_scanner and then specify that frequency when running grgsm_livemon. Also make sure there are GSM networks where you live in the bands supported by your RTL device.

Hi velichkov
Thanks for your reply .... issue was resolved there was some glitch in my antenna i am using your 3.8maint .
regards

@twigs538
Copy link

Hi,

I'm using a RTL2838 SDR with Ubuntu 16. I followed your installation instructions from the osmo website hyperlink from ptrksky grmgsm github repository to the letter.

Everything works except when I run grgsm_livemon I keep getting 0's displayed.

grgsm_scanner returns no results when scanning all available bands.
Kalibrate-rtl RETURNS GSM stations and no other bands.
Kalibrate has given me my ppm.

Rtl_test returns no errors in my signals. I have changed sample rates, used VM and a desktop with Ubuntu 16 returning the same results.

What else can I do?

@velichkov
Copy link
Contributor

Hi @twigs538,

Please avoid posting in an existing issues not directly related to your issue. Please post such questions to our mailing list and do not send me emails directly.

I'm using a RTL2838 SDR with Ubuntu 16. I followed your installation instructions from the osmo website hyperlink from ptrksky grmgsm github repository to the letter.

Everything works except when I run grgsm_livemon I keep getting 0's displayed.

grgsm_scanner returns no results when scanning all available bands.
Kalibrate-rtl RETURNS GSM stations and no other bands.

Kalibrate-rtl is known to return false positive results.

Kalibrate has given me my ppm.

Rtl_test returns no errors in my signals. I have changed sample rates, used VM and a desktop with Ubuntu 16 returning the same results.

What else can I do?

Do you have a suitable antenna attached to your RTL dongle? Are you sure that there are GSM networks in the area where you are and in the band you are searching in? In case you are inside in a big building try moving near a window or outside.

In case you live in USA note that AT&T stopped their 2G network in the GSM850 band back in 2017 and for T-Mobile network in the GSM1900 band you need a dongle with Elonics E4000 tuner or another SDR device that supports that band.

@kiransgk1si18lvs04
Copy link

Hi @velichkov
I am successful in installing grgsm from your maint branch and I am get all BCCH data like MCC,MNC,LAC and some other things, but there is problem when designing simple gui application using tkinter. I am attaching code below

import tkinter as tk
import subprocess
import shlex

def BCCH():
cmd=["grgsm_scanner","--args=rtl","-b","GSM900"]
output= subprocess.check_output(cmd)
result=print('>', output)
# put result in label
result['text'] = output.decode('utf-8')

my_gui = tk.Tk()
my_gui.geometry('600x600')
my_gui.title("Get output inside GUI")

tk.Button(my_gui,text="GET BCCH", command=BCCH).pack()

label for BCCH result

result = tk.Label(my_gui,font=50)
result.pack()

my_gui.mainloop()

I am getting excemptions thinking that some files are missing.
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.7/tkinter/init.py", line 1705, in call
return self.func(*args)
File "/home/kali/test.py", line 7, in BCCH
output= subprocess.check_output(cmd)
File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['grgsm_scanner', '--args=rtl', '-b', 'GSM900']' returned non-zero exit status 1.

when I type in command line interface as kal -s GSM900 the output is coming. I think I will get solution.
Thanks

@kiransgk1si18lvs04
Copy link

When I try adding exclusions.

import tkinter as tk
import subprocess
import shlex
def BCCH():
while True:
try:
cmd=["grgsm_scanner","--args=rtl","-b","GSM900"]
output= subprocess.getoutput(cmd)
result=print('>', output)
# put result in label
if not output is None:
result['text'] = output.decode('utf-8')
except subprocess.CalledProcessError as exc:
print(exc.returncode)

my_gui = tk.Tk()

my_gui.geometry('600x600')
my_gui.title("Get output inside GUI")
tk.Button(my_gui,text="GET BCCH", command=BCCH).pack()

label for BCCH result

result = tk.Label(my_gui,font=50)
result.pack()

my_gui.mainloop()

The errors are like this
Traceback (most recent call last):
File "/usr/local/bin/grgsm_scanner", line 33, in
import grgsm
ModuleNotFoundError: No module named 'grgsm'

@velichkov
Copy link
Contributor

Hi @kiransgk1si18lvs04,

ModuleNotFoundError: No module named 'grgsm'

Make sure you are running your application with the same python version that gr-gsm and gnuradio was compiled with (most probably python3), add the following as the first line in your scripts.

#!/usr/bin/python3

If it still does not work you may need to add the path where the gr-gsm's python module was installed to the PYTHONPATH environment variable, see #480 (comment)

P.S.
Please next time try using markdown to format your messages as right now they are hardly readable and avoid hijacking unrelated github issues.

@kiransgk1si18lvs04
Copy link

kiransgk1si18lvs04 commented Apr 10, 2020

Hi@velichkov
I have added python path permanently by using your instruction.

  • export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH

I am running the scripts on python 3.7.6

still doesn't work.

@kiransgk1si18lvs04
Copy link

kiransgk1si18lvs04 commented Apr 27, 2020

Hi@velichkov
I am using python 3.7.6.
pythonpath added still program is not working.

#!/usr/bin/python3
import tkinter as tk
import subprocess
import shlex
def BCCH():
    while True:
        try:
                cmd=["grgsm_scanner","--args=rtl","-b","GSM900"]
                output= subprocess.getoutput(cmd)
                result=print('>', output)
                # put result in label
                if not output is None:
                    result['text'] = output.decode('utf-8')
        except subprocess.CalledProcessError as exc:
           print(exc.returncode)
        
                
                
          
my_gui = tk.Tk()

my_gui.geometry('600x600')
my_gui.title("Get output inside GUI") 
tk.Button(my_gui,text="GET BCCH", command=BCCH).pack() 
result = tk.Label(my_gui,font=50)
result.pack()

my_gui.mainloop()

@velichkov
Copy link
Contributor

velichkov commented Apr 27, 2020

Hi @kiransgk1si18lvs04,

pythonpath added still program is not working.

What do you mean by "not working"?

Double check that the environment variable is exported correctly and that grgsm module is installed in /usr/local/lib/python3/dist-packages/

echo $PYTHONPATH
ls /usr/local/lib/python3/dist-packages/grgsm/

@kiransgk1si18lvs04
Copy link

kiransgk1si18lvs04 commented Apr 27, 2020

sorry I am noob in this case @velichkov
grgsm is inside the folder of `/usr/local/lib/python3/dist-packages/'
grgsm_scanner works on command terminal in kali linux, but not works on above program.

The error details are,

Traceback (most recent call last):
  File "/usr/local/bin/grgsm_scanner", line 33, in <module>
    import grgsm
ModuleNotFoundError: No module named 'grgsm'

This is bash_profile

 GNU nano 4.5                                                                                      .bash_profile                                                                                       Modified  
export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH

If i type "echo $PYTHONPATH" terminal, this shows up on terminal

echo $PYTHONPATH
/usr/local/lib/python3/dist-packages/:

@velichkov
Copy link
Contributor

Hi @kiransgk1si18lvs04,

grgsm_scanner works on command terminal in kali linux, but not works on above program.

How do you start the above program? In your program somewhere at the top add the following and give me the output

import sys
print(sys.path)

and also give me the full output of ls /usr/local/lib/python3/dist-packages/grgsm

@kiransgk1si18lvs04
Copy link

kiransgk1si18lvs04 commented Apr 27, 2020

How do you start the above program? In your program somewhere at the top add the following and give me the output

By using .py file

['/home/kali', '/usr/bin', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.7/dist-packages']
Traceback (most recent call last):
  File "/usr/local/bin/grgsm_scanner", line 33, in <module>
    import grgsm
ModuleNotFoundError: No module named 'grgsm'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/home/kali/bcch.py", line 15, in BCCH
    result['text'] = output.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

and also give me the full output of ls /usr/local/lib/python3/dist-packages/grgsm

kali@kali:~$ ls /usr/local/lib/python3/dist-packages/grgsm
arfcn.py                           clock_offset_corrector_tagged.pyo  fcch_detector.pyc  _grgsm_swig.so                     gsm_gmsk_mod.pyc         __init__.py              txtime_bursts_tagger.pyc
arfcn.pyc                          device.py                          fcch_detector.pyo  gsm_bcch_ccch_demapper.py          gsm_gmsk_mod.pyo         __init__.pyc             txtime_bursts_tagger.pyo
arfcn.pyo                          device.pyc                         fn_time.py         gsm_bcch_ccch_demapper.pyc         gsm_input.py             __init__.pyo
chirpz.py                          device.pyo                         fn_time.pyc        gsm_bcch_ccch_demapper.pyo         gsm_input.pyc            sch_detector.py
chirpz.pyc                         fcch_burst_tagger.py               fn_time.pyo        gsm_bcch_ccch_sdcch4_demapper.py   gsm_input.pyo            sch_detector.pyc
chirpz.pyo                         fcch_burst_tagger.pyc              grgsm_swig.py      gsm_bcch_ccch_sdcch4_demapper.pyc  gsm_sdcch8_demapper.py   sch_detector.pyo
clock_offset_corrector_tagged.py   fcch_burst_tagger.pyo              grgsm_swig.pyc     gsm_bcch_ccch_sdcch4_demapper.pyo  gsm_sdcch8_demapper.pyc  trx
clock_offset_corrector_tagged.pyc  fcch_detector.py                   grgsm_swig.pyo     gsm_gmsk_mod.py                    gsm_sdcch8_demapper.pyo  txtime_bursts_tagger.py

@velichkov
Copy link
Contributor

By using .py file

How exactly? Do you run it from some IDE or from the command line?

['/home/kali', '/usr/bin', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.7/dist-packages']

The /usr/local/lib/python3/dist-packages/grgsm is not in sys.path and this explains why it can't find the grgsm module.

This is bash_profile

export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH

Try adding the export line to your ~/.profile and logout and login again. See also https://help.ubuntu.com/community/EnvironmentVariables#A.2BAH4-.2F.profile

@kiransgk1si18lvs04
Copy link

kiransgk1si18lvs04 commented Apr 27, 2020

How exactly? Do you run it from some IDE or from the command line?
I will run through python idle, and make a new file of .py and the version of python is 3.7.6
mail

Try adding the export line to your ~/.profile and logout and login again. See also https://help.ubuntu.com/community/EnvironmentVariables#A.2BAH4-.2F.profile

I studied it, and added path to .profile , I am getting same error output

sorry for attaching screen shot, to make convenient I have attached.

@velichkov
Copy link
Contributor

I will run through python idle, and make a new file of .py and the version of python is 3.7.6

Try running your program from the command line - python3 ./bcch.py.

I studied it, and added path to .profile , I am getting same error output

Did you logout or reboot after adding it?

If yes then most probably the python idle reset the PYTHONPATH environment variable. I'm not familiar with this IDE and I don't know how to correctly set the PYTHONPATH in it.

@kiransgk1si18lvs04
Copy link

Thanks for your time and help velichkov

@kiransgk1si18lvs04
Copy link

kiransgk1si18lvs04 commented Apr 28, 2020

Hi @velichkov
I got solution for that, I just copied grgsm module to system located python dist packages.

sudo cp -r /usr/local/lib/python3/dist-packages/grgsm/ /usr/lib/python3/dist-packages/

Thanks for support, I have a last question
when I type kal -s GSM900 it shows power 79296 that in terms of thousands, but when type grgsm_scanner in terminal its showing in terms of 10's ie 47 or 50 like that, Is that a signal strength

kal -s GSM900
Found 1 device(s):
  0:  Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM
Found Elonics E4000 tuner
Exact sample rate is: 270833.002142 Hz
kal: Scanning for GSM-900 base stations.
GSM-900:
        chan: 56 (946.2MHz + 11.560kHz) power: 79626.29

grgsm_scanner --args=rtl -b GSM900

ARFCN:   56, Freq:  946.2M, CID:   241, LAC: 21853, MCC: 404, MNC:  45, Pwr: -34

@velichkov
Copy link
Contributor

velichkov commented Apr 28, 2020

Hi @kiransgk1si18lvs04,

I got solution for that, I just copied grgsm module to system located python dist packages.

sudo cp -r /usr/local/lib/python3/dist-packages/grgsm/ /usr/lib/python3/dist-packages/

I do not recommend doing this. If you can't find how to modify the PYTHONPATH in your IDE then in my opinion the next best thing is to create a symlink in /usr/local/lib/python3.7/dist-packages that points to /usr/local/lib/python3/dist-packages/grgsm/

sudo ln -sf /usr/local/lib/python3/dist-packages/grgsm/ /usr/local/lib/python3.7/dist-packages/grgsm

when I type kal -s GSM900 it shows power 79296 that in terms of thousands, but when type grgsm_scanner in terminal its showing in terms of 10's ie 47 or 50 like that, Is that a signal strength

My understanding is that these numbers are all relative and you can't compare them directly.

@wisecrow86
Copy link

Greetings,
Dear friends pls advise me how to settle my issue,

After i call:
gnuradio-companion grgsm_livemon.grc
it opens fine and have few blocks in red (gsm_input etc.)

System infos:
Operating System: Kali GNU/Linux Rolling
Kernel: Linux 5.5.0-kali2-amd64
Architecture: x86-64

grgsm call:
root@a2v:~/Desktop/radio/gr-gsm/apps# gnuradio-companion grgsm_livemon.grc
Welcome to GNU Radio Companion 3.8.1.0
Block paths:
/root/.grc_gnuradio
/usr/share/gnuradio/grc/blocks
Loading: "/root/Desktop/radio/gr-gsm/apps/grgsm_livemon.grc"

i join a myscreen:
grgsm

@kubopiy
Copy link

kubopiy commented Oct 11, 2020

好人一生平安

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants