This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

AWS IoT how change the messagge type 1?

Hello 

I'm using nRF910 DK and need to transmit to aws iot core just like the sample aws iot does, but instead of battery voltage I need to transmit gps data.

In sample I don't find where change the value of type 1 mesagge to transmit, I look for it in the code but I can't find the function in charge of this.

thanks in advance for your help 

Julio

Parents
  • Hi!

    Here are the relevant lines when modifying what message to post to AWS IoT. 

    In L108-L109, the data (battery voltage and date and time) is added to the JSON objects. Here is where you would instead add the GPS data.

    Then the object is made into a message string in L118.

    L125-L130 is where the struct that is used to transmit packages in the AWS IoT library is created. 

    And it is published in L134.

    You will also need to add GPS functionality in the sample, as this is not included. Use the GPS sample in NCS as a reference. Remember that GPS and LTE cannot work concurrently so you will either need to put the modem in PSM mode or turn it off before activating the GPS. 

    Best regards,

    Heidi

Reply
  • Hi!

    Here are the relevant lines when modifying what message to post to AWS IoT. 

    In L108-L109, the data (battery voltage and date and time) is added to the JSON objects. Here is where you would instead add the GPS data.

    Then the object is made into a message string in L118.

    L125-L130 is where the struct that is used to transmit packages in the AWS IoT library is created. 

    And it is published in L134.

    You will also need to add GPS functionality in the sample, as this is not included. Use the GPS sample in NCS as a reference. Remember that GPS and LTE cannot work concurrently so you will either need to put the modem in PSM mode or turn it off before activating the GPS. 

    Best regards,

    Heidi

Children
Related