AK-SDFS-UART unreliable data

Hi,

I’ve hooked up the AK-SDFS-UART to a Z80 based system via a 16550 UART. It mostly works, but I get regular errors - maybe 1 in 5 requests. In most cases I can handle this by resending the request. It will succeed after a retry (or 2).

However, trying to get a directory listing is proving to be problematic. I can get the first few results passed back, then I get an error. The only response I think I have is to retry the whole request - ie, reset the directory request, then loop requests for each entry. However, with directories containing more than 10 (ish) items, I rarely get a successful completion.

Is there any command that just asks the AK-SDFS-UART to resend the last message?

I imagine this could be useful for file reading too. Assuming I’m reading a large file, and a chunk fails, the recovery from that seems to be a seek command and retry the read.

(I’ve implemented a similar system for a USB Serial connection, and a ‘RESEND’ command has been really useful)

Kind regards,
Derek

Hi @Derek_Pettigrew,

Unfortunately, there is no such command.

Perhaps you know, given your circuit, where the problem with the TX/RX signals is. If you know that the problem is on the transmission of the command, then you can keep trying and the AK-SDFS-UART will send you the corresponding dir/file.

If you know that the problem is on the reception of the answer, then you can flag that a dir/file is missing, keep sending DIR commands, and then retry the DIR listing just up to the missing dir/file.

If the problem is on both directions, or you don’t know where the problem is, then the issue is more complicated.

The protocol was thought to guarantee a certain degree of safety, in a way that you can trust the transmitted/received data is not altered (ACK + checksum), but wasn’t designed for faulty or noisy environments (being TTL). Retries shouldn’t be so frequent.