PelionIoT / mbed-cloud-client-example

Reference example application using Izuma Device Management Client library
https://izumanetworks.com
Apache License 2.0
30 stars 97 forks source link

mbed-cloud-client example run in ARM9 system problem #41

Closed mjchen1 closed 5 years ago

mjchen1 commented 5 years ago
  1. I use "python pal-platform/pal-platform.py fullbuild --target ARM_OpenWRT_mbedtls --toolchain GCC-OPENWRT --external ./../define.txt --name mbedCloudClientExample.elf" can build success. but when I run ".elf" in my system will occur error.
  2. when I run "/out/Release/mbedCloudClientExample.elf" will occur "MBEDTLS_ERR_ECP_INVALID_KEY". this error come from the function "static int ecp_check_pubkey_sw( const mbedtls_ecp_group grp, const mbedtls_ecp_point pt )".
  3. but, when I run "/out/Debug/mbedCloudClientExample.elf" will occur "MBEDTLS_ERR_X509_INVALID_FORMAT". This error come from the function "static int x509_crt_parse_der_core( mbedtls_x509_crt crt, const unsigned char buf, size_t buflen )"
  4. my system cpu is "arm926ej-s" and I run in Linux_4.4 Kernel.
  5. why run Release/.elf and Debug/.elf have different result..??
  6. and, how can I solve these error...??(any suggestion..??)
ciarmcom commented 5 years ago

ARM Internal Ref: IOTCLT-3373

teetak01 commented 5 years ago

Hi @mjchen1, I presume you have fresh developer-certificate from Pelion? If the application starts, can you copy here the actual traces the application gives out?

It also would help to enable debug tracing https://github.com/ARMmbed/mbed-cloud-client-example/blob/d111ac1d954ce068884aee2923059f5f98d9b33e/define.txt#L30 by defining that flag as 1.

mjchen1 commented 5 years ago

Yes, I have fresh developer-certificate from Pelion.

I log Release and Debug message.

From: Teemu Takaluoma [mailto:notifications@github.com] Sent: Friday, February 22, 2019 4:18 PM To: ARMmbed/mbed-cloud-client mbed-cloud-client@noreply.github.com Cc: MS10 MJChen MJCHEN@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [ARMmbed/mbed-cloud-client] mbed-cloud-client example run in ARM9 system problem (#31)

@mjchen1https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_mjchen1&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=BfRuUvkrcv6e8bRyrP6XrZT_OflpkL4keeurMxmBKT4&m=djBxmUAz-KhFDKCeKt9DNj3XuQU1AbYNd2K2iuDWCgI&s=GJjWOAp6i0dQdY054-NKnOTQTGZY0yLAJoQsxiRwYNc&e= I presume you have fresh developer-certificate from Pelion? If the application starts, can you copy here the actual traces the application gives out?

It also would help to enable debug tracing https://github.com/ARMmbed/mbed-cloud-client-example/blob/d111ac1d954ce068884aee2923059f5f98d9b33e/define.txt#L30https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ARMmbed_mbed-2Dcloud-2Dclient-2Dexample_blob_d111ac1d954ce068884aee2923059f5f98d9b33e_define.txt-23L30&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=BfRuUvkrcv6e8bRyrP6XrZT_OflpkL4keeurMxmBKT4&m=djBxmUAz-KhFDKCeKt9DNj3XuQU1AbYNd2K2iuDWCgI&s=lr9PTQix3HesUT5LIIcsYf8a04SEudce-1r7zzP38AQ&e= by defining that flag as 1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ARMmbed_mbed-2Dcloud-2Dclient_issues_31-23issuecomment-2D466312661&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=BfRuUvkrcv6e8bRyrP6XrZT_OflpkL4keeurMxmBKT4&m=djBxmUAz-KhFDKCeKt9DNj3XuQU1AbYNd2K2iuDWCgI&s=Rdtwla7u0Vflcdg9zy2ziKNIH12INRTjNdGnHdD9FrM&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_Ab3pJtvsKbBNF-5F0Jb1G1AhImww5GUX8Zks5vP6engaJpZM4bHDoh&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=BfRuUvkrcv6e8bRyrP6XrZT_OflpkL4keeurMxmBKT4&m=djBxmUAz-KhFDKCeKt9DNj3XuQU1AbYNd2K2iuDWCgI&s=jveZmyxXHTM7QZgmiOEx7s_SfpD3STyVID1see_O4V8&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

mjchen1 commented 5 years ago

release1.log debug1.log

yogpan01 commented 5 years ago

Hi @mjchen1, From debug logs it seems that your device is not able to establish TCP connection to Pelion Cloud server, bootstrap.us-east-1.mbedcloud.com on port 5684. The Device Management Client is able to resolve the server address (2600:1f18:259e:8903::41) but fails to connect over TCP. Do you know if there is any firewall or is the access on port 5684 blocked, which may prevent your client to connect to Pelion Cloud.

mjchen1 commented 5 years ago

I am connected to the network through a mobile phone, so there should be no firewall problems. Also, I can ping to the mbed website.

yogpan01 commented 5 years ago

What about the port 5684? Sometimes certain ports are restricted. mbed website is hosted in different domain than Pelion Cloud.

mjchen1 commented 5 years ago

netcat_5684

I use netcat to check port 5684 is ok. but still have the same error.

yogpan01 commented 5 years ago

Hi, Can you verify if you are able to connect example to Cloud through Ubuntu desktop environment?

Regards, Yogesh

mjchen1 commented 5 years ago

I can connect example to Cloud through Ubuntu desktop environment. And, the desktop also use the same mobile phone network.

yogpan01 commented 5 years ago

So, you are observing the same network error there as well?

mjchen1 commented 5 years ago

I run example well through Ubuntu desktop environment. But, run example on ARM9 platform fail.

mjchen1 commented 5 years ago

pc_example

I run example well through Ubuntu desktop environment.

ciarmcom commented 5 years ago

ARM Internal Ref: IOTCLT-3421

JanneKiiskila commented 5 years ago

Any updates on this @mjchen1 ? It's quite hard to offer assistance on this end, as we don't know the full setup (board, compiler versions etc.). Arm9 systems in itself should not be a problem, it definitely should work - the code is just C/C++.

teetak01 commented 5 years ago

closing due inactivity.