在 CYGWIN 上安装 OpenBTS
安装cygwin ,最好是安整版下载以下压缩包
openbts-2.5.4Lacassine.tar.gz:https://sourceforge.net/projects/openbts/ gnuradio-3.2.2.tar.gz:ftp://ftp.gnu.org/gnu/gnuradio/ libosip2-3.3.0.tar.gz:http://ftp.gnu.org/gnu/osip/ ortp-0.16.1.tar.gz:http://download.savannah.nongnu.org/releases/linphone/ortp/sources/
分别解压缩,分别编译tar zxvf *.gz ln -s openbts-2.5.4Lacassine openbts ln -s gnuradio-3.2.2.tar.gz gnuradio ln -s libosip2-3.3.0.tar.gz libosip ln -s ortp-0.16.1.tar.gz ortp cd gnuradio ./configure --disable-all-components --enable-usrp --enable-omnithread --enable-mblock --enable-pmt make install cd ../libosip2 ./configure ; make install cd ../ortp ./configure ; make install cd openbts ./configure ; make install
问题Q:找不到usrp包 A:由于cygwin似乎不到/usr/local/lib/pkgconfig/ 里读包信息,所以要复制到他能读到的地方
cp /usr/local/lib/pkgconfig/* /usr/lib/pkgconfig/
Q:缺少USRP相关的头文件 A:安装似乎会少生成usrp目录,和相关的头文件,所以手工复制一下
mkdir /usr/include/usrp cp gnuradio/usrp/host/lib/legacy/*.h /usr/include/usrp
Q:说tm结构里少tm_gmtoff A:找到/usr/include/time.h 加入以下代码
#define tm_gmtoff tm_isdst
Q: openbts会报F16.h里有错误 A: 根据以下代码进行修改 F16 operator=(const F16& other)
{
mV = other.mV;
return mV;
}
F16 operator=(const F16& other)
{
mV = other.mV;
return this/*mV/;
}
Q:在Tranceiver里说不能引用 usrp_......... A:在Makefile里找到USRP_LIBS 改成
USRP_LIBS = -lusrp
Q:ortp会有一些INET6的出错 A:因为CYGWIN缺少IPV6的一些头文件,所以禁用ipv6也不能解决问题,需要对源码进和编辑。
ortp/src/rtpsession_inet.c 里找到 AF_INET6
把相应的case 块用 #ifdef ORTP_INET6 和 #endif 包围起来
- 连接USRP
- 准备驱动程序
mkdir usrpinf cp /usr/lib/libusb0.sys usrpinf/ cp /usr/bin/cygusb0.dll usrpinf/libusb0.dll cp gnuradio/usrp/*.inf usrpinf/
- 连接USRP
- 从上面准备好的usrpinf手动安装驱动程序
- cd openbts/Transceiver/
- ./USRPping
- 再次安装驱动程序
- USRP安装结束
|
|