Add set credentials usb request #2763
Open
+98
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The existing
JoinNewNetworkRequest
protobuf message has some behavior that might be undesireable in some circumstances.Solution
For use cases like a factory environment where the end wifi network is not present, it is desired to set credentials without attempting to immediately power on wifi and connect. The
SetNetworkCredentialsRequest
will simply store the credentials to the devices internal list of wifi credentials.Some items to note:
Steps to Test
I used
particle-usb
with the protobuf module updated to the branch hereInstall / build the definitions as in the example.
I added the following snippet to
particle-usb.js
to test the device OS parsing/handling of the new requestTest with
node particle-usb.js
Example App
The
connection-manager
app has some helpful commands to list/clear wifi APs to validate testing. Seea
andl
commands.Relevant PRs
particle-iot/device-os-protobuf#31