[PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet

Pali Rohár pali at kernel.org
Mon Sep 13 13:08:06 CEST 2021


On Monday 13 September 2021 12:42:42 Wolfgang Denk wrote:
> Dear Pali Rohár,
> 
> In message <20210910204653.3066-1-pali at kernel.org> you wrote:
> > Now when command loady can be aborted / cancelled by CTRL+C, change wait
> > timeout for initial packet to infinite. This would allow user to not be
> > hurry when locating file which want to send. Commands loadb and loads
> > already waits infinitely too.
> 
> I'm not sure if this is a good idea.
> 
> If you use loady in any kind of scripts, this would now hard hang
> the system, while until now it was possible to recover from the
> error.

Yes, this is a good point. But on the other hand, 'loadb' and 'loads'
commands already have this behavior. So question is if it is better to
have same behavior in all 'load?' commands or each 'load?' would behave
differently... Because for software which transmit files and supports
more protocols (e.g. both x-modem and kermit) it may be a nightmare if
receiver behaves differently...

> This is a change to the user interface that is not really necessary,
> so I recommend NOT to change the behaviour here, especially as it
> does not hurt.

Well... there is an issue if you do not start file transfer in the
timeout which current 'loady' command expects.

If you do not have integrated y-modem support in your terminal you have
to do:

1) open terminal and write 'loady' into U-Boot console
2) disconnect terminal
3) start y-modem software
4) choose file to transmit
5) instruct y-modem software to start transfer

And if 'loady' timeouts between 2) - 5) then it returns back to the
U-Boot console. So y-modem software in step 5) starts interaction with
U-Boot console instead of 'loady' and try to interpret U-Boot prompt as
y-modem sequence... which is detected as garbage and y-modem software
would either wait or try retransmit... which sends some garbage to
U-Boot console and something may be executed.

'loadb' commands does not have this issue as it waits either for CTRL+C
or for successful kermit transfer.


So... I do not know what is better if current behavior or this new which
changes UI interaction.

> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> "I've finally learned what `upward compatible' means. It means we get
> to keep all our old mistakes." - Dennie van Tassel


More information about the U-Boot mailing list