You can read up to 512 bytes at a time using the Read command. If the
num parameter is larger than the number of bytes remaining to be read from the file, then only the remaining bytes are returned. Use the Info command to find the current position. If the Read command is successful, a single
«sp» character is sent, followed by the data. If an error occurs, the first character returned is ”
E”, followed by an error code. Data is sent verbatim (i.e. raw data) from the file.
R fh [num [addr]]
fhis a file handle (1 - 4). Use the Free Handle command to get a free file handle.
numis the number of bytes to read. Optional. If not specified, up to 512 bytes will be returned.
addris the address at which to start reading. Optional.
nummust be given for this parameter to be used.
«sp»response | Enn
response is preceded by a
«sp», indicating a good read. The length of response is variable, and depends on the
num parameter, the position of the file handle, and the size of the file.
File handle position = 0, file size = 38 bytes:
«sp»13:22:02 ADC1=4.9V«cr» 13:22:32 ADC1=4.9V«cr»
A subsequent read:
Same file, read only 18 bytes (starting at address 0):
R 1 18 0