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

Change Asset Tracker AWS Host

    Need to send Asset Tracker data to a different AWS site, CloudMQTT.  I have located the CONFIG_NRF_CLOUD_HOST_NAME and CONFIG_NRF_PORT in the autoconf.h file.  I can easily change these to postman.cloudmqtt.com and 25245 respectively.  The CloudMQTT site also requires a username and password.  Unfortunately your autoconf.h file does not have fields for these.  I do find them in a separate file ncs/nrf/subsys/net/lib/nrf.cloud/src/nrf_cloud_transport.c line 438.  I change these to username kejopksv and password 9MHHL2E6FAUV. I build and download to the DK fine but get an error 111 in the terminal output.  What am I missing?  The parameters above work just fine with MQTT.fx so I know the postman.cloudmqtt.com broker is working fine.

    A secondary question is the autoconf.h file gets re-written with default values every time I exit Segger and get back in even though I save it.  Where is the default host name and port coming from?

Parents
  • Hello,

    What am I missing?

    You need to make the changes to nrf\subsys\net\lib\nrf_cloud\Kconfig or the .conf file in your project, and not autoconf.h, since it is automatically generated after each build. The username and passwords are modified correctly as far as I know.

     

    A secondary question is the autoconf.h file gets re-written with default values every time I exit Segger and get back in even though I save it.  Where is the default host name and port coming from?

     See the above answer.

  • I changed the Kconfig file as you suggested, closed and reopened the solution, and rebuilt.  None of the changes were made to the autoconf.h file. The Tag remains 16842753, Port 8883, and Hostname

    a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com.  I flashed the DK, reset, and data makes it the your nrf Cloud site just fine.  I checked and the Kconfig file still has my changes in it but does not change the autoconfig.h file.

Reply
  • I changed the Kconfig file as you suggested, closed and reopened the solution, and rebuilt.  None of the changes were made to the autoconf.h file. The Tag remains 16842753, Port 8883, and Hostname

    a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com.  I flashed the DK, reset, and data makes it the your nrf Cloud site just fine.  I checked and the Kconfig file still has my changes in it but does not change the autoconfig.h file.

Children
Related