This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ymodem error checking


On Sun, 2005-07-03 at 16:40 +0200, Øyvind Harboe wrote:
> How certain can I be that Ymodem will either:
> 
> a) report a failure
> b) receive the file correctly
> 
> 
> Is adding a layer on top of Ymodem to check that the file was received
> correctly ill-informed paranoia?

Each [relatively small] record in the Y-modem protocol contains
a simple checksum.  This must match for the packet to be ACK'd
Also, packets are numbered and will only be accepted in the proper
order. This level of checking is sufficient (at least 99% of the 
time IMHO)

You could always generate a binary checksum on the data and then
validate that using the 'cksum' command in RedBoot.  In this way,
you could verify that everything was transfered correctly, a step
above checking all the little pieces.  The tricky part with this
is that some files which are downloaded have holes in them and you'd
need to make sure that both checksums assume the same value for
the hole.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]