PlutoSDR (Zynq+AD9361) osmo-trx

The PlutoSDR is a (relatively) cheap, popular SDR learning platform by Analog Devices. It contains their AD936x RF chip (same as USRP B210, BladeRF, etc.) and a Xilinx Zynq SoC (FPGA + ARM CPU).

Phil Greenland published this excellent blog post & gateware modification for the popular PlutoSDR a while ago: Private LTE Setup with Pluto+ SDR Guide
It adds much needed support for hardware timestamping to the gateware and makes it possible to use the PlutoSDR as a 4G/LTE eNodeB.

I wrote a PlutoDevice driver for osmo-trx, so we can also enjoy good old GSM on this little radio:

PlutoSDR uses libiio to allow services to talk to the SDR.
This can also be used over the network and USB ports, but it’s somewhat impractical for 2G networks because of latency and stability concerns.
Phil wrote a new service that tunnels raw I/Q samples directly over USB or IP packets. I chose a different approach and let osmo-trx-pluto run directly on the armv7 core inside the Zynq SoC.

Because the PlutoSDR doesn’t have any useful permanent storage (besides the firmware SPI NOR flash itself), I hacked together a very quick and dirty script that replaces the root filesystem in the original firmware with one containing osmo-trx-pluto.

This allows the PlutoSDR to run osmo-trx standalone.
It can then either connect to a machine running osmo-bts via USB (through a RNDIS network adapter) or via network (through a USB NIC).

This is a very, very rough attempt at getting this to work, the timing code doesn’t seem quite right yet (EDGE/viterbi decoder don’t work at all).
RF parameters haven’t been measured at all yet.

The cheap clone Plutos with Ethernet and SD card would probably be an even better target for this, but I’m unsure about the implications of porting the timestamping gateware to another PCB (and besides, I don’t own one of those).

I’ll hook the Pluto up to a proper base station analyser in the coming weeks and hopefully I can tune the RF performance a bit better.
I was also thinking about building something like uhd-pinger for the PlutoSDR (in fact, I briefly tried to port it but failed pretty miserably doing so). Being able to measure the sample delay (instead of just guessing) would probably be useful. Changing the RF parameters like the FIR filter configuration, decimation, etc. changes the delays.

Just wanted to share and hear if this is something people are interested in.

6 Likes

This is excellent news, thanks for your work and for sharing it here. I really do like the approach of running osmo-trx on the PlutoSDR itself. This should reduce latency and also of course drastically reduces the USB load towards the host. Question is of course which capacity/features one can reach within the compute capacity of the (zynq, AFAIR) internal ARM cores.

I’m sure @fixeria and @Hoernchen would love to play with it.

BTW, not the same approach, but still related: GitHub - iliasam/osmo-trx_soapy: OsmoTRX with a SoapySDR support · GitHub. This fork of osmo-trx works with PlutoSDR and its clones.

1 Like

Oh wow! From March of this year!! o.O
Well, that’s a bit sad in terms of wasted time.

osmo-trx runs fine (with all timeslots), but trying to also run osmo-trx-bts already causes the box to stutter/lose samples.
So there’s not much headroom.

1 Like

My original post was inaccurate (edited), sorry. That fork of osmo-trx actually runs on the host via SoapySDR API. So your approach is far more advanced :wink:

do you mean with all timeslots actually active in RX+TX? 1SPS or 4SPS? With or without viterbi equalizer? There’s also a difference in computational complexity if RACH correlation is enabled on a slot or not (required during inbound handover).

All timeslots active, 4SPS, without viterbi, without 11bit RACH.

There’s really not much headroom left at that point, though.
Might be worth looking into fiddling with the clock settings of the Zynq as well. I’ve read online that they have a bunch of headroom but haven’t fiddled with the settings myself yet.

1 Like