Troubleshooting the tutorials
Problem: Linux deployment fails
Yocto deployment for Linux build is failing with:
[mbed] ERROR: Unable to clone repository (ssh: ....)
Solution
Releases before Client 3.2.0 and Edge 0.10.0 used git protocol based metalayer references. This works only, if your environment is properly authenticated to GitHub.
You can try this out by doing a manual git clone operation using the same git protocol, for example:
git clone [email protected]:ARMmbed/mbed-cloud-client.git
If this command fails, you know your authentication to GitHub is not correct.
As an alternative, you can change the metalayers to use HTTPS protocol instead. It does not require authentication (for public repositories).
Note: This also applies to Device Management Edge.
Problem: How do I enable debug logs?
Please see Error handling and debugging for details.
Problem: Client application errors in developer mode
When using the client application in developer mode, you may see one of these errors in your console:
Device not configured for Device Management - exit
Or
fcc_init() failed with Error 12!
Solution
Your SD card is corrupted. Use your computer to format the SD card with the FAT32 filesystem. If the error persists, you may have to use a new SD card.
Problem: Device Management Client (or Edge) seems to hang
The application seems to hang in Linux. It does not print out anything or connect, and just freezes. An example log looks like:
[INFO][fcc ]: key_config_manager.c:159:kcm_item_store:===> item name = mbed.UseBootstrap len=17, data size=4
[INFO][fcc ]: key_config_manager.c:101:kcm_init:===>
[DBG ][fcc ]: storage.c:72:storage_init:===>
[INFO][esfs]: esfs_init - enter
[DBG ][fcc ]: storage.c:77:storage_init:<===
[INFO][fcc ]: key_config_manager.c:118:kcm_init:<===
[DBG ][fcc ]: key_config_manager.c:42:kcm_create_complete_name:===> name len=17
[DBG ][fcc ]: key_config_manager.c:65:kcm_create_complete_name:<=== kcm_buffer_size_allocated_out= 26
[DBG ][fcc ]: storage.c:258:storage_file_create:===> file_name_length=26
[INFO][esfs]: esfs_create - enter
Solution
Wait patiently; entropy collection on a freshly booted system can take up to 20 minutes. Alternatively, you can install and configure rng-tools
to make the entropy collection faster.
Explanation:
The application is blocked while waiting for the entropy to be collected. The random reading from /dev/random
or /dev/hwrng
is a blocking call, and the reading will not take place until sufficient entropy is collected.
Note: This also applies to Device Management Edge.
Problem: ARM C 5.06 compiler fails to work in Linux (Internal fault:)
Starting the compilation with mbed compile -t ARMC5
just fails with:
Internal fault: [0x87ecef:5060750]
Solution:
Install the required libraries:
sudo apt-get install libc6:i386 libc6-i386
Explanation:
ARM C 5.06 compiler has some dependencies, that are not installed automatically when you install the compiler.
Problem: Device registers but is not visible in Portal
When you delete a device (in Portal or using API) that has registered with a valid developer certificate, it will no longer show in the devices list in Portal. However, the device can still connect to the LwM2M server and you can manage it using REST APIs.
This happens only to devices created with a developer certificate. You cannot delete devices that user production certificates.
Solution:
You need to force the device to bootstrap, so that the device gets a new identity. You can either restore the factory settings, which clears out the storage, or reflash the device.
This will make the device appear again in the devices list.
Problem: Client fails to compile with error: 'APPLICATION_ADDR' undeclared (first use in this function)
This error typically indicates a missing bootloader file. If mbed cli
toolchain does not find the bootloader file, it automatically converts to non-bootloader mode for compilation, and APPLICATION_ADDR
is not defined. This is reported in Mbed OS issue #11098.
Solution:
Ensure you have a valid bootloader binary in the location defined in your mbed_app.json
target configuration.
Note: The configuration uses a relative path and must target the file location correctly. Due to this, mbed compile --app-config my-configs/my-config.json
has a different relative base level than mbed compile --app-config my-config.json