Hello OpenBTS community,

I've been working on getting Thomas Tsou's OpenBTS UHD code from https://github.com/ttsou/openbts-uhd running on an E100 with an RFX900 board. I did this quick hack to get the USRP to be recognized:

----------------------------------------
diff --git a/public-trunk/Transceiver/UHDDevice.cpp b/public-trunk/Transceiver/UHDDevice.cpp
index 9ac3af5..1c4b55a 100644
--- a/public-trunk/Transceiver/UHDDevice.cpp
+++ b/public-trunk/Transceiver/UHDDevice.cpp
@@ -214,9 +214,9 @@ UHDDevice::~UHDDevice()
 bool UHDDevice::open()
 {
        LOG(INFO) << "creating USRP device...";
+       uhd::device_addr_t dev_addr("type=usrp-e");
 
        // Use the first USRP2
-       uhd::device_addr_t dev_addr("type=usrp2");
        try {
                usrpDevice = uhd::usrp::single_usrp::make(dev_addr);
        }
----------------------------------------

However, while the USRP is now found, OpenBTS runs for a few seconds and then dies. Here's what I'm seeing:

----------------------------------------
root@usrp-e1xx:~/openbts-uhd/public-trunk/apps# ./OpenBTS
1304002726.972762 1073868336: 

OpenBTS, Copyright 2008-2010 Free Software Foundation, Inc.
Release 2.6PUBLIC built Apr 25 2011
"OpenBTS" is a trademark of Kestrel Signal Processing, Inc.,
regsitered with the US Patent and Trademark Office.

Contributors:
  Kestrel Signal Processing, Inc.:
    David Burgess, Harvind Samra, Raffi Sevlian, Roshan Baliga
  GNU Radio:
    Johnathan Corgan
  Others:
    Anne Kwong, Jacob Appelbaum, Joshua Lackey, Alon Levy
    Alexander Chemeris, Alberto Escudero-Pascual
Incorporated GPL libraries and components:
  libosip2, liportp2, readline

This program comes with ABSOLUTELY NO WARRANTY.

This is free software; you are welcome to redistribute it
under the terms of AGPLv3.
Please see the COPYING file in the source code for information
about the AGPLv3 license and recommended procedures for compliance
with the Affero requirements of that license.

Use of this software may be subject to other legal restrictions,
including patent licsensing and radio spectrum licensing.
All users of this software are expected to comply with applicable
regulations and laws.


1304002726.974685 1073868336: 
Starting the system...
1304002726.9763 ALARM 1073868336 OpenBTS.cpp:129:main: OpenBTS starting, ver 2.6PUBLIC build date Apr 25 2011
linux; GNU C++ version 4.5.2 20101204 (prerelease); Boost_104100; UHD_0001.20101214211912.1

1304002727.0838 FORCE 1073877840 Logger.cpp:194:gLogInit: Setting initial global logging level to NOTICE
Opening USRP-E on /dev/usrp_e0
1304002731.9973 ALARM 1073868336 TRXManager.cpp:447:setMaxDelay: SETMAXDLY failed with status -1
1304002731.9998 ALARM 1073868336 TRXManager.cpp:458:setRxGain: SETRXGAIN failed with status -1
terminate called after throwing an instance of 'std::runtime_error'
  what():  cannot get this property
  in void usrp_e100_impl::mboard_get(const wax::obj&, wax::obj&)
  at /workspace/usrp1-e-dev/oe/tmp.balister/work/armv7a-angstrom-linux-gnueabi/uhd-git-r4.2/git/host/lib/usrp/usrp_e100/mboard_impl.cpp:137

1304002735.0026 ALARM 1086485600 TRXManager.cpp:87:clockHandler: TRX clock interface timed out, assuming TRX is dead.
Aborted
root@usrp-e1xx:~/openbts-uhd/public-trunk/apps#
----------------------------------------

When I run Transceiver with DEBUG in another shell, I see this when starting OpenBTS:

----------------------------------------
root@usrp-e1xx:~/openbts-uhd/public-trunk/apps# ../Transceiver/transceiver DEBUG
linux; GNU C++ version 4.5.2 20101204 (prerelease); Boost_104100; UHD_0001.20101214211912.1

1304003124.5383 FORCE 1073877840 Logger.cpp:194:gLogInit: Setting initial global logging level to DEBUG
1304003124.5393 INFO 1073877840 UHDDevice.cpp:216:open: creating USRP device...
Opening USRP-E on /dev/usrp_e0
1304003124.7727 INFO 1073877840 UHDDevice.cpp:275:open: Single USRP:
  Device: usrp-e device
  Mboard: usrp-e mboard
  RX DSP: usrp-e ddc0
  RX Channel: 0
    RX Dboard: usrp-e dboard (rx unit)
    RX Subdev: RFX900 (0x0025)
  TX DSP: usrp-e duc0
  TX Channel: 0
    TX Dboard: usrp-e dboard (tx unit)
    TX Subdev: RFX900 (0x0029)

1304003124.7768 DEBUG 1073877840 Transceiver.cpp:61:Transceiver: gsmPulse: 0.1828 0.0000j
 0.9660 0.0000j
 0.1828 0.0000j
 
1304003124.7914 INFO 1073877840 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.1815 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.1819 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD POWEROFF
1304003189.1827 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.1830 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD SETTSC 2
1304003189.1844 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.1853 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD RXTUNE 900200
1304003189.1901 INFO 1104454752 UHDDevice.cpp:455:setRxFreq: Tune Result:
    Target Intermediate Freq: 900.200000 (MHz)
    Actual Intermediate Freq: 900.000000 (MHz)
    Target DSP Freq Shift:    -0.200000 (MHz)
    Actual DSP Freq Shift:    -0.200000 (MHz)

1304003189.1915 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.1918 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD TXTUNE 945200
1304003189.2011 INFO 1104454752 UHDDevice.cpp:448:setTxFreq: Tune Result:
    Target Intermediate Freq: 945.400000 (MHz)
    Actual Intermediate Freq: 944.000000 (MHz)
    Target DSP Freq Shift:    1.200000 (MHz)
    Actual DSP Freq Shift:    1.200000 (MHz)

1304003189.2022 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.2026 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD POWERON
1304003189.2028 INFO 1104454752 radioInterface.cpp:287:start: starting radio interface...
1304003189.2034 DEBUG 1104454752 radioInterface.cpp:298:start: radio interface started!
1304003189.2040 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.2044 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD SETPOWER 7
1304003189.2049 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.2052 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD SETMAXDLY 1
1304003189.2054 WARN 1104454752 Transceiver.cpp:572:driveControl: bogus command SETMAXDLY on control interface.
1304003189.2068 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.2073 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD SETRXGAIN 57
1304003189.2075 WARN 1104454752 Transceiver.cpp:572:driveControl: bogus command SETRXGAIN on control interface.
1304003189.2107 INFO 1104454752 Transceiver.cpp:739:writeClockInterface: ClockInterface: sending IND CLOCK 1664788
1304003189.2113 INFO 1104454752 Transceiver.cpp:468:driveControl: command is CMD SETSLOT 0 5
1304003189.2218 INFO 1104979040 radioInterface.cpp:148:pushBuffer: Starting USRP
1304003189.2221 INFO 1104979040 UHDDevice.cpp:283:start: Starting USRP...
terminate called after throwing an instance of 'std::runtime_error'
  what():  cannot get this property
  in void usrp_e100_impl::mboard_get(const wax::obj&, wax::obj&)
  at /workspace/usrp1-e-dev/oe/tmp.balister/work/armv7a-angstrom-linux-gnueabi/uhd-git-r4.2/git/host/lib/usrp/usrp_e100/mboard_impl.cpp:137

Aborted
root@usrp-e1xx:~/openbts-uhd/public-trunk/apps# 
----------------------------------------

Some issue right after "Starting USRP..." - cannot get "what()" property? Does anyone know what's going on here?

Thanks for your time.

--
-Anders
-----------------------------------------------------------
Anders Brownworth
anders94@gmail.com
http://andersbrownworth.com/
http://twitter.com/anders94