TMiletusRaspberryUART CanRead not returning data

I have a Pi3B running a small Miletus test application. It's connected to a GPS HAT delivering data to the primary serial port (firstPL011). I've confirmed the data delivery with minicom.

In my Miletus test code, I open the serial port and get an OnOpen event. As there's no OnData event (<--- consider this a request!) I poll the port with a WebTimer.

The GPS device sends asynchronously so all I don't need to send to it (though that does work btw), just receive. I can call:

await(Boolean, MiletusRaspberryUART1.CanRead(0))

and that returns True.

Also, I can call:

await(Integer, MiletusRaspberryUART1.WaitingData);

and that returns a number which increases each time, till it gets to about 4096 which I assume means the Rx buffer is full.

All as expected so far. However calls to ReadBuffer don't return any data:

Length = await(Integer, MiletusRaspberryUART1.ReadBuffer(Buffer, Length));

The Buffer is TBytes that I've set to a size already. I can put data into my TBytes array, and it's still there after await/ReadBuffer return. The returned Length is as expected however.

Dave

Title should have been "ReadBuffer not returning data"

We might have seen an issue that could have caused this.
We sent an incremental source update via direct message so you can test.

1 Like

Any updates on the case? :slight_smile:
Got same exact issue, ReadBuffer TJSResponse returns that it has read X amount of data, but receive buffer stays empty, and when checking WaitingData, it returns same amount both before and after ReadBuffer

It is on our todolist to setup a test environment to try to reproduce this so we can investigate.

Hi,

We applied a fix for this, the next update will contain the changes.

1 Like

Thanks! When it's released, I'll test it here with a GPS HAT.

Dave