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

Hostname in nrfConnect settings is not set when running code

I have set the host name to my aws thing endpoint name per the instructions on the following link

developer.nordicsemi.com/.../README.html

but the hostname ends up blank as you can see in the watch window at the breakpoint

and the settings are show below

and a search on the name in files finds it set in the zephyr.elf and other generated files

Why is the hostname blank?

Parents Reply Children
  • I also can use the simple MQTT Sample and change the desired broker (using nrfConnect Settings) to mqtt.dashboard.mqtt.com and publish messages 

  • Hello. I just tested the aws_fota example, and initially (without any modifications) I saw the same behavior as you did. What project settings is the screenshot in your original post from? Menuconfig, mcuboot_menuconfig or spm_menuconfig?

    I tried to set Menuconfig -> ticked of Optimize debugging experience -> pressed Configure:

    And then I can see the hostname pointer:

    Are you sure you selected menuconfig? And that you have not saved the project settings? Please check whether that option is still set.

  • I specifically selected MenuConfig and did not select mcubott_menuconfig or spm_menuconfig. I just tested again as you suggested. And with optimization set to debug (which I had set before but maybe it did not save) I get the same result as you are

    So it them becomes a concern that optimization is preventing a constant into memory. I will be working at 12:00 Norway / 05:00 Nashville time if you can find an answer as to why the optimization is causing a problem. We need optimization working for production code. But for the time being I can get some work done.

  • Hi Edvin,

    One additional question since it relates to the reason for this support thread in the first place. I am now trying to get the AWS FOTA sample to work. If you look at the instructions in the following link:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/aws_fota/README.html#configuring

    You will see that in step 13 it mentions uploading the json format file created in step 11. Is the json format file to be uploaded to the same S3 bucket as the app_update.bin file or if it is to be uploaded into a new S3 bucket?

  • hmichel said:
    So it them becomes a concern that optimization is preventing a constant into memory.

     Optimization is not actually causing any problems. I believe that the compiler sees that it doesn't actually need to push this variable to the stack, but pushes it right to the register that it is being used, which is why you don't see it while debugging. 

     

    hmichel said:
    You will see that in step 13 it mentions uploading the json format file created in step 11. Is the json format file to be uploaded to the same S3 bucket as the app_update.bin file or if it is to be uploaded into a new S3 bucket?

     I see that it is a bit confusing since you are asked to log in twice (step 7 and 12), but you should be able to store it in the same S3 bucket. This is only a file management system, so for the example, it shouldn't require you to use another S3 bucket.

    Best regards,

    Edvin

Related