OpenBTS for bladeRF代码修改

2023-05-16

首先从https://github.com/Nuand/dev 上 git clone 下来下载打包的文件, 接着到本地dev目录下执行 clone.sh下载OpenBTS以及它的其他依赖的安装包。

这里在openbts文件夹TrasceiverRAD1文件夹下能看到相应于bladeRF的FPGA文件 hostedx40bts.rbf 对连接的bladeRF写入FPGA的时候也可以写入这个映像, 只不过不是最新的。

接下来用export confflags=--with-bladeRF把环境便来能够改变以后就可以去执行安装命令了。

运行./build会报错:

1 指针变量问题

> In file included from VectorTest.cpp:28:0:
> Vector.h: In instantiation of ‘Vector<T>::Vector(const Vector<T>&, const
> Vector<T>&) [with T = int]’:
> VectorTest.cpp:69:31:   required from here
> Vector.h:343:24: error: ‘vConcat’ was not declared in this scope, and no
> declarations were found by argument-dependent lookup at the point of
> instantiation [-fpermissive]
>    vConcat(other1,other2);
>                         ^
> Vector.h:343:24: note: declarations in dependent base ‘VectorBase<int>’
> are not found by unqualified lookup
> Vector.h:343:24: note: use ‘this->vConcat’ instead

进入dev/openbts/Commonlbs文佳夹修改Vector.h文件, 在343行 vConcat(other1,other2);处加上指针this->vConcat(other1,other2);

2 函数调用参数不匹配问题

再次build会出现:
SIPBase.cpp: In member function 'void SIP::SipRtp::initRTP1(const char*, unsigned int, unsigned int)':
SIPBase.cpp:952:59: error: too few arguments to function 'int rtp_session_set_local_addr(RtpSession*, const char*, int, int)'
  rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort );
                                                           ^
In file included from /usr/include/ortp/telephonyevents.h:30:0,
                 from SIPBase.cpp:30:
/usr/include/ortp/rtpsession.h:291:17: note: declared here
 ORTP_PUBLIC int rtp_session_set_local_addr(RtpSession *session,const char *addr, int rtp_port, int rtcp_port);
                 ^
make[3]: *** [SIPBase.lo] Error 1
make[3]: Leaving directory `/home/wangyida/dev/openbts/SIP'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/wangyida/dev/openbts'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/wangyida/dev/openbts'
make: *** [install-arch] Error 2
dpkg-buildpackage: error: debian/rules binary gave error exit status 2
# ERROR: command failed!

build的过程中包含了一些其它软件的依赖文件, 比如包含了/usr/include/ortp/telephonyevents.h中包含的/usr/include/ortp/rtpsession.h文件中的rtp_session_set_local_addr函数, 眼定义函数中有int rtcp_port变量, openbts中SIP文件夹中的SIPBase.cpp和SIPBase.h文件中参数没有rtcp_port, 为了不破坏结构,又不影响功能, 我在:

SIPBase.h中定义short  mRTCPPort, 并定义mRTCPPort的函数与mRTPPort的函数移植, 并在SIPBase.cpp中的初始化函数中把mRTCPPort初始化为0

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

OpenBTS for bladeRF代码修改 的相关文章

随机推荐