Difference between revisions of "Mbed/ArmMbed"

From ESS-WIKI
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
Line 35: Line 35:
 
=== <font color="#0070c0">Frequently Asked Questions</font> ===
 
=== <font color="#0070c0">Frequently Asked Questions</font> ===
  
'''[Cannot connect to Mbed]'''
+
==== <font color="#0070c0">Cannot connect to Mbed</font> ====
  
 
If Mbed client cannot connect to Mbed Cloud, you can check the syslog with the patterns below.
 
If Mbed client cannot connect to Mbed Cloud, you can check the syslog with the patterns below.
Line 94: Line 94:
 
   nameserver 8.8.4.4
 
   nameserver 8.8.4.4
  
3. No CA certificate for enrolled devices
+
'''3. No CA certificate for enrolled devices'''
 +
 
 +
[INFO][mClt]: M2MNsdlInterface::received_from_server_callback - bootstrap message
 +
[ERR ][mClt]: M2MNsdlInterface::handle_bootstrap_error(internal-server-error)
 +
[ERR ][mClt]: M2MInterfaceImpl::bootstrap_error(internal-server-error)
 +
[ERR ][mClt]: ConnectorClient::error() - error: 2
 +
[ERR ][mClt]: ServiceClient::connector_error() error 2
 +
[ERR ][mClt]: ServiceClient::state_failure()
 +
[INFO][mClt]: MbedCloudClient::complete status (-1)
 +
[ERR ][mClt]: MbedCloudClient::error code (2)
 +
[ERR ][edgecc]: Error occured&nbsp;: MbedCloudClient::ConnectBootstrapFailed
 +
[ERR ][edgecc]: Error code&nbsp;: 2
 +
[ERR ][edgecc]: '''<font color="#FF0000">Error details&nbsp;: internal-server-error</font>'''
 +
[ERR ][mClt]: ServiceClient::state_failure()
 +
[INFO][mClt]: MbedCloudClient::complete status (-1)
 +
[INFO][mClt]: M2MInterfaceImpl::bootstrap_error - reconnecting in 7(s)
 +
[DBG ][PAL ]: SSL Read return code -26880.
 +
 
 +
*How to solve?
 +
 
 +
:Upload the enrollment CA certificate to your Mbed account.
 +
 
 +
'''4. Invalid header'''
 +
 
 +
[DBG ][PAAL]: arm_uc_paal_update.c:266: ARM_UCP_GetActiveFirmwareDetails
 +
[DBG ][PAAL]: arm_uc_pal_linux_implementation_internal.c:602: Extended pre-script command: /usr/sbin/arm_update_active_details.sh -h /cache/header.bin
 +
[DBG ][PAAL]: arm_uc_pal_linux_implementation_internal.c:381: header bytes: 110
 +
[ERR ][PAAL]: arm_uc_pal_linux_implementation_internal.c:404: '''<font color="#FF0000">invalid header in slot 0</font>'''
 +
[ERR ][PAAL]: arm_uc_pal_linux_implementation_internal.c:725: pre-script failed
 +
[DBG ][HUB ]: update_client_hub_event_handlers.c:185: UCFM_EVENT_GET_ACTIVE_FIRMWARE_DETAILS_ERROR
  
 
*How to solve?
 
*How to solve?
  
'''[Do OTA update failed]'''
+
:Try to remove '''header.bin''' in '''KCM '''folder. The system will generate a new one based on current images.
 +
 
 +
==== <font color="#0070c0">Do OTA update failed</font> ====
  
 
If OTA update procedure is not successful, you can check the syslog.
 
If OTA update procedure is not successful, you can check the syslog.
  
1. Failure in recovery mode
+
'''1. Failure in recovery mode'''
  
 
  [INFO][mClt]: M2MNsdlInterface::send_reso'''Do update''' ...
 
  [INFO][mClt]: M2MNsdlInterface::send_reso'''Do update''' ...
Line 126: Line 157:
 
:Check if OTA image size is too big? Make sure the free space of /cache is double size of new OTA image.
 
:Check if OTA image size is too big? Make sure the free space of /cache is double size of new OTA image.
  
2. Rollback protection
+
'''2. Rollback Protection'''
  
 
  [DBG ][HUB ]: update_client_hub_error_handler.c:55: error: 42480001 16     
 
  [DBG ][HUB ]: update_client_hub_error_handler.c:55: error: 42480001 16     

Latest revision as of 03:39, 28 December 2018

mbed Device Connector

mbed Device Connector can connect devices to Mbed cloud, but it's going to be deprecated on the 31st of December 2018. You may refer to Arm Mbed (Pelion) Device Management for more advanced features and capabilities.

Arm Mbed

Supported Platforms

[RISC]

  • NXP i.MX6
  • RSB-4411
  • RSB-6410
  • UBC-220
  • Qualcomm APQ8016 
  • RSB-4760
  • TI AM335x/57xx
  • RSB-4220

[WISE]

  • Qualcomm IPQ806X
  • WISE-3610

Frequently Asked Questions

Cannot connect to Mbed

If Mbed client cannot connect to Mbed Cloud, you can check the syslog with the patterns below.

1. Enrollment ID is not registered.

[INFO][mClt]: M2MNsdlInterface::received_from_server_callback - bootstrap message
[ERR ][mClt]: M2MNsdlInterface::handle_bootstrap_error(bad-request:Enrollment ID not registered)
[ERR ][mClt]: M2MInterfaceImpl::bootstrap_error(bad-request:Enrollment ID not registered)
[ERR ][mClt]: ConnectorClient::error() - error: 2
[ERR ][mClt]: ServiceClient::connector_error() error 2
[ERR ][mClt]: ServiceClient::state_failure()
[INFO][mClt]: MbedCloudClient::complete status (-1)
[ERR ][mClt]: MbedCloudClient::error code (2)
[ERR ][edgecc]: Error occured : MbedCloudClient::ConnectBootstrapFailed
[ERR ][edgecc]: Error code : 2
[ERR ][edgecc]: Error details : bad-request:Enrollment ID not registered
[ERR ][mClt]: ServiceClient::state_failure()
[INFO][mClt]: MbedCloudClient::complete status (-1)
[INFO][mClt]: M2MInterfaceImpl::bootstrap_error - reconnecting in 4(s)
[DBG ][PAL ]: SSL Read return code -26880.
  • How to solve?
Input the enrollment id into your Mbed account.

2. DNS is invalid

[ERR ][mClt]: M2MConnectionHandlerPimpl::getAddressInfo failed with 0xFFFF0005
[ERR ][mClt]: M2MInterfaceImpl::socket_error: (5), retry (1), reconnecting (0), reconnection_state (0)
[INFO][mClt]: M2MInterfaceImpl::socket_error - reconnecting in 4(s)
[ERR ][mClt]: ConnectorClient::error() - error: 12
[ERR ][mClt]: ServiceClient::connector_error() error 12
[ERR ][mClt]: MbedCloudClient::error code (12)
[ERR ][edgecc]: Error occured : MbedCloudClient::ConnectDnsResolvingFailed
[ERR ][edgecc]: Error code : 12
[ERR ][edgecc]: Error details : Client in reconnection mode DnsResolvingFailed
[ERR ][mClt]: ServiceClient::state_failure()
[INFO][mClt]: MbedCloudClient::complete status (-1)
[INFO][serv]: Listening 16777343 on port 22225.
  • How to solve?
Add Google DNS server into your network setting.
# sudo su
# apt-get update
# apt-get install resolvconf
# vi /etc/resolvconf/resolv.conf.d/head
 nameserver 8.8.8.8
 nameserver 8.8.4.4
# resolvconf -u
After that, check the /etc/resolv.conf file
# cat /etc/resolv.conf
 nameserver 8.8.8.8
 nameserver 8.8.4.4

3. No CA certificate for enrolled devices

[INFO][mClt]: M2MNsdlInterface::received_from_server_callback - bootstrap message
[ERR ][mClt]: M2MNsdlInterface::handle_bootstrap_error(internal-server-error)
[ERR ][mClt]: M2MInterfaceImpl::bootstrap_error(internal-server-error)
[ERR ][mClt]: ConnectorClient::error() - error: 2
[ERR ][mClt]: ServiceClient::connector_error() error 2
[ERR ][mClt]: ServiceClient::state_failure()
[INFO][mClt]: MbedCloudClient::complete status (-1)
[ERR ][mClt]: MbedCloudClient::error code (2)
[ERR ][edgecc]: Error occured : MbedCloudClient::ConnectBootstrapFailed
[ERR ][edgecc]: Error code : 2
[ERR ][edgecc]: Error details : internal-server-error
[ERR ][mClt]: ServiceClient::state_failure()
[INFO][mClt]: MbedCloudClient::complete status (-1)
[INFO][mClt]: M2MInterfaceImpl::bootstrap_error - reconnecting in 7(s)
[DBG ][PAL ]: SSL Read return code -26880.
  • How to solve?
Upload the enrollment CA certificate to your Mbed account.

4. Invalid header

[DBG ][PAAL]: arm_uc_paal_update.c:266: ARM_UCP_GetActiveFirmwareDetails
[DBG ][PAAL]: arm_uc_pal_linux_implementation_internal.c:602: Extended pre-script command: /usr/sbin/arm_update_active_details.sh -h /cache/header.bin 
[DBG ][PAAL]: arm_uc_pal_linux_implementation_internal.c:381: header bytes: 110
[ERR ][PAAL]: arm_uc_pal_linux_implementation_internal.c:404: invalid header in slot 0
[ERR ][PAAL]: arm_uc_pal_linux_implementation_internal.c:725: pre-script failed
[DBG ][HUB ]: update_client_hub_event_handlers.c:185: UCFM_EVENT_GET_ACTIVE_FIRMWARE_DETAILS_ERROR
  • How to solve?
Try to remove header.bin in KCM folder. The system will generate a new one based on current images.

Do OTA update failed

If OTA update procedure is not successful, you can check the syslog.

1. Failure in recovery mode

[INFO][mClt]: M2MNsdlInterface::send_resoDo update ...
 Archive:  /cache/firmware_0.bin
   inflating: /cache/install.sh
   inflating: /cache/result.sh
  extracting: /cache/update.zip
 Write recovery command ...
 Write BCB ...
 0+1 records in
 0+1 records out
 14 bytes copied, 0.00342905 s, 4.1 kB/s
 Setup OK. Reboot to recovery image!

[DBG ][PAAL]: arm_uc_pal_linux_implementation_internal.c:602: Extended pre-script command: /usr/sbin/arm_update_active_details.sh -h 
/cache/header.bin 
[ERR ][PAAL]: arm_uc_pal_linux_implementation_internal.c:647: Script exited with non-zero status 256
[ERR ][PAAL]: arm_uc_pal_linux_implementation_internal.c:725: pre-script failed
[DBG ][HUB ]: update_client_hub_event_handlers.c:185: UCFM_EVENT_GET_ACTIVE_FIRMWARE_DETAILS_ERROR
  • How to solve?
Check if OTA image size is too big? Make sure the free space of /cache is double size of new OTA image.

2. Rollback Protection

[DBG ][HUB ]: update_client_hub_error_handler.c:55: error: 42480001 16     
[ERR ][HUB ]: update_client_hub_error_handler.c:146: HUB_ERR_ROLLBACK_PROTECTION: 4248      0001                                                                                                                                                    
[INFO][uccc]: error reported: 9                                               
[ERR ][mClt]: MbedCloudClient::error code (1033)                            
[ERR ][edgecc]: Error occured : MbedCloudClient::UpdateWarningRollbackProtection                                                                                                                                                          
[ERR ][edgecc]: Error code : 1033                                           
[ERR ][edgecc]: Error details : Update has failed, check MbedCloudClient::Error
[DBG ][CTRL]: arm_uc_control_center.c:318: ARM_UC_ControlCenter_ReportUpdateResult: 6  
  • How to solve?
Make sure your new OTA image is newer than the image inside the device.