All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] y-modem protocol issue
@ 2011-08-09 10:40 Angelo Dureghello
  2011-08-09 12:03 ` Stefano Babic
  0 siblings, 1 reply; 3+ messages in thread
From: Angelo Dureghello @ 2011-08-09 10:40 UTC (permalink / raw)
  To: u-boot

Hi all,

just to inform, seems xyzModem is not following the protocol spec of YModem:

YMODEM Batch Transmission Session (1 file)

SENDER                                      RECEIVER
                                        <-- C (command:rb)
SOH 00 FF foo.c NUL[123] CRC CRC        -->
                                        <-- ACK
                                        <-- C
SOH 01 FE Data[128] CRC CRC             -->
                                        <-- ACK
SOH 02 FC Data[128] CRC CRC             -->
                                        <-- ACK
SOH 03 FB Data[100] CPMEOF[28] CRC CRC  -->
                                        <-- ACK
EOT                                     -->
                                        <-- NAK
EOT                                     -->
                                        <-- ACK
                                        <-- C
SOH 00 FF NUL[128] CRC CRC              -->
                                        <-- ACK



After first EOT u-boot send an ACK, not correct.
Same behavior using SOH or STX.

Regards
angelo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] y-modem protocol issue
  2011-08-09 10:40 [U-Boot] y-modem protocol issue Angelo Dureghello
@ 2011-08-09 12:03 ` Stefano Babic
  2011-08-09 12:55   ` Angelo Dureghello
  0 siblings, 1 reply; 3+ messages in thread
From: Stefano Babic @ 2011-08-09 12:03 UTC (permalink / raw)
  To: u-boot

On 08/09/2011 12:40 PM, Angelo Dureghello wrote:
> Hi all,

Hi Angelo,

> just to inform, seems xyzModem is not following the protocol spec of YModem:
> 
> YMODEM Batch Transmission Session (1 file)
> 
> SENDER                                      RECEIVER
>                                         <-- C (command:rb)
> SOH 00 FF foo.c NUL[123] CRC CRC        -->
>                                         <-- ACK
>                                         <-- C
> SOH 01 FE Data[128] CRC CRC             -->
>                                         <-- ACK
> SOH 02 FC Data[128] CRC CRC             -->
>                                         <-- ACK
> SOH 03 FB Data[100] CPMEOF[28] CRC CRC  -->
>                                         <-- ACK
> EOT                                     -->
>                                         <-- NAK
> EOT                                     -->
>                                         <-- ACK
>                                         <-- C
> SOH 00 FF NUL[128] CRC CRC              -->
>                                         <-- ACK
> 
> 
> 
> After first EOT u-boot send an ACK, not correct.
> Same behavior using SOH or STX.
> 

"+ At the end of each file, the sending program shall send EOT up to ten
         times until it receives an ACK character.  (This is part of the
         XMODEM spec.)"

Why is u-boot not allowed to send an ACK ? I do not see this behavior on
the protocol. Apart of that, which wrong behavior do you see on your
target ? Can you transfer a file to your board ?

I have tested, no issue found:

loady
## Ready for binary (ymodem) download to 0x90800000 at 115200 bps...

C## Total Size      = 0x0003c418 = 246808 Bytes

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] y-modem protocol issue
  2011-08-09 12:03 ` Stefano Babic
@ 2011-08-09 12:55   ` Angelo Dureghello
  0 siblings, 0 replies; 3+ messages in thread
From: Angelo Dureghello @ 2011-08-09 12:55 UTC (permalink / raw)
  To: u-boot

Hello Stefano,

i apologize, you posted a detail i lost reading the spec.
I can successfully transfert a file to my board, no problem on this.

Anyway, i am implementing a "sender" side sw, i am quite sure i am losing some other details, but if you want to check, i noticed these possible issues:

1.  
(SPEC)
Modification Date The mod date is optional, and the filename and length
may be sent without requiring the mod date to be sent.
Iff the modification date is sent, a single space separates the
modification date from the file length.

You seems always be looking for the space, but if the file size only is sent
(rest of the block must be set to NUL), seems you cannot read the value.

2.
Could you use the file size to ACK and close the transfert immediately after all 
the file has been received, so that 2 subsequent EOT from the sender are not requested ?

3.
Anyway, looking this sequence for a single Y_Modem file transmission,+
i don't understand why u-boot never sends the "NAK" on first EOT, 
but sends an ACK.


              SENDER                                  RECEIVER
                                                      "sb foo.*"
              "sending in batch mode etc."
                                                      C (command:rb)
              SOH 00 FF foo.c NUL[123] CRC CRC
                                                      ACK
                                                      C
              SOH 01 FE Data[128] CRC CRC
                                                      ACK
              SOH 02 FC Data[128] CRC CRC
                                                      ACK
              SOH 03 FB Data[100] CPMEOF[28] CRC CRC
                                                      ACK
              EOT
                                                      NAK <------
              EOT
                                                      ACK
                                                      C
              SOH 00 FF NUL[128] CRC CRC
                                                      ACK


On 09/08/2011 14:03, Stefano Babic wrote:
> On 08/09/2011 12:40 PM, Angelo Dureghello wrote:
>> Hi all,
> 
> Hi Angelo,
> 
>> just to inform, seems xyzModem is not following the protocol spec of YModem:
>>
>> YMODEM Batch Transmission Session (1 file)
>>
>> SENDER                                      RECEIVER
>>                                         <-- C (command:rb)
>> SOH 00 FF foo.c NUL[123] CRC CRC        -->
>>                                         <-- ACK
>>                                         <-- C
>> SOH 01 FE Data[128] CRC CRC             -->
>>                                         <-- ACK
>> SOH 02 FC Data[128] CRC CRC             -->
>>                                         <-- ACK
>> SOH 03 FB Data[100] CPMEOF[28] CRC CRC  -->
>>                                         <-- ACK
>> EOT                                     -->
>>                                         <-- NAK
>> EOT                                     -->
>>                                         <-- ACK
>>                                         <-- C
>> SOH 00 FF NUL[128] CRC CRC              -->
>>                                         <-- ACK
>>
>>
>>
>> After first EOT u-boot send an ACK, not correct.
>> Same behavior using SOH or STX.
>>
> 
> "+ At the end of each file, the sending program shall send EOT up to ten
>          times until it receives an ACK character.  (This is part of the
>          XMODEM spec.)"
> 
> Why is u-boot not allowed to send an ACK ? I do not see this behavior on
> the protocol. Apart of that, which wrong behavior do you see on your
> target ? Can you transfer a file to your board ?
> 
> I have tested, no issue found:
> 
> loady
> ## Ready for binary (ymodem) download to 0x90800000 at 115200 bps...
> 
> C## Total Size      = 0x0003c418 = 246808 Bytes
> 
> Best regards,
> Stefano Babic
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-09 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-09 10:40 [U-Boot] y-modem protocol issue Angelo Dureghello
2011-08-09 12:03 ` Stefano Babic
2011-08-09 12:55   ` Angelo Dureghello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.