Skip to content

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

Merged
merged 21 commits into from
Apr 10, 2018
Merged

Technology/Connectivity refactoring #470

merged 21 commits into from
Apr 10, 2018

Conversation

SeppoTakalo
Copy link
Contributor

@SeppoTakalo SeppoTakalo commented Mar 26, 2018

DONE

  • New Reference/Technology/Connectivity section that gathers all, not just IP based, connectivity options.
  • LoRa will move under Reference/Technology/Connectivity/Lora
  • LoRa API will stay under Reference/API
  • Network 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/Mesh

To be done in another PR

  • New page about Mesh configuration under Reference/Configuration/Mesh
  • Add more text to networking configuration section. Currently it is just a big blob about fields without any textual description of effects.

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.

@0Grit
Copy link

0Grit commented Mar 26, 2018

Sounds like a good start.
Really like that IP Networking gets a dedicated section.
Not enough people realize how important the distinction between IP and non-IP connectivity is.

@SeppoTakalo
Copy link
Contributor Author

@mikaleppanen @kjbracey-arm @AnttiKauppila @AriParkkila
Please review from technical point of view.

@SeppoTakalo SeppoTakalo changed the title WIP: Early review of Technology/Connectivity refactoring Review of Technology/Connectivity refactoring Mar 27, 2018
@SeppoTakalo SeppoTakalo changed the title Review of Technology/Connectivity refactoring Technology/Connectivity refactoring Mar 27, 2018
@SeppoTakalo
Copy link
Contributor Author

@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.

@AnotherButler
Copy link
Contributor

@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.

@AnotherButler
Copy link
Contributor

@MarceloSalazar @GarySwansonARM Y'all might be interested in this PR.

@MarceloSalazar
Copy link
Contributor

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|

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.

Copy link
Contributor Author

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.

@SeppoTakalo
Copy link
Contributor Author

@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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.
Copy link
Contributor

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"

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

;)

@SeppoTakalo
Copy link
Contributor Author

Fixed typo in .json and rebased

@SeppoTakalo
Copy link
Contributor Author

@AnotherButler Images are now replaced with links to s3-us-west-2.amazonaws.com
When can we expect to see those images there?

How can anyone review if all the pictures and diagrams are gone. Should we wait until merge before converting links.

Copy link
Contributor

@AnotherButler AnotherButler left a 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"
Copy link
Contributor

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": [{
Copy link
Contributor

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?

Copy link
Contributor Author

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": {
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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.
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the todos.

Copy link
Contributor Author

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?

@AnotherButler
Copy link
Contributor

We'll upload the images to AWS, and then you'll be able to see all of them properly.

@AriParkkila
Copy link

Could this link to docs/reference/technology/connectivity/cellular.md introduced in PR #489

@SeppoTakalo
Copy link
Contributor Author

@AriParkkila I'll add the links once that PR is in.

@AnotherButler
Copy link
Contributor

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?

@SeppoTakalo
Copy link
Contributor Author

Yes!
I can have internal review meeting here, as this is related to #489 and we need to make these two changes match.

@AnotherButler AnotherButler merged commit db3eb69 into ARMmbed:new_engine Apr 10, 2018
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 this pull request may close these issues.

8 participants