This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Ymodem error checking
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Sun, 03 Jul 2005 09:18:07 -0600
- Subject: Re: [ECOS] Ymodem error checking
- References: <1120401601.11779.7.camel@localhost.localdomain>
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