Activation
DMS activation operations. More...
Enumerations |
|
enum |
gos_dms_provision_status_t
{
GOS_PROVISION_STATUS_INCOMPLETE_AND_NO_TOKEN = 0, GOS_PROVISION_STATUS_INCOMPLETE_AND_HAVE_TOKEN = 1, GOS_PROVISION_STATUS_COMPLETE_BUT_NO_ACK = 2, GOS_PROVISION_STATUS_COMPLETE = 3 } |
Device's DMS provisioning status.
More...
|
|
Functions |
|
gos_result_t | gos_dms_activate (const char *product_code, gos_msgpack_object_t **response_ptr) |
Activate this device with the specified product.
More...
|
|
gos_result_t | gos_dms_provision (const char *provisioning_token) |
Provision device in DMS.
More...
|
|
gos_dms_provision_status_t | gos_dms_get_provision_status (void) |
Get the device's current provisioning status.
More...
|
|
Detailed Description
DMS activation operations.
Enumeration Type Documentation
◆ gos_dms_provision_status_t
Device's DMS provisioning status.
Function Documentation
◆ gos_dms_activate()
gos_result_t gos_dms_activate | ( | const char * |
product_code,
|
gos_msgpack_object_t ** |
response_ptr
|
||
) |
Activate this device with the specified product.
Once activated, device updates with get this product's firmware.
Before the device can activate to a product it needs to be 'claimed' with a user who has access to the product.
See the Gecko OS command documentation for more information: dms_activate
- Note
-
The
response_ptr
argument, a gos_msgpack_object_t , is optional and will contain the parsed response from the server.
- Parameters
-
[in] product_code
Product's code in DMS [out] response_ptr
gos_msgpack_object_t pointer to parsed response from server, leave NULL if unused
- Returns
- Result of API, see gos_result_t
◆ gos_dms_get_provision_status()
gos_dms_provision_status_t gos_dms_get_provision_status | ( | void |
|
) |
Get the device's current provisioning status.
This returns the device's current provisioning status. See gos_dms_provision_status_t for more details.
- Returns
- gos_dms_provision_status_t The device's current provisioning status
◆ gos_dms_provision()
gos_result_t gos_dms_provision | ( | const char * |
provisioning_token
|
) |
Provision device in DMS.
If necessary, this API provisions the device in the DMS. After the device is provisioned, it is able to access the DMS.
When called, this API does the following:
-
If the
provisioning_token
argument is specified and if the device is NOT provisioned (i.e. the device's gos_dms_provision_status_t is GOS_PROVISION_STATUS_INCOMPLETE_AND_NO_TOKEN or GOS_PROVISION_STATUS_INCOMPLETE_AND_HAVE_TOKEN ) then the device's provisioning token is written/updated (if necessary). - If the device is NOT provisioned, it attempts to provision itself with the DMS. If successful, the device's DMS credentials received from the DMS are stored to NVM.
- If necessary, the device issues an acknowledgment to the DMS indicating that the device is fully provisioned.
- Note
- Once the device is fully provisioned, i.e. gos_dms_get_provision_status() returns GOS_PROVISION_STATUS_COMPLETE , this API will not modify the system any further. Thus, this API may be safely called multiple times.
- Parameters
-
[in] provisioning_token
The device provisioning token, leave NULL if the token was previously set
- Returns
- Result of API, see gos_result_t