Back in June, during the LimeSDR crowdfunding campaign, one of the many great demos that we shared details of was a basic Vector Network Analyser (VNA). Since then we’ve understandably had quite a few requests to share the code and this was always the intention, but the engineers at Lime Micro wanted to first spend some time tidying it up and putting together documentation. Well, I’m delighted to report that this has now been completed and the code can be found on GitHub.

What we didn’t previously mention was that the VNA is built on top of a simple Python library, pyLMS7002M, that provides low level register access and high level convenient functions for controlling the LMS7002M chip, and other devices on LimeSDR and evaluation boards. As such it may prove useful for fast prototyping and development of certain applications.

pyLMS7002M is particularly lightweight, since it programs the transceiver directly and does not use the standard driver, LimeSuite, at all. But this also means that it does not benefit from many of LimeSuite’s more advanced features, such as calibration, for example. It should be noted also that there are Python bindings for SoapySDR, the vendor and platform neutral SDR support library which LimeSuite uses to provide SDR streaming+control APIs, plus SDR app ecosystem support.

Generally speaking, Python-based SDR applications should make use of the SoapySDR Python bindings. However, there may be cases where other and typically simpler uses could be supported via pyLMS7002M. The library also serves as another point of reference for those who need to dig deeper and understand in more detail the internal operation of the LMS7002M transceiver.

Documentation is provided for both pyLMS7002M and the VNA example. There are also a number of somewhat more basic examples provided:

  • Find LimeSDR
  • Find LMS7002 EVB
  • LimeSDR Tx CW
  • LimeSDR Tx CW with power output sweep
  • LimeSDR Tx NCO
  • LimeSDR Tx NCO hopping

One final point to note is that at the time of writing the library has not been updated to work with the new SPI architecture, so it would need to be used with previous revisions of the FX3 firmware and FPGA gateware. This is another reason why, generally speaking, it is advisable to use the SoapySDR APIs, since these abstract the underlying hardware and LimeSuite will be updated accordingly whenever any changes are made to LimeSDR interfacing.