Hello,
Working on QCLI_demo projct and referring developer guide document page no. 221 topic 6.3.17.7.3 Download the certificates and write to file system.
I am getting error when i send the cert get command with approprieate file located at certs folder and correct IP address of host containing the cert files.
We are performing below steps:
1. Connecting the qca4020 to wifi accesspoint as given in 6.3.17.7.2 Connection procedure.
2. Following the steps commands given in 6.3.7 Certificate management demo and starting certification server ./certcs -s.
3. entring command
Net> cert get foo.cert.bin IPADDR (and other arguments as given in 6.3.7 Certificate management demo)
(the file name are same that we are generating and the IPADDRESS is the IP of host where we started certification server)
It looks like the qca4020 is not able to connect to the passed IP, all firewall are disabled on the host where we started certification server.
What can be the issue?
Thank you,
Akshaay
qapi_connect() retruns -1 incase the server address is not valid or client is not able to connect to server.
Can you try to ping the server IP before download of certificate , also provide us the console serial log to verify your instructions:
> wlan enable
> wlan setdevice 1
> wlan connect Demo_AP
> net dhcpv4c wlan1
>net ping 10.177.215.145
> net cert get root_ca.bin 10.177.215.145 -s ca.bin -t ca_list
Hello,
Thank you, i was able to get rid of the error qapi_connect() retruns -1 now i am stuck in ecosystem part and the error i am facing is
Ecosystem: Shadow Register Delta Error
Below are the logs for ecosystem part when trying to execuite shadow example:
Error -12 corresponds to NETWORK_SSL_READ_ERROR . Kindly refer to include/aws_iot_error.h inside thirdparty aws folder for more information on error codes.
Can you provide us the list of console commands perfomed during the test case ?
Kindly try to delete the json.txt file using command "fs rm /spinor/json.txt" and perform below commands:
>> Connect QCA4020 to AP and acquire IP address:
>> net sntpc start
>> net sntpc addsrv pool.ntp.org
>> net dnsc start
>> fs write /spinor/json.txt 0 "7b0d0a202020202274657374223a202274657374222c0d0a20202020227465737431223a20227465737431220d0a7d00"
>> fs ls
>> ecosystem
>>aws_set_schema a24plr9t73a2wh-ats.iot.us-west-2.amazonaws.com MyIoTButton /spinor/json.txt QZD.pem 100
>> aws_set_params test 1 3 111111 000000
>> aws_set_params test1 2 0 111111 000000
>> aws_run
Kindly let us know if these instructions worked.
Hi,
1) I tried the solution suggested by you but was not able to solve the error Error -12 corresponds to NETWORK_SSL_READ_ERROR.
2) As it is error related to SSL i found in developer guide document.
Net> ssl start client
After connecting to AP and acquiring IP address
Net> sntpc start
Thank you,
Akshaay.
You dont need to execute the SSL related commands.
If its an issue with SSL connection, you should observe "Shadow Connection Error", in your case, shadow connection is successfull.
Can you confirm if the Thing Policy Document in AWS console is as below :
You can Edit Policy Information as below :
Login to aws amazon console: IoT Core -> Manage -> Things -> MyIoTButton -> Security -> Click on Certificate -> Policy -> Click on Policy -> Edit policy document.
Currently my policy document contain following code
Kindly edit your policy document to allow publish/subscribe and receive along with connect:
You can Edit document as set Action to "iot:*" to allow all.
Thank you for your suggestion, i will try it and discuss with you further.
Till then can you please reply to the query for my post in below link as i am stuck at that issue from long time
https://developer.qualcomm.com/forum/qdn-forums/hardware/qca4020-qca4024/67244
Appreciate your help.