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

UdpServer_Echo sample code: doesn't sent string #1774

Closed
CFornari opened this issue Jul 22, 2019 · 6 comments · Fixed by #1775
Closed

UdpServer_Echo sample code: doesn't sent string #1774

CFornari opened this issue Jul 22, 2019 · 6 comments · Fixed by #1775

Comments

@CFornari
Copy link

CFornari commented Jul 22, 2019

When I execute the "UdpServer_Echo" example, I can successfully receive the packages that are coming from my computer and they are printed at the serial terminal.

Although the function udp.sendStringTo() returns true, no package is received in my computer.

I used netcat, tcpdump, wireshark and a custom software I made, none of those reported any udp package activity in the port I specified.

Can someone reproduce the behavior?

I'm using the develop branch.
commit number: 414bf05

@slaff
Copy link
Contributor

slaff commented Jul 22, 2019

@Oshio09 please, check PR #1775.

@CFornari
Copy link
Author

CFornari commented Jul 22, 2019

@slaff yes its working.
But when using the makefile in the "UdpServer_Echo" folder, what its been compiled is the blink example. This also happens with the original commit (414bf05).
I copied the application.cpp to a folder with the Makefile and component.mk files copied from the blink example for it to work.
Can you confirm if this is a problem or a mistake that I'm making?

@slaff
Copy link
Contributor

slaff commented Jul 22, 2019

Can you confirm if this is a problem or a mistake that I'm making?

I haven't experienced such an issue. I usually compile examples by typing:

cd $SMING_HOME/../samples/UdpServer_Echo
make

And all is good. For this issue I actually used the Host emulator to test it on my local system. And I did this to make it run locally (on the Host)

# To setup the virtual network I use
$SMING_HOME/Arch/Host/Tools/setup-network-linux.sh wlan0 
# Then compile as usual
cd $SMING_HOME/../samples/UdpServer_Echo
# with SMING_ARCH=Host
make SMING_ARCH=Host
# and then test it using
make run

@CFornari
Copy link
Author

@slaff I followed your steps and everything works perfectly. Thank you for your assistance.
I didn't knew about the Host functionality, I believe it will be worth some mention to this feature at the Readme.md for newbies like me to discover about this in a easier way.

@slaff
Copy link
Contributor

slaff commented Jul 22, 2019

@Oshio09 Check our documentation: https://sming.readthedocs.io/en/latest/

@CFornari
Copy link
Author

Thanks, amazing work!

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.

2 participants