Skip to content

Adjust Thread interface connect timeout #4333

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 1 commit into from
May 26, 2017

Conversation

artokin
Copy link
Contributor

@artokin artokin commented May 17, 2017

Description

Thread device needs to wait for connectivity:

  • routers will create new network and get local connectivity
  • end device will get connectivity once attached to existing network
  • devices without network settings gets connectivity once commissioned and attached to network

This PR removes connection timeout from Thread interface connect method. Then end devices and devices without network configuration settings will try connection for ever. This change does not affect to routers as they will get local connectivity.

Status

READY

Migrations

If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.

NO

Related PRs

Todos

  • Tests
  • Documentation

Steps to test or reproduce

  • Set flag thread-use-static-link-config to false to get uncommissioned device
  • Once device is started the ThreadInterface connect method does not return until device is commissioned and attached to the Thread network

@artokin
Copy link
Contributor Author

artokin commented May 17, 2017

@mikter , @SeppoTakalo , @karsev , @terhei would you also please check?

#else
// static link configuration is not used, wait for commissioning to happen
int32_t count = connect_semaphore.wait(osWaitForever);
#endif
Copy link

Choose a reason for hiding this comment

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

@SeppoTakalo @kjbracey-arm I have issue with the way interface is working differently now.

Thread is meant to be fire and forget. it will get the internet after weeks or by attaching to existing network in couple seconds or forming own network.

when End devices don't find parent they will not get the network in 30 seconds, but will get when some router becomes available --> should wait forever

Should we have method to identify when we have local connectivity or global connectivity.
And this should delay only to the point when we have configuration and stack is initialised correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A new PR will be be created to solve connectivity issue. In a meanwhile agreed with @SeppoTakalo and @mikter that Thread should wait for connectivity for ever in all cases.

Thread device needs to wait for connectivity:
-routers will create new network and get local connectivity
-end device will get connectivity once attached to existing network
-devices without network settings gets connectivity once
 commissioned and attached to network
@artokin artokin force-pushed the thread_interface_timeout branch from 5c0ffd9 to 28a6fa1 Compare May 17, 2017 09:48
@adbridge
Copy link
Contributor

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 301

All builds and test passed!

@TuomoHautamaki
Copy link

@adbridge this would be needed into mbed OS 5.5. Can you tag to the release. Thanks

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

Successfully merging this pull request may close these issues.

8 participants