jopohl / urh

Universal Radio Hacker: Investigate Wireless Protocols Like A Boss
GNU General Public License v3.0
10.99k stars 874 forks source link

LimeSDR - Simulator - duplicate messages #916

Closed prefixFelix closed 2 years ago

prefixFelix commented 2 years ago

Expected Behavior

In simulation mode, several messages are to be transmitted. In this example, a delay of 5 seconds is set before the message frame to show the problem more clearly (it also occurs without a delay).

Simulator view:

flow-graph

Actual Behavior

If you start the simulation for the first time, everything runs as expected:

First start of the simulation inspected with Gqrx:

expected

First start of the simulation recorded with URH:

expected-urh

If you press the start button again in the simulation window, you will get this result:

Second start of the simulation inspected with Gqrx:

actual

Second start of the simulation recorded with URH:

actual-urh

Parts the message frame (or the whole frame) are sent both shortly after the calibration phase of the LimeSDR as well as at the correct time slot. The time delay is irrelevant. If you simply remove it, more messages will be sent than are specified in the flow diagram. If you press the start button again, you will get the same result.
Only by opening and closing the simulation window is it possible to send an valid message block again.

Steps To Reproduce

  1. Use LimeSDR
  2. Create a simple flow diagram as shown above
  3. Run the simulations 2 times in a row

Platform Specifications

andynoack commented 2 years ago

I guess this is due to not flushing the TX buffer (fast enough) after sending...I am not even sure whether we could possibly fix that in URH.

prefixFelix commented 2 years ago

Ok, I guess it's not that big a bug, since you can just reopen the window to fix it.

andynoack commented 2 years ago

You are welcome to make a PR, if you think, that one is easy to do. At the moment I don't have my LimeSDR ready, so we would really appreciate any help here.