From 28a6fa1819539d6736d6e4618e34683df45bf62b Mon Sep 17 00:00:00 2001 From: Arto Kinnunen Date: Wed, 17 May 2017 08:59:10 +0300 Subject: [PATCH] Adjust Thread interface connect timeout 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 --- .../mbed-mesh-api/source/ThreadInterface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/ThreadInterface.cpp b/features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/ThreadInterface.cpp index 5257837acc..350fb665cb 100644 --- a/features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/ThreadInterface.cpp +++ b/features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/ThreadInterface.cpp @@ -39,7 +39,11 @@ int ThreadInterface::connect() // Release mutex before blocking nanostack_unlock(); - int32_t count = connect_semaphore.wait(30000); + // In Thread wait connection for ever: + // -routers will create new network and get local connectivity + // -end devices will get connectivity once attached to existing network + // -devices without network settings gets connectivity once commissioned and attached to network + int32_t count = connect_semaphore.wait(osWaitForever); if (count <= 0) { return NSAPI_ERROR_DHCP_FAILURE; // sort of...