Mistake on this page? Email us

Provisioning development devices

During development, you don't need to go through the full factory process (with your factory tool and factory configurator utility) every time you want to test a device or a software version.

Device Management offers a developer mode to speed up the development process. The mode relies on a developer certificate that you can add to your software binary. The developer certificate allows your test device to connect to your Device Management account.

You can use the same certificate on up to 100 devices. If you need more test devices, you will need to generate a second certificate by repeating the process detailed below.

Note: In production, the security level needed is higher than offered on developer mode. For example, the credentials for all test devices on a single account will be identical. To learn how to provide production credentials, please see the full provisioning documentation.

If you are using Client Lite, see Production process for Device Management Lite.

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 with your developer account.
  2. Go to Device identity > Certificates.
  3. Click New certificate.
  4. Click Create a developer certificate.
  5. Enter a certificate file name.
  6. Click Create certificate.
  7. A credentials C file called mbed_cloud_dev_credentials.c is created. It contains the credentials you need to connect your device to Device Management.
  8. Go to Device identity > Certificates again.
  9. Click on your new certificate.
  10. Download the credentials file and add it to your build configuration.

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

Adding the developer certificate to your application

Note: If you are using Mbed Linux OS, you do not need to manually perform these steps.

The developer certificate is part of the FCC module. The following steps 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 Using FCC and KCM in your application.