-
Notifications
You must be signed in to change notification settings - Fork 178
Technology/Connectivity refactoring #470
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
Conversation
Sounds like a good start. |
@mikaleppanen @kjbracey-arm @AnttiKauppila @AriParkkila |
@AnotherButler Please review. For the remaining work, I will be reworking another PR. This can be merged in as it is. Stuff here is targeting Mbed OS 5.9, so should not be merged for 5.8 branch. |
@SeppoTakalo I hope you don't mind, but I edited your initial comment with your most recent note, so I don't accidentally merge this into the live 5.8 docs. |
@MarceloSalazar @GarySwansonARM Y'all might be interested in this PR. |
As initial work looks great! I'd love to see this in a staging environment at some point in the future. |
|
||
|Stack|Network protocols supported|Use cases|Limitations| | ||
|-----|---------------------------|---------|-----------| | ||
|LwIP|IPv4, IPv6, PPP|Ethernet, WiFi, 2G/3G/4G Cellular|4 sockets, 1 interface, no routing| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 sockets is configuration option, so I think it is not a limitation. Application designer can choose to configure more sockets to lwip, with a cost of additional ram.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it can be configured. Many things can be, but to keep this page simple, I don't wan't to clutter it with extra information that will be presented later in the same book.
Technology section is before configuration section, so I don't want to refer it before it has been introduced.
@AnotherButler have you now reviewed this? When can we see it merged in and visible in the staging environment? I have follow up documents coming and I want to finish this first. Or should I keep appending this one? |
|
||
The application can use the `LoWPANNDInterface` or `ThreadInterface` object for connecting to the mesh network. When successfully connected, the application can use the Mbed C++ socket APIs to create a socket to start communication with a remote peer. | ||
|
||
Mbed OS provides `NanostackEthernetInterface` for Ethernet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still there to allow you to use any existing NanostackEthernetPhy
drivers, but not really needed in the EMAC world. You should be using EthernetInterface
to use EMAC drivers with Nanostack.
Maybe just drop the paragraph as it's nothing to do with mesh interfaces.
This does remind me that I should have at least actually stuck a "deprecated" on it. Main sticking point is that the K64F Nanostack driver still works a bit better than the EMAC one for cable detection logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll drop the reference as it is deprecated.
I did not actually touch this part at all, just moved it away from Socket page to its proper location.
On Mesh networks, Nanostack uses IEEE 802.15.4 radios for transmitting and receiving packets. | ||
The RF driver implements the `NanostackRfPhy` API. | ||
|
||
This driver type has not other usecases so it is implemented in C using Nanostack specific API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice set of diagrams above - feels a little incomplete to be missing the diagram for this one.
docs.json
Outdated
@@ -89,7 +89,19 @@ | |||
}, | |||
{ | |||
"title": "Technology", | |||
"intro": { | |||
"type": "markdown", | |||
"url": "https://github.com/ARMmbed/Handbook/blob/new_engine/docs/reference/technology/tecnology.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a typo in the link?
Should it be technology.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;)
Fixed typo in .json and rebased |
@AnotherButler Images are now replaced with links to How can anyone review if all the pictures and diagrams are gone. Should we wait until merge before converting links. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left some final comments for you to address before we look at this on the test site.
docs.json
Outdated
}, | ||
{ | ||
"type": "markdown", | ||
"url": "https://github.com/ARMmbed/Handbook/blob/new_engine/docs/reference/technology/USB.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove USB from the .json. It's not on master yet.
"intro": { | ||
"type": "markdown", | ||
"url": "https://github.com/ARMmbed/Handbook/blob/new_engine/docs/reference/api/connectivity/lorawan/lora.md" | ||
}, | ||
"sources": [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the user API should start with lorawanevents.md. Could we move this, so it stays with intro-to-lora.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LoRaWANInterface
is the API. It is the network interface that developers use.
Explanation of LoRa itself has moved to Technology/Connectivity/intro-to-lora.md
@@ -436,15 +464,7 @@ | |||
}, | |||
{ | |||
"title": "LoRaWAN", | |||
"intro": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we remove this section (or at least its formatting) from the .json, it will mess up the formatting of the documentation. It's OK to move the page, but we need to keep this formatting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can I fix the formatting?
Intro section itself has moved to Technology/Connectivity/intro-to-lora.md
@@ -1,3 +0,0 @@ | |||
## LoRa on Arm Mbed OS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. Did we delete this page or just rename it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete.
Intro is moved to Technology/Connectivity/Intro.
I'm not sure what should stay here. I'll consult Hasnain about that.
|
||
Currently, 6LoWPAN-ND (neighbor discovery) and Thread bootstrap modes are supported. | ||
|
||
##### Module configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section needs to move the configuration section of the reference book.
@@ -0,0 +1,45 @@ | |||
### Network connectivity in Mbed OS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm interested in seeing this page on the test site. I may want to tweak/change it after seeing it then.
|
||
The Socket API is the common API among all IP connectivity methods. All network stacks in Mbed OS provide the same Socket API, making applications portable among different connectivity methods or even stacks. | ||
|
||
In the OSI model, the Socket API relates to layer 4, the Transport layer. In Mbed OS, the Socket API supports both [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) and [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) protocols. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we link to our own TCP and UDP instead of Uncyclopedia?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe I should just remove the links.
This section is about technology in general, not the API itself, so I was trying to link to some neutral page that explains the technology for those who do not understand it.
Link to API section is two lines below
@@ -0,0 +1,93 @@ | |||
### IP networking | |||
|
|||
IP Networking in Mbed OS is layered in three clearly defined API levels. The diagram below shows the layers next to the closest matching [OSI model](https://en.wikipedia.org/wiki/OSI_model) layers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we please link somewhere more credible than Uncyclopedia?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More credible?
This is first hit in the Google if you search for OSI model. So it is the most linked one.
I'm not sure there are more stable sites that we can confidently link on, and still assume after couple of years that the link is still valid.
OSI Model is a theoretical model from academic text book. Defined by the ISO organization. Most computer science students recognize it. But because it is theoretical, there are not many sites that host proper textbook explanation about it, others that Uncyclopedia. If you can recommend me one, I can change the link.
Proper standard about it, is behind pay-wall https://ieeexplore.ieee.org/document/1094702/
|
||
In the OSI model, the Socket API relates to layer 4, the Transport layer. In Mbed OS, the Socket API supports both [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) and [UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) protocols. | ||
|
||
Refer to [TODO:Socket API](networksockets.md) reference for usage instructions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the todos.
- 6LoWPAN-ND mesh networking. | ||
- Thread mesh networking. | ||
|
||
Refer to [TODO: sockets/interface API reference](api/connectivity/networkinterface.md) for usage instructions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the todos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the address of the final link?
I have not understood the mechanism here.
If docs/reference/api/connectivity/networksocket/networksocket.md
becames /docs/development/reference/network-socket.html
then what will be the docs/reference/api/connectivity/networksocket/networkinterface.md
?
Is the link based on title of the page or file name?
We'll upload the images to AWS, and then you'll be able to see all of them properly. |
Could this link to docs/reference/technology/connectivity/cellular.md introduced in PR #489 |
@AriParkkila I'll add the links once that PR is in. |
Edit document for positioning, and add sentence for additional context.
Copy edit file, mostly for active voice, agreement, formatting and general phrasing.
Make minor copy edits.
Copy edit file for grammar and formatting.
I'm going to merge this, so we can all see what it looks like on the test site. We can create any further changes needed in a new PR. @SeppoTakalo @MarceloSalazar @GarySwansonARM @sg- Could y'all please review these pages on our internal test site? |
Yes! |
DONE
NewReference/Technology/Connectivity
section that gathers all, not just IP based, connectivity options.LoRa will move under Reference/Technology/Connectivity/LoraLoRa API will stay under Reference/APINetwork interfaces will have new page and move away from Socket API.Mesh tutorial will move to under Technology (partially already is)Mesh content from Socket page will move to Reference/API/MeshTo be done in another PR
CC: @AnotherButler Please comment, is this going to right direction?
Any other feedback?
NOTE: Most of the bullets from that list are not yet done. I just wanted to make visible of what I'm going to do, as the PR will eventually be way too big to review.
NOTE: ONLY MERGE INTO
new_engine
. DO NOT MERGE INTO 5.8.