Monthly Archives: 10月 2016

コードが動かない(python)

とあるpythonコードを実行したところimportがないと躓いた

error while loading shared libraries: ****.so: cannot open shared object file: No such file or directory

と表示。soファイルは/usr/local/libにあるがな。

ググってみるとldconfigに対象が登録されていないのでは?と先生のナイス回答。フ

さっそくldconfig -pで見てみると対象がない。
でも/etc/ld.so.conf.dにはパスが通ったconfがあった。

sudo ldconfigを実行しldconfig -pで確認したら通ったよ。なんだよもう


makeできない

X300を使ってとあるプログラムを実行したいんだけど、cmake -> makeができない。 makeの時点でいくつかのライブラリが見つからない警告が出ていたので、CMakeChacheに書かれていた見つからない対象のパスを修正->その後CMake->Makeで通った。


[USRP X300] IPアドレス変更

展開先のbuild/utils/usrp_burn_mb_eepromでEEPROMを書き換える

If the address is wrong, you can reprogram the IP address of the USRP X300/X310: cd <install-path>/lib/uhd/utils ; ./usrp_burn_mb_eeprom –args=addr=<current IP address> –values=”ip-addr0=<new ip address>”

 

usr@dir:~/uhd-3.9.5/build/utils$ ./usrp_burn_mb_eeprom –args=addr=192.168.10.2 –values=”ip-addr0=192.168.0.189″
linux; GNU C++ version 4.8.4; Boost_105400; UHD_003.009.005-0-unknown

Creating USRP device from address: addr=192.168.10.2
— X300 initialization sequence…
— Determining maximum frame size… 1472 bytes.
— Setup basic communication…
— Loading values from EEPROM…
— Setup RF frontend clocking…
— Radio 1x clock:200
— Detecting internal GPSDO…. Found an internal GPSDO
— Initialize Radio0 control…
— Performing register loopback test… pass
— Initialize Radio1 control…
— Performing register loopback test… pass

Fetching current settings from EEPROM…
EEPROM [“ip-addr0”] is “192.168.10.2”

Setting EEPROM [“ip-addr0”] to “192.168.0.189”…
Power-cycle the USRP device for the changes to take effect.

Done