How to recover from 0 return of Transmit in LimeSuiteNG?

Occasionally the new interface Transmit returns with a zero count of samples. I guess this can happen when the internally used timeout of one second is exhausted.

My question is how to deal with this fact properly. What I have already tried:

  1. immediately try again
  2. have the thread sleep 10ms or 100ms and try again

None of the both worked. The problem only got worse.

I understand that this could be an irrecoverably error and the current packet has to be aborted. The question than arises, what should follow?

  1. Do I need to tear down the stream? (This would also involve the rx side.)
  2. Do I need to reinitialize the device?
  3. Should the whole process be stopped and restarted?

Any hints appreciated.

Roland

Yes, that is what you should do, if the transmitted samples are 0, try again.

Transmit() returns 0, if the internal buffers are already full, so no more samples can be queued. It is recoverable, you just need to try again until some samples will be actually transmitted to RF and some buffers will be free again.

When using timestamps synchronization, if the sent packet has a timestamp that’s very far in to the future, it will essentially block the transmit path, until that specified time. You would end up filling the internal buffers, and they would remain full until that first packet is actually transmitted to RF. If you become blocked by such timestamp, It’s enough just to stop the stream, that clears FIFOs and hardware internal state, tear down is not required.

If your used timestamp type is samples ticks, check if the timestamp is not negative, it would underflow and become very large number, that would block the transmision path.

I scheduled a sleep of 100ms before trying again, in a loop but the loop was not ended. I tried for several seconds before I eventually killed the process.

What puzzles me is that sometimes the sending runs for minutes (before I intentionally stop), and at other times it fails early. The load of the PC is the same in both circumstances.

I will try to find a reproducible setup.

Which LimeSDR board you are using, and what it’s gateware version?

0: LimeSDR Mini, media=USB3.0, addr=0403:601f, serial=XXXXXXXXXXXXXX
	Expansion name		: UNSUPPORTED
	Firmware version	: 10
	Gateware version	: 2
	Gateware revision	: 7
	Gateware target board	: LimeSDR-Mini
	Hardware version	: 5
	Protocol version	: 1
	Serial number		: xxxxxxxxxxxxxxxx
	SPI slave devices	:
				  FPGA
				  LMS7002M
	Memory devices		:
				  FPGA/FLASH
	GPS Lock:
		GPS - Undefined
		Glonass - Undefined
		Galileo - Undefined
		Beidou - Undefined
	Sensors:
		Temperature(LMS7002) : 23.976°C
		VCTCXO DAC (runtime) : 566
		Board Temperature : 21.5C

I am using the latest (about one year old) lms7_trx_impl1.bit from the LimeSDR-Mini-v2_GW repository.

Once it fails, does Tx start to work if you run the software again? If not, then it’s most likely a USB/gateware issue.
You might try latest gateware: LimeSDR_GW/bitstream/LimeSDR_Mini_V2 at master · myriadrf/LimeSDR_GW · GitHub

Does this version also have the Add TX indication on GPIO fix? This is a feature I rely on.

I’m not sure, @VytautasB could you verify?

Hi,

unfortunately new GW does not have this feature at the moment.
I have created issue in repo for tracking this: