# LimeSDR with SoapySDR python module

**URL:** <https://discourse.myriadrf.org/t/limesdr-with-soapysdr-python-module/983>\
**Category:** LimeSDR\
**Created:** [22 March 2017 14:37 UTC](https://discourse.myriadrf.org/t/limesdr-with-soapysdr-python-module/983 "2017-03-22T14:37:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elemeno](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@elemeno](https://discourse.myriadrf.org/u/elemeno)\
**Post date:** [22 March 2017 14:37 UTC](https://discourse.myriadrf.org/t/limesdr-with-soapysdr-python-module/983/1 "2017-03-22T14:37:36Z")

</div>

I’m trying to make a timed burst transmitter using LimeSDR with the SoapySDR python module. Calls to mysdr.hasHardwareTime() returns True but all subsequent calls to mysdr.getHardwareTime() return 0 ns. Example code:

```
import SoapySDR
from SoapySDR import *
import time

args = dict(driver="lime")
sdr = SoapySDR.Device(args)

print sdr.hasHardwareTime()

while True:
    print sdr.getHardwareTime()
    time.sleep(1.0)

```

All of this works on a USRP B200. Does LimeSDR really have a hardware timer? Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![mikos](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@mikos](https://discourse.myriadrf.org/u/mikos)\
**Post date:** [22 March 2017 15:33 UTC](https://discourse.myriadrf.org/t/limesdr-with-soapysdr-python-module/983/2 "2017-03-22T15:33:26Z")

</div>

`getHardwareTime()` works as expected after you start streaming (`setupStream()` and `activateStream()`).

EDIT: And if you `deactivateStream()`, it returns `0` again. After `activateStream()`, timer starts from beginning.

---

<div class="post-metadata">

**Author:** ![elemeno](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@elemeno](https://discourse.myriadrf.org/u/elemeno)\
**Post date:** [22 March 2017 15:58 UTC](https://discourse.myriadrf.org/t/limesdr-with-soapysdr-python-module/983/3 "2017-03-22T15:58:46Z")

</div>

Thanks for your help. Confirmed that it works and will probably suit my application well.

I’m still a bit confused though. `activateStream()` and `deactivateStream()` have optional time parameters. How can one activate a stream at a certain time if the hardware timer isn’t running until the stream is activated? The [MeasureDelay.py](https://github.com/pothosware/SoapySDR/blob/master/python/apps/MeasureDelay.py) example uses this feature.
