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

Write better documentation for UDP handling #1701

Closed
marcelstoer opened this issue Jan 3, 2017 · 8 comments
Closed

Write better documentation for UDP handling #1701

marcelstoer opened this issue Jan 3, 2017 · 8 comments
Milestone

Comments

@marcelstoer
Copy link
Member

Explain the main ideas in the "net.udpsocket Module" chapter right before the documentation of the individual functions.
Furthermore, the sentence "received callback have port and ip after data argument." isn't correctly formatted (bold?).

@marcelstoer
Copy link
Member Author

@djphoenix I added a few notes, pls see http://nodemcu.readthedocs.io/en/latest/en/modules/net/#netudpsocket-module

I would appreciate if you could add a standalone example, maybe below the net.udpsocket:send() documentation? That one is really terse.

@marcelstoer
Copy link
Member Author

Furthermore, net.udpsocket:send() is lacking important parameter documentation. I figured it out through some trial and error.

I kindly ask someone who knows that stuff to now also review 0ca4b6b and then close this issue if all is well.

This and #1771 are the last pending issues for the next release.

@djphoenix
Copy link
Contributor

@marcelstoer good work!

@eyaleb
Copy link

eyaleb commented Feb 2, 2017

re #343.

Now that we use SDK 2.0.0 in dev, is there a reliable way to send a UDP packet and then dsleep after it is sent (send queue is empty, naturally with UDP there is no concept of the packet delivered)?

I am still unhappy about the hack I use, which may not work if a longer delay is needed due to other SDK (or other) changes in the future.

@djphoenix
Copy link
Contributor

There is no callback for actual UDP send (that means that packet was passed to radiomodule and this have passed it on air).

@eyaleb
Copy link

eyaleb commented Feb 2, 2017

@djphoenix and I guess no way to check the status of the radio send buffer (is empty)?

@djphoenix
Copy link
Contributor

@eyaleb unfortunately, no way.

@pjsg
Copy link
Member

pjsg commented Feb 2, 2017

Also, note that since 802.11 is an acknowledged protocol, there can be a significant time delay before the frame gets acknowledged.

I took a quick look, and I couldn't find an upper bound for the time that the MAC might take to send a data frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants