Mistake on this page? Email us

Quick start with prebuilt Linux microPlatform (LmP) images

This guide shows you how to get started with Pelion Edge and Linux microPlatform (LmP) using prebuilt images. LmP is a Yocto-built distribution maintained by Foundries.io. At the end of this tutorial, you will have downloaded and flashed an LmP image and provisioned and run Pelion Edge.

You can use this guide to try Pelion Edge on one of these boards:

Note: The prebuilt images are intended only for development or testing purposes; they aren't for production use. To build production images, please follow the build instructions and factory provisioning process.

Download the image

Flash the image

Flash console-image-lmp-<MACHINE_NAME>.rootfs.wic.gz to an SD card:

  • macOS:

    1. Be sure to verify your device's path. This example assumes the SD card is enumerated as /dev/diskX.

    2. Make sure the SD card drive and its partitions, if any, are unmounted. To unmount all partitions, run the following command:

      ls /dev/diskX?* | xargs -n1 diskutil umount
      
    3. Use dd:

      gunzip -c console-image-lmp-<MACHINE_NAME>.rootfs.wic.gz | sudo dd bs=4m of=/dev/diskX conv=sync
      

      Alternatively, you can use the Etcher app, which can result in significant time savings over using dd:

      1. Choose the file to flash.
      2. Choose the destination SD card.
      3. Click Flash.
  • Linux:

    1. Make sure the SD card drive and its partitions, if any, are unmounted. You can use lsblk to find the name of your SD card block device. To unmount all partitions, run:

      ls /dev/mmcblkX?* | xargs -n1 umount -l
      
    2. Use dd:

      gunzip -c console-image-lmp-<MACHINE_NAME>.rootfs.wic.gz | sudo dd bs=4M of=/dev/mmcblkX conv=fsync status=progress iflag=fullblock oflag=direct
      

Provision and run Pelion Edge

After preparing the SD card, you are ready to run Pelion Edge:

  1. Insert the prepared SD card.

  2. Power on the device.

  3. Use the serial connection of your board to communicate with the device. Please consult the user's guide of your board on how to do this.

  4. Modify the login credentials:

    The default login user for the system is fio. The default password is set to fio. The user has sudo-permissions. To modify the default password, use the passwd command after login.

  5. Create and download a developer certificate to allow the edge gateway to connect to your Pelion account:

    1. Go to Pelion Device Management Portal for your region:

    2. Go to Device Identity > Certificates.

    3. Create a developer certificate.

    4. Download the certificate mbed_cloud_dev_credentials.c

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

  6. Create the corresponding update_default_resources.c file to apply firmware updates to the gateway device:

    manifest-dev-tool init
    

    For more information, please refer to the manifest tool README.

  7. Secure copy the above file to the gateway, and place it at /userdata/mbed/.

    scp mbed_cloud_dev_credentials.c update_default_resources.c [email protected]<gw-ip-address>:~/
    ssh [email protected]<gw-ip-address>
    sudo mv *.c /userdata/mbed/
    

    The gateway is now connected to Pelion Device Management.

  8. Run sudo info on the gateway to validate the connection and find the Device ID.

You can view and access your gateway through the Pelion Device Management Portal.