zoukankan      html  css  js  c++  java
  • airprobe: gsmtvoid : gsm_scan.py problem part1

    2011-09-13

    I meet a problem when I run the gsm-tovid.
    Firstly, I enter the /airprobe/gsm-tvoid/src
    typed : ./gsm_scan.py -p d -c 39 > scan_results

    a error arising:
    root@ubuntu:/home/my_project/usrp/airprobe/gsm-tvoid/src/python# ./gsm_scan.py -p d -c 5  > scan_results
    % offset =  0.0 clock =  64000000.0
    fusb_block_size = 4096
    fusb_nblocks    = 16
    Traceback (most recent call last):
      File "./gsm_scan.py", line 734, in <module>
        main()
      File "./gsm_scan.py", line 728, in main
        app = stdgui2.stdapp(app_flow_graph, "GSM Scanner", nstatus=1)
      File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 36, in __init__
        wx.App.__init__ (self, redirect=False)
      File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7978, in __init__
        self._BootstrapApp()
      File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7552, in _BootstrapApp
        return _core_.PyApp__BootstrapApp(*args, **kwargs)
      File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 39, in OnInit
        frame = stdframe (self.top_block_maker, self.title, self._nstatus)
      File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 60, in __init__
        self.panel = stdpanel (self, self, top_block_maker)
      File "/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/stdgui2.py", line 81, in __init__
        self.top_block = top_block_maker (frame, self, vbox, sys.argv)
      File "./gsm_scan.py", line 174, in __init__
        self.setup_flowgraph()   
      File "./gsm_scan.py", line 554, in setup_flowgraph
        self.setup_usrp()
      File "./gsm_scan.py", line 366, in setup_usrp
        options.rx_subdev_spec = pick_subdevice(self.ursp)
      File "./gsm_scan.py", line 88, in pick_subdevice
        if u.db[0][0].dbid() >= 0:
    TypeError: 'instancemethod' object is not subscriptable

    So I look the error messages and open the gsm_scan.py. I use ctrl + F to locate the pick_subdevice function. I think u.db[0][0].dbid() is not matched for new Gnuradio Version. Because the Gnuradio is updated to 3.4.1 now. I open other Gnuradio example code to compare this function and find it now uses u.db(0,0).dbid() not u.db[0][0].dbid().
     
    def pick_subdevice(u):
        """
        The user didn't specify a subdevice on the command line.
        If there's a daughterboard on A, select A.
        If there's a daughterboard on B, select B.
        Otherwise, select A.
        """
        if u.db(0, 0).dbid() >= 0:       # dbid is < 0 if there's no d'board or a problem
            return (0, 0)
        if u.db(0, 0).dbid() >= 0:
            return (1, 0)
        return (0, 0)

    airprobe: gsm-tvoid : gsm_scan.py problem part1

    airprobe: gsm-tvoid : gsm_scan.py problem part1




    using new code fix it right and go on.
    It can run but another problem arises.


    root@ubuntu:/home/my_project/usrp/airprobe/gsm-tvoid/src/python# ./gsm_scan.py -p d -c 5  > scan_results
    % offset =  0.0 clock =  64000000.0
    fusb_block_size = 4096
    fusb_nblocks    = 16
    >>> gr_fir_ccc: using SSE
    >>> gr_fir_ccf: using SSE
    Segmentation fault


    This error is very difficult. Oops!! What the hell is going on?
    Now I try my best to find the answer.
  • 相关阅读:
    最小堆
    HDU1022+栈
    POJ2318+几何+判点在四边形内
    HDU1003+最大连续子序列和+起始终止位置
    HDU1174+三维点到直线距离
    HDU4517
    Two Phase Commit (2PC) [转]
    分布式系统领域经典论文翻译集 [转]银河里的星星
    每个程序员都应该知道的8个LINUX命令 [转]
    Google File System解析 [转]
  • 原文地址:https://www.cnblogs.com/nickchan/p/3104489.html
Copyright © 2011-2022 走看看