Failed to publish to a topic in AWS

I'm using DA 16200mod evk  to publish to a topic in Aws. Downloaded the DA16200 firmware image '.ttl'  script from DA16200_DA16600_AWS_v3.2.8.0_ATCMD_img. Have sent the three certificates files over uart.I have done the configurations using AT commands sending from nRF52840 DK uart, as follows

"AT+AWS=SET APP_THINGNAME tap-pet-nrf-device\r\n");
   
("AT+AWS=SET AWS_BROKER a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com\r\n");
    ("AT+AWS=SET APP_LPORT 8443\r\n");
    ("AT+AWS=CFG 0 sample/pet 0 0\r\n");
    ("AT+AWS=CMD MCU_DATA 0 sample/pet 25\n\r");
All in station mode
As per the manual after this a factory reset is to be done which leads to soft ap mode and waiting for provisioning. But here it is entering soft AP mode but no wfscan happens or provisioning cannot be done. 
In teraterm I'm getting it with error as shown below (when nrf transmits AT COMMANDS to DA)
Parents
  • Hi There,

    Thank you for posting your question online.

    As per the manual after this a factory reset is to be done which leads to soft ap mode and waiting for provisioning. But here it is entering soft AP mode but no wfscan happens or provisioning cannot be done. 

    In order to go into Provisioning mode, you will have to use the Android or IOS mobile application. 
    Please refer on UM-WI-038 , on A.1.2 Provisioning Mode, on page: 31
    Regarding the error you are facing when transmitting AT commands to the DA16200:
    I will have to take a look and get back to you as soon as possible. 
    In the meantime, could you please access the NVRAM via the Debug Console Interface (UART0) and check if the AWS broker configuration has been properly saved?

    Best Regards,
    OV_Renesas

  • hi, I cheked the nvram and got this response.

    and the certificate status is as below.Is the DH parameter necessary for this to work?If necessary,how can I get it?

    and getting error message as

  • Hi There,

    Thank you for the reply.
    Apologies for the delay but I am travelling on a biz trip until Friday 10th. 
    Please note that there will be a delay on the responses but I will look into it.

    Best Regards,
    OV_Renesas

  • Hi There,

    Apologies for the delay.

    and getting error message as

    The MQTTBadParameter error code corresponds to if the packet would exceed the size allowed by the MQTT spec or if a subscription is empty. 
    It seems that you did not issue the MQTT request with the correct parameters.

    Please refer on User Manual DA16200 DA16600 Getting Started with AWS® IoT Using AT Command UM-WI-038
    It would be helpful for us if you could share the whole UART0 and UART1 log files so we can understand the AT commands sequence you used and how you configured your DA16200.
    With the Wi-Fi Provisioning Mobile application were you able to do provisioning and access the AWS server?

    Best Regards,
    OV_Renesas

  • Hi,
         Please find the attached document containing the At commands and their corresponding responses. I have also mentioned the Firmware image that I used, to make sure that it is not the Issue with the firmware I chose.
  • A gentle remainder. Please let me know if any updates.

  • Hi Vani,

    Apologies for the delay. 
    Could you please share the whole UART0 (Debug Console Interface) logs with Timestamps?
    In order to add timestamp and keep the log file:
    On Tera Term--> FIle--> Log.. --> Make sure you select the Timestamp option.
    Please also make sure you define the DEBUG_ATCMD macro, so we can get all the debug info from the AT commands on the UART0.

    Best Regards,
    OV_Renesas

  • Hi,

    I will be following this from now on behalf of Vani. Regret any inconvenience caused. 

    As you mentioned, we enabled the timestamp option and have attached the file herein. But please note that firmware ‘DA16200_DA16600_AWS_v3.2.8.0_ATCMD_img’ from https://www.renesas.com/us/en/document/sws/aws-iot-atcmd-image-freertos-sdk?r=1600096 was used by us. 

    If we need to include the DEBUG_ATCMD macro, could you please help us with the corresponding sample software file which will support the AT commands and wherein we can possibly define the mentioned DEBUG_ATCMD macro? 

    Please let me know your feedback.

    Thanks and Regards,

    Raji

    0552.teraterm.log

  • Hi Raji,

    Thank you for the reply.
    You are using the pre-compiled images.
    For the generic FreeRTOS SDK v3.2.8.0 AWS:
    1) Download the FreeRTOS SDK v3.2..8.1
    2) Download the AWS IoT Reference for FreeRTOS SDK
    Inside the AWS IoT Reference for FreeRTOS there is a ReadMe file on how to integrate the AWS functionalities on the generic SDK.

    In order to enable the AT commands please refer on UM-WI-003, on section 4.1.1 How to Run AT-CMD on UART, on page: 26

    You can define the DEBUG_ATCMD macro there or in the atcmd.c/h files.
    Follow the steps of the UM-WI-056, on section 5.4 Importing DA16200 FreeRTOS SDK Project into e 2studio, on page: 36 so you can understand how to Import and Build your project on e2studio.

    We would also recommend you follow our available example first to understand how to configure the AWS Server and the DA16200 based on the following documents. 
    1) UM-WI-017 DA16200 AWS IoT Server Setup (renesas.com)
    2) UM-WI-016 DA16200 Door Lock Application Using AWS IoT (renesas.com)
    3)UM-WI-038 DA16200 DA16600 Getting Started with AT Command for AWS IoT (renesas.com)
    For our Demo, you will our Wi-Fi Provisioning App to test it:
    Renesas WiFiProvisioning - Apps on Google Play

    From the log file you shared it is not clear to me how you issue the AT commands and the responses, this is the reason we need the DEBUG_ATCMD macro defined.
    On the log file I can see:

                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: SET APP_THINGNAME vani_aws_iot                                                                                                                                                                                                                                                                        
    =======================================================                                                                                                                                                                                                                                                        
    APP SET vani_aws_iot                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: SET APP_PUBTOPIC vani_aws_iot/DeviceControl                                                                                                                                                                                                                                                           
    =======================================================                                                                                                                                                                                                                                                        
    APP SET vani_aws_iot/DeviceControl                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: SET AWS_BROKER a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com                                                                                                                                                                                                                                         
    =======================================================                                                                                                                                                                                                                                                        
    APP SET a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: CFG 1 mcu_door 1 0                                                                                                                                                                                                                                                                                    
    =======================================================                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    Att[1] number   : 1                                                                                                                                                                                                                                                                                            
    Att[1] name     : mcu_door                                                                                                                                                                                                                                                                                     
    Att[1] data type: 1                                                                                                                                                                                                                                                                                            
    Att[1] MQTT type: 0                                                                                                                                                                                                                                                                                            
    =======================================================    

    Which according to UM-WI-038:

    You have set 1 MQTT connection, on topic named mcu_door, which has value of string and you would like to publish on that.
    However later on the logs I can see:
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: CMD MCU_DATA 1 mcu_door opened                                                                                                                                                                                                                                                                        
    =======================================================                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                   
    board feature :                                                                                                                                                                                                                                                                                                
    topicCount : 1                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                   
    Count : 0, cmdNum = 1                                                                                                                                                                                                                                                                                          
    mqtttype = 0                                                                                                                                                                                                                                                                                                   
    data type(publish)=1                                                                                                                                                                                                                                                                                           
    call publish: 1 mcu_door opened                                                                                                                                                                                                                                                                                
    [ERROR] [MQTT] [validatePublishParams:1756] Packet Id is 0 for PUBLISH with QoS=1.                                                                                                                                                                                                                             
    [ERROR] [MQTT] [MQTT_Publish:2193] MQTT PUBLISH failed with status MQTTBadParameter.                                                                                                                                                                                                                           
    [ERROR] [PkcsTlsTransport] [xPublishToTopic:1396] Failed to send PUBLISH packet to broker with error = MQTTBadParameter.                                                                                                                                                                                       
    publish (contents update) NG - topic : vani_aws_iot/DeviceControl payload: 1 mcu_door opened                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                   
    [/DA16200] #                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: CMD MCU_DATA 1 mcu_door opened                                                                                                                                                                                                                                                                        
    =======================================================                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                   
    board feature :                                                                                                                                                                                                                                                                                                
    topicCount : 1                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                   
    Count : 0, cmdNum = 1                                                                                                                                                                                                                                                                                          
    mqtttype = 0                                                                                                                                                                                                                                                                                                   
    data type(publish)=1                                                                                                                                                                                                                                                                                           
    call publish: 1 mcu_door opened                                                                                                                                                                                                                                                                                
    [ERROR] [MQTT] [MQTT_SerializePublishHeader:1995] Argument cannot be NULL: pFixedBuffer->pBuffer is NULL.                                                                                                                                                                                                      
    [ERROR] [MQTT] [MQTT_Publish:2193] MQTT PUBLISH failed with status MQTTBadParameter.                                                                                                                                                                                                                           
    [ERROR] [PkcsTlsTransport] [xPublishToTopic:1396] Failed to send PUBLISH packet to broker with error = MQTTBadParameter.                                                                                                                                                                                       
    publish (contents update) NG - topic : vani_aws_iot/DeviceControl payload: 1 mcu_door opened    

    The MQTTBadParameter return status corresponds to wrong parameters or configuration. 
    I believe that you should follow the AWS Server Setup to make sure that everything is configured correctly and follow the doorlock example based on the Mobile application we provide.

    Best Regards,
    OV_Renesas



Reply
  • Hi Raji,

    Thank you for the reply.
    You are using the pre-compiled images.
    For the generic FreeRTOS SDK v3.2.8.0 AWS:
    1) Download the FreeRTOS SDK v3.2..8.1
    2) Download the AWS IoT Reference for FreeRTOS SDK
    Inside the AWS IoT Reference for FreeRTOS there is a ReadMe file on how to integrate the AWS functionalities on the generic SDK.

    In order to enable the AT commands please refer on UM-WI-003, on section 4.1.1 How to Run AT-CMD on UART, on page: 26

    You can define the DEBUG_ATCMD macro there or in the atcmd.c/h files.
    Follow the steps of the UM-WI-056, on section 5.4 Importing DA16200 FreeRTOS SDK Project into e 2studio, on page: 36 so you can understand how to Import and Build your project on e2studio.

    We would also recommend you follow our available example first to understand how to configure the AWS Server and the DA16200 based on the following documents. 
    1) UM-WI-017 DA16200 AWS IoT Server Setup (renesas.com)
    2) UM-WI-016 DA16200 Door Lock Application Using AWS IoT (renesas.com)
    3)UM-WI-038 DA16200 DA16600 Getting Started with AT Command for AWS IoT (renesas.com)
    For our Demo, you will our Wi-Fi Provisioning App to test it:
    Renesas WiFiProvisioning - Apps on Google Play

    From the log file you shared it is not clear to me how you issue the AT commands and the responses, this is the reason we need the DEBUG_ATCMD macro defined.
    On the log file I can see:

                                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: SET APP_THINGNAME vani_aws_iot                                                                                                                                                                                                                                                                        
    =======================================================                                                                                                                                                                                                                                                        
    APP SET vani_aws_iot                                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: SET APP_PUBTOPIC vani_aws_iot/DeviceControl                                                                                                                                                                                                                                                           
    =======================================================                                                                                                                                                                                                                                                        
    APP SET vani_aws_iot/DeviceControl                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: SET AWS_BROKER a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com                                                                                                                                                                                                                                         
    =======================================================                                                                                                                                                                                                                                                        
    APP SET a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: CFG 1 mcu_door 1 0                                                                                                                                                                                                                                                                                    
    =======================================================                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    Att[1] number   : 1                                                                                                                                                                                                                                                                                            
    Att[1] name     : mcu_door                                                                                                                                                                                                                                                                                     
    Att[1] data type: 1                                                                                                                                                                                                                                                                                            
    Att[1] MQTT type: 0                                                                                                                                                                                                                                                                                            
    =======================================================    

    Which according to UM-WI-038:

    You have set 1 MQTT connection, on topic named mcu_door, which has value of string and you would like to publish on that.
    However later on the logs I can see:
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: CMD MCU_DATA 1 mcu_door opened                                                                                                                                                                                                                                                                        
    =======================================================                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                   
    board feature :                                                                                                                                                                                                                                                                                                
    topicCount : 1                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                   
    Count : 0, cmdNum = 1                                                                                                                                                                                                                                                                                          
    mqtttype = 0                                                                                                                                                                                                                                                                                                   
    data type(publish)=1                                                                                                                                                                                                                                                                                           
    call publish: 1 mcu_door opened                                                                                                                                                                                                                                                                                
    [ERROR] [MQTT] [validatePublishParams:1756] Packet Id is 0 for PUBLISH with QoS=1.                                                                                                                                                                                                                             
    [ERROR] [MQTT] [MQTT_Publish:2193] MQTT PUBLISH failed with status MQTTBadParameter.                                                                                                                                                                                                                           
    [ERROR] [PkcsTlsTransport] [xPublishToTopic:1396] Failed to send PUBLISH packet to broker with error = MQTTBadParameter.                                                                                                                                                                                       
    publish (contents update) NG - topic : vani_aws_iot/DeviceControl payload: 1 mcu_door opened                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                   
    [/DA16200] #                                                                                                                                                                                                                                                                                                   
    =======================================================                                                                                                                                                                                                                                                        
    argc num = 2                                                                                                                                                                                                                                                                                                   
    argv[0]: AT+AWS                                                                                                                                                                                                                                                                                                
    argv[1]: CMD MCU_DATA 1 mcu_door opened                                                                                                                                                                                                                                                                        
    =======================================================                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                   
    board feature :                                                                                                                                                                                                                                                                                                
    topicCount : 1                                                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                                                                   
    Count : 0, cmdNum = 1                                                                                                                                                                                                                                                                                          
    mqtttype = 0                                                                                                                                                                                                                                                                                                   
    data type(publish)=1                                                                                                                                                                                                                                                                                           
    call publish: 1 mcu_door opened                                                                                                                                                                                                                                                                                
    [ERROR] [MQTT] [MQTT_SerializePublishHeader:1995] Argument cannot be NULL: pFixedBuffer->pBuffer is NULL.                                                                                                                                                                                                      
    [ERROR] [MQTT] [MQTT_Publish:2193] MQTT PUBLISH failed with status MQTTBadParameter.                                                                                                                                                                                                                           
    [ERROR] [PkcsTlsTransport] [xPublishToTopic:1396] Failed to send PUBLISH packet to broker with error = MQTTBadParameter.                                                                                                                                                                                       
    publish (contents update) NG - topic : vani_aws_iot/DeviceControl payload: 1 mcu_door opened    

    The MQTTBadParameter return status corresponds to wrong parameters or configuration. 
    I believe that you should follow the AWS Server Setup to make sure that everything is configured correctly and follow the doorlock example based on the Mobile application we provide.

    Best Regards,
    OV_Renesas



Children
  • Hi,

    Thank you for you detailed reply.  I followed your instructions, copied the AWS IoT package in the '~SDK\apps\' directory of the DA16200_DA16600 Generic SDK V3.2.8.1, defined the DEBUG_ATCMD macro and built it using e2 studio.  But after flashing the new images in the DA16200MOD-DeVKT through teraterm using the macro and .ttl script generated as shown below,

    it failed to take in the AWS AT commands to connect to my IOT thingname.  as shown here- 
    Earlier when we used the precompiled images taken from the site, the SDK version showed an AWS reference as shown below-
    On flashing the custom image, this is what I received-
    Also the earlier case had resulted in a status message soon after the wifi connection message was established as shown below-
    Please let me know if this SDK has AWS support and if yes, why was I getting an error for AT+AWS SET APP_THINGNAME
    Please note that we are trying to establish a connection to the AWS through PC via DA16200 module via teraterm using AT commands alone for the time being. 
    Thanks and Regards,
    Raji
  • Hi, 

    Request you to please help me debug the above connection issue on flashing the custom image.  Any modification need to be done in any of the sdk headers/files?

    Thanks in advance,

    Raji

  • Hi Raji,

    Thank you for the reply and apologies for the delay.

    Thank you for you detailed reply.  I followed your instructions, copied the AWS IoT package in the '~SDK\apps\' directory of the DA16200_DA16600 Generic SDK V3.2.8.1, defined the DEBUG_ATCMD macro and built it using e2 studio.  But after flashing the new images in the DA16200MOD-DeVKT through teraterm using the macro and .ttl script generated as shown below,

    I believe you used the wrong .ttl script to flash your board.
    Note: Please refer on UM-WI-056 on how to add the launchers on the e2studio.
    On section 5.5.2 Changing Flash Configuration, on page:44. 
    Follow the same steps but select the following:

    When the Build operation is finished, you should see the following 

    Now you can select the Run External Tools button   and select the uart_program_boot_rtos_win launcher.

    After that, specify the COM on the console and make sure that the device is not in DPM sleep (Reset it) after that the firmware should be downloaded automatically:

    Then please try to test the UART1 via AT commands.

    Best Regards,
    OV_Renesas

  • Hi,

    Thank you for your speedy response.  I included utility as instructed in the 'Import launch configurations', gave the build, did run via 'uart_program_boot_rtos_win' and selected the lower COM port and also reset.  But it gave me an error like this-  failed to download error-

    I also tried downloading the images through ttl macro.  But again, as you mentioned it is the wrong script and I got the same error as expected-

    Please help me rectify the download error.  I wonder if the read is not happening correctly.  

    Thanks and Regards,

    Raji

  • Hi Raji,

    Thank you for the reply.
    From the screenshot you shared, I have two points to highlight:
    1) I do not think you have imported the correct project to work on AWS. You should import the da16200_aws project. 
    2) In order to use the launchers, you will have to select the project you want to download.
    Please check below screenshot:

    If the launcher keeps on not working, you can do the same approach manually from Tera Term.
    Follow the steps below:
    1) Open Tera Term
    2) Connect to UART0, with Baudrate set at 230400 as shown below:

    3) Trigger the RST switch and then type 'reset'
    The MaskROM Bootloader should load:

    Type Enter one type to make sure that we are into the [MROM] menu
    4) Type 'loady 0'. so we can load first the FBOOT image.

    5) Go on File-->Transfer-->YMODEM-->Send...

    6) Navigate onto the path of your projects images, and select FBOOT image.
    7) In case the operation is not successful, please type again 'loady 0' and repeat the steps.
    8) If the operation is successful, then type 'loady 23000' and follow the same steps to load the FROTS image into the board.
    9) When both images have been downloaded successfully, you can type 'reboot' and the firmware should start running.

    Best Regards,
    OV_Renesas 

  • Hi,

    Thank you for your quick response.    

    When I tried changing the imported project to da16200_aws project, I am getting a series of include errors during build-

    In the readme file suggested by you, the order of import was shown as 

    After reading your comment, I understand that the step 2.5 didnt happen for me when I followed step 2.2 and gave the file `~\SDK\apps\AWS\get_started_da16200\projects\da16200\`

     Now as per your suggestion when I uploaded the file, da16200_aws project , it is giving build errors as mentioned above.  Kindly help me with this.  I did try copying the include files from the projects\da16200 folder, but errors are happening in a chain.  Can you suggest a way out?

    Thanks and Regards,

    Raji

  • Hi Raji,

    Thank you for the reply.
    I believe you did not copy/replace the correct files inside the SDK.
    I have integrated the AWS reference SDK into the SDK v3.2.8.1.

    Please download files from the following URL:
    <https://upload.hdedrive.com/ui/renesas.com/dl/SB1701187602-6bbb18a6-03d8-4ef1-b79a-94ab5bb0d78e>

    * This URL requires guest identity verification as well as download password authentication.
    Once the identity verification passed, the verification step can be skipped for up to 30 days in the same browser.

    Download Password: 9!/M5cMEVJjR

    This URL will expire on December 12, 2023 6:06 PM (UTC+02:00)
    I was able to Import the da16200_aws project and enable AT commands and made sure I defined the DEBUG_ATCMD macro in the atcmd.h file.
    I then downloaded the Images and tested the AT commands, it works on my side.
    Please download the SDK from the link above and use the da16200_aws project.
    The Images of the da16200_aws project can be found on the following path:
    ...DA16200_DA16600_SDK_FreeRTOS_v3.2.8.0_1_AWS\apps\AWS\get_started_da16200\projects\da16200\img

    Test your configuration, and share the UART0 logs (with Timestamp if possible) so we can understand the exact issue. 

    Best Regards,
    OV_Renesas

  • Hi,

    Thank you so much for your help.  This time I was able to build and also flash the images. 

    PFA the log files for your reference. 

    Do let me know what I am doing wrong?

    Thanks and Regards,

    Raji

    [2023-11-29 10:20:50.217] 
    [2023-11-29 10:20:50.217] argv[0]:ATZ
    [2023-11-29 10:20:50.217] 
    [2023-11-29 10:20:50.217] Usage: ATZ=
    [2023-11-29 10:20:52.826] 
    [2023-11-29 10:20:52.826] argv[0]:ATE
    [2023-11-29 10:20:52.826] 
    [2023-11-29 10:20:52.826] Usage: ATE=[<?>]
    [2023-11-29 10:21:05.199] 
    [2023-11-29 10:21:05.199] argv[0]:AT+WFMODE
    [2023-11-29 10:21:05.199] argv[1]:0
    [2023-11-29 10:21:05.199] 
    [2023-11-29 10:21:05.199] Usage: AT+WFMODE=<mode>
    [2023-11-29 10:21:13.945] 
    [2023-11-29 10:21:13.945] argv[0]:AT+WFJAPA
    [2023-11-29 10:21:13.945] argv[1]:Linksys07692
    [2023-11-29 10:21:13.945] argv[2]:aryamaryjose
    [2023-11-29 10:21:13.945] 
    [2023-11-29 10:21:13.945] >>> Network Interface (wlan0) : DOWN
    [2023-11-29 10:21:14.076] [wpa_supplicant_event_disassoc] CTRL-EVENT-DISCONNECTED bssid=e8:9f:80:35:84:aa reason=3 locally_generated=1
    [2023-11-29 10:21:14.076] -- DHCP Client WLAN0: STOP(0)
    [2023-11-29 10:21:14.088] OK
    [2023-11-29 10:21:14.088] 0
    [2023-11-29 10:21:14.088] 
    [2023-11-29 10:21:14.903] 
    [2023-11-29 10:21:14.903] >>> Network Interface (wlan0) : UP
    [2023-11-29 10:21:14.903] >>> Associated with e8:9f:80:35:84:aa
    [2023-11-29 10:21:14.999] 
    [2023-11-29 10:21:14.999] Connection COMPLETE to e8:9f:80:35:84:aa
    [2023-11-29 10:21:14.999] 
    [2023-11-29 10:21:14.999] -- DHCP Client WLAN0: SEL(6)
    [2023-11-29 10:21:14.999] 
    [2023-11-29 10:21:14.999] ### User Call-back : Success to connect Wi-Fi ...
    [2023-11-29 10:21:17.785] -- DHCP Client WLAN0: REQ(1)
    [2023-11-29 10:21:17.865] -- DHCP Client WLAN0: CHK(8)
    [2023-11-29 10:21:18.365] -- DHCP Client WLAN0: BOUND(10)
    [2023-11-29 10:21:18.365] 	 Assigned addr   : 192.168.11.146
    [2023-11-29 10:21:18.365] 	       netmask   : 255.255.255.0
    [2023-11-29 10:21:18.365] 	       gateway   : 192.168.11.1
    [2023-11-29 10:21:18.365] 	       DNS addr  : 192.168.11.1
    [2023-11-29 10:21:18.365] 
    [2023-11-29 10:21:18.365] 	 DHCP Server IP  : 192.168.11.1
    [2023-11-29 10:21:18.381] 	 Lease Time      : 24h 00m 00s
    [2023-11-29 10:21:18.381] 	 Renewal Time    : 12h 00m 00s
    [2023-11-29 10:21:18.381] 
    [2023-11-29 10:21:18.381] 
    [2023-11-29 10:21:18.381] Usage: AT+WFJAPA=<ssid>[,<key>][,<hidden>]
    [2023-11-29 10:21:20.215] 
    [2023-11-29 10:21:20.215] [/DA16200] # nvram
    [2023-11-29 10:21:24.215]     Command-List is changed, "NVRAM"
    [2023-11-29 10:21:24.215] [/DA16200/NVRAM] # nvram.setenv APP_THINGNAME vani_aws_iot
    [2023-11-29 10:21:48.681] [/DA16200/NVRAM] # 
    [2023-11-29 10:22:00.892] ======================================================= 
    [2023-11-29 10:22:00.892] argc num = 2 
    [2023-11-29 10:22:00.892] argv[0]: AT+AWS
    [2023-11-29 10:22:00.892] argv[1]: SET APP_THINGNAME vani_aws_iot
    [2023-11-29 10:22:00.892] =======================================================
    [2023-11-29 10:22:00.892] APP SET vani_aws_iot 
    [2023-11-29 10:22:13.579] 
    [2023-11-29 10:22:13.579] ======================================================= 
    [2023-11-29 10:22:13.593] argc num = 2 
    [2023-11-29 10:22:13.593] argv[0]: AT+AWS
    [2023-11-29 10:22:13.593] argv[1]: SET APP_PUBTOPIC "vani_aws_iot/DeviceControl"
    [2023-11-29 10:22:13.593] =======================================================
    [2023-11-29 10:22:13.593] APP SET "vani_aws_iot/DeviceControl" 
    [2023-11-29 10:22:26.734] 
    [2023-11-29 10:22:26.734] ======================================================= 
    [2023-11-29 10:22:26.734] argc num = 2 
    [2023-11-29 10:22:26.734] argv[0]: AT+AWS
    [2023-11-29 10:22:26.734] argv[1]: SET AWS_BROKER a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com
    [2023-11-29 10:22:26.734] =======================================================
    [2023-11-29 10:22:26.734] APP SET a3kbzziaf9hg4n-ats.iot.us-east-1.amazonaws.com 
    [2023-11-29 10:22:36.159] 
    [2023-11-29 10:22:36.160] ======================================================= 
    [2023-11-29 10:22:36.160] argc num = 2 
    [2023-11-29 10:22:36.160] argv[0]: AT+AWS
    [2023-11-29 10:22:36.160] argv[1]: SET APP_LPORT 8883
    [2023-11-29 10:22:36.160] =======================================================
    [2023-11-29 10:22:36.160] APP SET 8883 
    [2023-11-29 10:22:44.755] 
    [2023-11-29 10:22:44.755] ======================================================= 
    [2023-11-29 10:22:44.755] argc num = 2 
    [2023-11-29 10:22:44.755] argv[0]: AT+AWS
    [2023-11-29 10:22:44.755] argv[1]: CFG 1 mcu_door 1 0
    [2023-11-29 10:22:44.755] =======================================================
    [2023-11-29 10:22:44.755] 
    [2023-11-29 10:22:44.755] =======================================================
    [2023-11-29 10:22:44.755] Att[1] number   : 1
    [2023-11-29 10:22:44.755] Att[1] name     : mcu_door
    [2023-11-29 10:22:44.761] Att[1] data type: 1
    [2023-11-29 10:22:44.761] Att[1] MQTT type: 0
    [2023-11-29 10:22:44.761] =======================================================
    [2023-11-29 10:22:44.761] 
    [2023-11-29 10:24:23.420] 
    [2023-11-29 10:24:23.420] ======================================================= 
    [2023-11-29 10:24:23.420] argc num = 2 
    [2023-11-29 10:24:23.420] argv[0]: AT+AWS
    [2023-11-29 10:24:23.420] argv[1]: CMD MCU_DATA 1 mcu_door opened
    [2023-11-29 10:24:23.420] =======================================================
    [2023-11-29 10:24:23.434] 
    [2023-11-29 10:24:23.434] board feature : 
    [2023-11-29 10:24:23.434] topicCount : 1
    [2023-11-29 10:24:23.434] 
    [2023-11-29 10:24:23.434] 
    [2023-11-29 10:24:23.434] Count : 0, cmdNum = 1
    [2023-11-29 10:24:23.434] mqtttype = 0
    [2023-11-29 10:24:23.434] data type(publish)=1
    [2023-11-29 10:24:23.434] call publish: 1 mcu_door opened
    [2023-11-29 10:24:24.440] [ERROR] [MQTT] [MQTT_SerializePublishHeader:1995] Argument cannot be NULL: pFixedBuffer->pBuffer is NULL.
    [2023-11-29 10:24:24.440] [ERROR] [MQTT] [MQTT_Publish:2193] MQTT PUBLISH failed with status MQTTBadParameter.
    [2023-11-29 10:24:24.440] [ERROR] [PkcsTlsTransport] [xPublishToTopic:1396] Failed to send PUBLISH packet to broker with error = MQTTBadParameter.
    [2023-11-29 10:24:24.440] publish (contents update) NG - topic : "vani_aws_iot/DeviceControl" payload: 1 mcu_door opened
    

  • Hi Raji,

    Thank you for the reply.
    Glad you were able to Compile and flash the images.
    This is not the full UART0 logs. 
    Did you do Wi-Fi Provisioning via the Mobile application?
    Were you able to connect to the AWS server via the mobile application?

    Did you follow the AWS Server Setup document?


    Best Regards,
    OV_Renesas

  • Hi,

    Appreciate your questions.  I tried to connect to AWS  via the mobile app both after a manual 5sec reset press and also tried via the AT command- reset to AP.  However although the app was getting connected to the DA, provisioning couldnt be done.  Taking clues from your questions, I recreated a new AWS thing following the manual and did all the steps until creating a new S3 bucket to record the logs(since this option was missing in my log-in)  But nothing changed. 

    Also when I went over https://www.renesas.com/eu/en/document/mas/um-wi-016-da16200-door-lock-application-using-aws-iot?r=1600096, In section 5.1, the MQTT_Host macro couldnt be found.

    Do you thing the AWS set up is complete with creating a thing name, attaching certificates and policy, rules and publish topic?  Or could it be because of any MQTT set up I missed out?

    Best Regards,

    Raji