SD Card for "Connect to Pelion Device Management in five steps"

In the following tutorial for connecting a MBED-based board to the Pelion IoT cloud (https://cloud.mbed.com/guides/connect/5?board=ST-Nucleo-F746ZG) I was able to follow and create an API key, certificate, to compile and flash the demo program to my ST Nucleo F746ZG board. I connected to ethernet, rebooted, but the device is not being seen in my Device Management console.

The issue, I am fairly certain, is that I do not have an SD card. The tutorial says virtually nothing about it, and presumes that the user already has one. It appears that the card is mandatory, so I feel this is a major hole in the tutorial. So, 1. Where do I get the board that is shown in the tutorial? 2. Any specs required for such an SD card (e.g. micro-SD, and what size)? 3. Is there another way to get my Nucleo board connected to the Pelion Device Management cloud, without the SD card? I don’t want to wait for one to come in the mail.

I appreciate any help–I am very excited and hopeful to have a web-connected device very soon. Thanks!

1 Like

Hi David,

Yes, you need some form of external storage to store the credentials and firmware update fragments. Some boards have built-in QSPI Flash, but for others you can use an SD card. Inspecting the logs on the device should show this (through a serial monitor on baud rate 115,200).

A quick way around is, is to use a HeapBlockDevice. You can replace the declaration here: mbed-cloud-client-example/mcc_common_setup.cpp at master · PelionIoT/mbed-cloud-client-example · GitHub. HeapBlockDevice will use the heap, instead of SD card. Note that you’ll get a new device identity every time you reset the board and cannot use firmware updates this way, but at least it’ll connect.

Given that the NUCLEO board does not have an SD card I’d think you need to hook up an SD card shield… Which is quite unfortunate. You can then replace the declaration above with something like:

BlockDevice* arm_uc_blockdevice = new SDBlockDevice(/* pins */);
1 Like

Jan,

Thanks for the support! So I have bought the SD card reader shown in the tutorial, which is arriving tomorrow. Do you still think I will need replace the declaration with code similar to what you provided above? I ask because I can’t find the file “mcc_common_setup.cpp” that you linked to in any of my project’s directories (The demo program is named “example-Ethernet-mbed-Cloud-connect”). Whatever the case, I’ll try the code unmodified and see if it can access the card reader. It appears everything else is working:

Starting Simple Mbed Cloud Client example
Connecting to the network using Ethernet...
Connected to the network successfully. IP address: 168.200.176.135
[Simple Cloud Client] Autoformatting the storage.
[Simple Cloud Client] Autoformatting failed with error -5
Initializing Mbed Cloud Client failed (1)

Excited to try it out tomorrow night + whatever you might recommend. Until then, fingers crossed!

Can we use onboard QSPI instead of SD card ??

  1. in mbed_app.json what changes we need to make ?
  2. is any library is required ?
  3. How to force mbed cloud client code to store data on onboard QSPI (instead of SD card).
  4. can you please add the places to be modified.

Did you use it on an SD card?

What is the part number of the SD card reader shown in the tutorial ?

SD card details can be found here - Components | Mbed

Latest Client release 2.2.1 supports also internal flash usage via Mbed OS KVStore, so the SD-card requirement can be relaxed for the boards that have enough space for bootloader, os+app and space for firmware download. Typically at least 1 MB is needed, but mileage may vary (depending on the network driver size etc., they vary from tens of kilos to 1.3 megabytes).