Hi
I'm building the Onboard awsiot demo for QCA4020 (CBD20) evaluation kit and have used qca4020.or_.2.0-00048 SDk and aws-iot-device-sdk-embedded-C-2.3.0 release version.
I am following the steps as per mentioned in document 80-ya121-140-qca402xcdb2x_development_kit_user_guide.pdf.
Now I got problem when the device does shadow connects, the return error is -19 (NETWORK_X509_ROOT_CRT_PARSE_ERROR ).
Is the aws_calist is the RSA 2048 bit key: VeriSign Class 3 Public Primary G5 root CA certificate or RSA 2048 bit key: Amazon Root CA 1 or something else ??
Can you please help me on these?
Thanks and Regards,
Ashok
Hi,
The aws demo inbuild used the NIST time standard. Please change the SNTP server to NTP.org and verify
Please modify the file @Onboard_demo\src\ecosystem\aws\aws_util.h as below.
- //#define SNTPC_SVR_ADDR "132.163.97.4" //this needs to be commented, sometimes NIST time would cause some issue in parsing CA.
+ #define SNTPC_SVR_ADDR "pool.ntp.org” //this will add ntp as time server and no issue should be seen.
Let me know, if you still face some issue.
Hi raja_pedada,
Thanks for reply.
As per your suggestion,I have changed SNTPC_SVR_ADDR to pool.ntp.org in new qca4020.or_.2.0-00048 SDK with AWS IoT SDK Version 2.3.0.But doesn't seem to be working. Device is getting stuck after two times host resolution retries.
Can you please help on these??
Here is the logs,
Onboard: Waiting for Onboard events ...
check if the HOST_ID provided is valid or not ?
verify if command line "ping a2v0hrezwxxxxx.iot.ap-south-1.amazonaws.com" is working and able to resolve the address to IP.
From the provided logs, i could observer there is no internet connection to the connected access Point.
Onboard: SNTP client is started.
Onboard: 0: pool.ntp.org **** // Here the server should be able to resolve pool.ntp.org IP address if there is internet connection
Onboard: 1: pool.ntp.org
Example:
Onboard: SNTP client is started.
Onboard: 0: 132.163.97.4 132.163.97.4
Onboard: IPADDR:fcf4b10a, MSK:feffff, GW:1f4b10a
Onboard: START AWS: running(0)
Onboard: Shadow Init
Onboard: Shadow Connect
From the error code -6 NETWORK_SSL_CONNECT_TIMEOUT_ERROR, either the network is blocking AWS connection or, network doesnt have internet connection to resolve AWS end point.
check if the HOST_ID provided is valid or not ?
verify if command line "ping a2v0hrezwxxxxx.iot.ap-south-1.amazonaws.com" is working and able to resolve the address to IP.
From the provided logs, i could observer there is no internet connection to the connected access Point.
Onboard: SNTP client is started.
Onboard: 0: pool.ntp.org **** // Here the server should be able to resolve pool.ntp.org IP address if there is internet connection
Onboard: 1: pool.ntp.org
Example:
Onboard: SNTP client is started.
Onboard: 0: 132.163.97.4 132.163.97.4
Onboard: IPADDR:fcf4b10a, MSK:feffff, GW:1f4b10a
Onboard: START AWS: running(0)
Onboard: Shadow Init
Onboard: Shadow Connect
From the error code -6 NETWORK_SSL_CONNECT_TIMEOUT_ERROR, either the network is blocking AWS connection or, network doesnt have internet connection to resolve AWS end point.
Hi raja,
Thanks for reply.
>>check if the HOST_ID provided is valid or not ?
Actually HOST_ID is a2v0hrezwtktgj.iot.ap-south-1.amazonaws.com .
>>verify if command line "ping a2v0hrezwxxxxx.iot.ap-south-1.amazonaws.com" is working and able to resolve the address to IP.
Getting Request timed out when i verified ping from command line.
but from the below logs.
We are using ARM tool chain 6.2 and AWS SDK tag v2.1.1 (https://github.com/aws/aws-iot-device-sdk-embedded-C/releases/tag/v2.1.1) to verify onboard demo.
Usually NETWORK_SSL_CONNECT_TIMEOUT_ERROR occurs when the network/internet blocks the AWS cloud connection.
You can verify the AWS connection using QCLI_Demo, mentioned in the document. QCLI_Demo will provide more information if the issues is with certifcates/cloud connection.
Could you try onboard demo with some mobile hotspot to verify there is no issues with corporate/office network.
Hi raja,
Device is able to establish Shadow Connection successfully.
But After that , device is doing againThread_Initialization and getting stuck (not responding to any activity in device until we repower. )after that.
From the logs I could observe the device is not able to update sensor information to shadow.
There is no issues with Thread creation, Initiation/Joining to end device.
Onboard: Thread is configured successfully
Onboard: Shadow Connect
Onboard: Shadow Connection successful
Onboard: Topic_name : $aws/things/thing_test/shadow/update/delta
Onboard: Thread Initialized Successfully:
Onboard: Network Configuration:
Onboard: Channel: 16
Onboard: PAN_ID: 8DA8
Onboard: Extended_PAN_ID: 0001020304050607
Onboard: NetworkName: Test Network
Onboard: MasterKey: F32B7B515AD61BFAF32B7B515AD61BFA
Could you check you AWS console Things Policy document.
Secure -> Policies -> Thing-Policy -> Overview (Make sure the policy document use Action: iot.* and resource: *)
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iot:*" ], "Resource": [ "*" ] } ] }
You can also check if the issues is related to AWS shadow or not by just starting the QCA4020 alone and check if the device is able to send sensor information to shadow or not.
Kindly, let me know if you still face any issues.
I assume you have set the required TOOLCHAIN PATHs correctly and kindly hard reset both the devices and try once again with below instructions.
Please follow the section "2.2.1 Prerequisites" from document QCA402x (CDB2x) Development Kit User Guide 80-YA121-140.
Please delete the AWS shadow document(Manage -> Things -> XX_THING -> Shadow -> Shadow Document) and verify the connection.