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

sys/stdio_udp: add stdio over UDP #19081

Merged
merged 2 commits into from
Jan 13, 2023
Merged

sys/stdio_udp: add stdio over UDP #19081

merged 2 commits into from
Jan 13, 2023

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Jan 2, 2023

Contribution description

stdio_telnet can sometimes be slow and also a bit heavy when TCP is otherwise not used.
When doing remote debugging, a lost packet isn't usually so bad, so we don't need the reliability we get from telnet.

This adds a stdio via UDP module that can be used with nc or socat:

Testing procedure

Enable the module in e.g. gnrc_networking:

USEMODULE += stdio_udp

You will not see any output unless you connect to the instance from a 2nd terminal:

$ nc -u fe80::7837:fcff:fe7d:1aaf%tapbr0 2323
help
Command              Description
---------------------------------------
ifconfig             Configure network interfaces
nib                  Configure neighbor information base
ping                 Ping via ICMPv6
pm                   interact with layered PM subsystem
ps                   Prints information about running threads.
reboot               Reboot the node
rpl                  rpl configuration tool ('rpl help' for more information)
udp                  send data over UDP and listen on UDP ports
version              Prints current RIOT_VERSION
> 

Issues/PRs references

@github-actions github-actions bot added Area: build system Area: Build system Area: sys Area: System labels Jan 2, 2023
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Two comments inline.

sys/stdio_udp/stdio_udp.c Outdated Show resolved Hide resolved
sys/stdio_udp/stdio_udp.c Outdated Show resolved Hide resolved
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: drivers Area: Device drivers Area: network Area: Networking Area: pkg Area: External package ports Area: USB Area: Universal Serial Bus Platform: ESP Platform: This PR/issue effects ESP-based platforms Platform: native Platform: This PR/issue effects the native platform labels Jan 13, 2023
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 13, 2023
@riot-ci
Copy link

riot-ci commented Jan 13, 2023

Murdock results

✔️ PASSED

81625fd doc: sort all stdio implementations into sys_stdio group

Success Failures Total Runtime
6769 0 6770 14m:08s

Artifacts

Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few nitpicks that I would be extremely happy if you could address them.

To avoid another round-trip, I already add an ACK.

sys/stdio_udp/stdio_udp.c Outdated Show resolved Hide resolved
sys/stdio_udp/stdio_udp.c Show resolved Hide resolved
cpu/native/include/native_internal.h Outdated Show resolved Hide resolved
pkg/tinyusb/doc.txt Show resolved Hide resolved
sys/include/stdio_nimble.h Show resolved Hide resolved
sys/include/stdio_rtt.h Show resolved Hide resolved
sys/include/stdio_uart.h Show resolved Hide resolved
@chrysn
Copy link
Member

chrysn commented Jan 13, 2023

The telnet module checks for I_UNDERSTAND_THAT_TELNET_IS_INSECURE being set, I'd welcome if that flag were checked here as well.

@maribu
Copy link
Member

maribu commented Jan 13, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 13, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors
Copy link
Contributor

bors bot commented Jan 13, 2023

👎 Rejected by PR status

@benpicco
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 13, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@benpicco benpicco removed the Platform: ESP Platform: This PR/issue effects ESP-based platforms label Jan 13, 2023
@benpicco
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 13, 2023

Already running a review

@bors
Copy link
Contributor

bors bot commented Jan 13, 2023

Build succeeded:

@bors bors bot merged commit fb603f2 into RIOT-OS:master Jan 13, 2023
@benpicco benpicco deleted the stdio_udp branch January 13, 2023 17:12
@jia200x jia200x added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: drivers Area: Device drivers Area: network Area: Networking Area: pkg Area: External package ports Area: sys Area: System Area: USB Area: Universal Serial Bus CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: native Platform: This PR/issue effects the native platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants