Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxatac-core-image-base: add lrzsz for x/y/zmodem support #132

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

a3f
Copy link
Member

@a3f a3f commented Apr 3, 2024

Xmodem is cumbersome enough as it is without having to forward it over TCP to remote hosts, which may not always work.

Therefore, include support for the lrzsz suite of tools, so users can ssh to the lxatac and run them locally if needed.

This has been tested by copying the resulting lsz binary to the lxatac and running

lsz -X -vv </dev/ttyUSB2 >/dev/ttyUSB2 fw_payload.bin.out

@jluebbe
Copy link
Member

jluebbe commented Apr 3, 2024

This can be done without issues in parallel with the shell being exported and used by ser2net.

Do you mean a exported port or even with a connected client?

@a3f
Copy link
Member Author

a3f commented Apr 3, 2024

Do you mean a exported port or even with a connected client?

I had a connected client (microcom) and I had no problems using it to enable Xmodem on the DUT while above lsz command was waiting for the Xmodem transfer to start.

@jluebbe
Copy link
Member

jluebbe commented Apr 3, 2024

How would that work? As far as I know each received byte is only read by one waiting process, in a non-deterministic way.

@jluebbe jluebbe closed this Apr 3, 2024
@jluebbe jluebbe reopened this Apr 3, 2024
Xmodem is cumbersome enough as it is without having to forward it over
TCP to remote hosts, which may not always work.

Therefore, include support for the lrzsz suite of tools, so users can
ssh to the lxatac and run them locally if needed.

This has been tested by copying the resulting lsz binary to the
lxatac and running

  lsz -X -vv </dev/ttyUSB2 >/dev/ttyUSB2 fw_payload.bin.out

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
@a3f
Copy link
Member Author

a3f commented Apr 3, 2024

Ah, right. Somehow, the latest process opening the TTY port always wins for me, so my Xmodem works fine.
I can reproduce the same with cat /dev/ttyUSB2: If I input characters on the ser2net console, I get the echo back only from cat.

I removed the claim that this works without issues with ser2net running alongside. Ok to merge now?

@jluebbe
Copy link
Member

jluebbe commented Apr 4, 2024

Thanks for investigating the details!

@hnez hnez merged commit 7bdefc2 into linux-automation:nanbield Apr 4, 2024
2 checks passed
@a3f a3f deleted the xmodem branch April 4, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants