Skip to content

lwip esp-ping noisy serial output #9049

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

Closed
6 tasks done
SteveRMann opened this issue Dec 7, 2023 · 3 comments · Fixed by #9078
Closed
6 tasks done

lwip esp-ping noisy serial output #9049

SteveRMann opened this issue Dec 7, 2023 · 3 comments · Fixed by #9078

Comments

@SteveRMann
Copy link

SteveRMann commented Dec 7, 2023

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: All ESP, I have a library issue
  • Core Version: latest managed by Arduino IDE
  • Development Env: Arduino IDE
  • Operating System: Windows

Settings in IDE

  • Module: All ESP. The issue is in the core library
  • Flash Mode: qio
  • Flash Size: All ESP. The issue is in the core library
  • lwip Variant:
  • Reset Method:
  • Flash Frequency:
  • CPU Frequency:
  • Upload Using:
  • Upload Speed:

Problem Description

PLEASE make a quiet mode for the ping function.

I use ping to monitor the state of my local servers, but the debug output of ping clutters an already busy terminal screen.
PLEASE make a quiet mode that simply returns a Boolean true or false if the ping is successful or not.

I just want a simple response if the target is present or not:
if (Ping.ping(remote_ip) == 0){

I DO NOT want the library to print other unwanted data to my terminal:
"ping 5, timeout 0, total payload 160 bytes, 5098 ms"

If I want to see that, then it should be up to me, not the library.

@mcspr mcspr changed the title PLEASE make a quiet mode for the ping function lwip esp-ping noisy serial output Dec 7, 2023
@mcspr
Copy link
Collaborator

mcspr commented Dec 7, 2023

https://github.com/d-a-v/esp82xx-nonos-linklayer/blob/e4051dea44249d3d3b76e7772a3cf99d741b4506/glue-lwip/esp-ping.c#L252-L254 is the culprit. I'd guess it needs some kind of if PING_DEBUG around the printf

@ACE1046
Copy link

ACE1046 commented Dec 7, 2023

Assign sent_function in ping_option structure and messages will go away.

@d-a-v
Copy link
Collaborator

d-a-v commented Dec 8, 2023

@SteveRMann does the solution proposed by @ACE1046 suits you ?

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 a pull request may close this issue.

4 participants