Mistake on this page? Email us

Provisioning development devices

Device Management offers a developer mode to speed up the development process. The mode relies on a developer certificate, which you add to your software binary to allow test devices to connect to your Device Management account.

You can use the same certificate on up to 100 devices. To test additional devices, generate a second certificate by repeating the process detailed below. You can use up to 10 developer certificates at a time.

Note: The credentials of all test devices in a single account are identical. In production, you provision unique credentials to each device. For information about the production provisioning process, please see the Factory Provisioning documentation site.

Creating and downloading a developer certificate

To use FCC in developer mode, you need to get connection credentials from Device Management. To do this:

  1. Log in to Device Management Portal for your region with your developer account:

  2. Select Device identity > Certificates.

  3. Click New certificate > Create a developer certificate.

  4. Enter a certificate file name.

  5. Click Create certificate.

    Device Management creates a credentials C file called mbed_cloud_dev_credentials.c. This file contains the credentials you need to connect your device to Device Management.

  6. Select Device identity > Certificates again.

  7. Click your new certificate.

  8. Download the credentials file and add it to your build configuration.

Note: The downloaded developer certificate is confidential to your account. Store it securely in a place where unauthorized users cannot access or use it.

Adding the developer certificate to your application

To enable development mode in FCC and use the development certificate in your software image:

  1. Initialize FCC:

    #include "factory_configurator_client.h"
    #include "fcc_status.h"
    
    int main() {
    ...
    fcc_status_e fcc_status;
    
    fcc_status = fcc_init();
    if(fcc_status != FCC_STATUS_SUCCESS) {
        return 1;
        }
        ...
    }
    
  2. Enable development mode:

    ...
    fcc_status_e fcc_status;
    
    // Running developer flow
    fcc_status = fcc_developer_flow();
    if(fcc_status != FCC_STATUS_SUCCESS) {
        return 1;
        }
    ...
    }
    
  3. Verify the configuration:

    fcc_status = fcc_verify_device_configured_4mbed_cloud();
    if(fcc_status != FCC_STATUS_SUCCESS) {
        return 1;
        }
    
  4. Finalize FCC (which also finalizes the KCM module):

    fcc_status = fcc_finalize();
    if(fcc_status != FCC_STATUS_SUCCESS) {
        return 1;
        }
    ...
    }
    

For detailed instructions on adding FCC to your application, see the Factory Provisioning documentation site.