Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp issue #228

Open
lryindra opened this issue Oct 9, 2018 · 9 comments
Open

Timestamp issue #228

lryindra opened this issue Oct 9, 2018 · 9 comments

Comments

@lryindra
Copy link

lryindra commented Oct 9, 2018

Issue #219 was closed because SYNCH_DIS (bit 9) in DIQ interface control (0x0008) should always be 0 (Enable packets synchronization using timestamps).

Because the FPGA must always use the time stamp, LMS_RecvStream and LMS_SendStream should return an error if meta is ever NULL because metadata.timestamp = 0 is not a valid condition. As found in src/API/lms7_api.cpp.

@IgnasJarusevicius
Copy link
Contributor

Passing NULL as metadata gives the same result as passing metadata with:
.timestamp=0;
.waitForTimestamp=false;
.flushPartialPacket=false;
As I said in the previous issue, timestamp synchronization is controlled by waitForTimestamp flag. Timestamp is ignored if 'waitForTimestamp=false', so passing NULL is valid.

@lryindra
Copy link
Author

Given the following conditions:

  • SYNCH_DIS (bit 9) in DIQ interface control (0x0008) is 0 (Enable packets synchronization using timestamps)
  • .timestamp = 0
  • .waitForTimestamp = false

I make a call to LMS_StopStream, then I make some changes to the data source, then I call LMS_StartStream.

What I observe is that data is only transmitted when I perform the LMS_StopStream & LMS_StartStream twice.

Issue #219 was the first workaround I found that made data transmit after every call to LMS_StartStream instead of every other.

@IgnasJarusevicius
Copy link
Contributor

Could you provide a more detailed explanation of your problem? What board are you using (LimeSDR-Mini or LimeSDR-USB)? Are you using Tx only or both Tx and Rx?
I have tried replicating the problem by modifying basicTX example and I did not notice any problems with LimeSDR-USB or LimeSDR-Mini.
The streaming sequence in my test was basically:

  1. LMS_SetupStream()
  2. LMS_StartStream()
  3. Stream for 10s (using LMS_SendStream())
  4. LMS_StopStream()
  5. Sleep for some time (tried 100ms, 500ms and 1000ms)
  6. LMS_StartStream()
  7. Stream for 10s (using LMS_SendStream())
  8. LMS_StopStream()
  9. LMS_DestroyStream()

@lryindra
Copy link
Author

I updated LimeSuite to gitrev: 18d2fa (this is LimeSuite 18.10), and I got the same results as I did with the older version of LimeSuite.

I should also say that I tested with a LimeSDR-Mini.

@IgnasJarusevicius
Copy link
Contributor

So the issue only appears on Raspberry Pi 3 and it works fine on PC with Intel i5 CPU?
RPi 3 only has USB2, did you use also USB2 on i5 PC? Are you using the latest FPGA gateware for LimeSDR-Mini? I think some USB2 issue was addressed in recent FPGA update for LimeSDR-Mini.
It is also possible that LimeSDR-Mini is not getting enough power from RPi via USB2 and is not working stably because of that.

@lryindra
Copy link
Author

  1. yes the Raspberry Pi 3 only has USB 2.0 ports. The LimeSDR-Mini is (sometimes) shipped with a splitter cable that should draw voltage from two USB 2.0 ports. I have not found the splitter to be necessary.
  2. I tested the code in timestamp.tar.zip on the Raspberry Pi 3 with LimeSuite version 18.06 (gitrev: ddae8b9) and with LimeSuite version 18.10 (gitrev: 18d2fa), and I get the same behavior with both versions.
  3. my Intel i5 computer has a USB 3.0 port which is handy because I know that LimeSuite 18.06's gateway FPGA for the LimeSDR-USB is unable to transfer data over USB 2.0.
  4. I can get the results I want by either destroying and creating as in limesdr_stopchannel from https://github.com/emvivre/limesdr_toolbox, or by setting SYNCH_DIS (bit 9) in DIQ interface control (0x0008) to 1 (Disable packets synchronization using timestamps).
  5. it sounds like you don't spend a lot of time reading discourse.myriadrf.org. Maybe Andrew Back can assist?

@lryindra
Copy link
Author

I updated, so I'm posted the updated software:
Hardware: Raspberry Pi 3 Model B+
OS: ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz from https://www.ubuntu.com/download/iot/raspberry-pi-2-3
attached software required GnuRadio (version 3.7.13.5), LimeSuite (gui version 19.04.0-gdd83c404) and gr-limesdr (commit 4125e1f4f60a9c17698253c180911199bed657d1)
LimeSDR Mini [USB 2.0] FW:6 HW:1 Protocol:1 GW:1.30 Ref Clk: 40 MHz

timestamp_test.tar.zip

@lryindra
Copy link
Author

lryindra commented May 24, 2019

Do you have any idea how this issue will be resolved for the limenet-micro?

@lryindra
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants