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

Modify Asset Tracker v2 without AWS (NCS v1.5.0)

Hi.

Is it possible to modify the Asset Tracker v2 example to work without AWS entirely in NCS v.1.5.0? or is it a lost cause?

Was thinking about combining UDP samples for communication with a private server.

Have tried turning off some of the AWS settings in prj.conf, but I only end up with build errors.

Thank you in advance ;)

Parents Reply Children
  • Thank you for the reply Slight smile

    My bad. Was planning on setting up a connection to a private server using CoAP. I wanted to add this a module in the Asset Tracker v2 example, since I need a lot of the functionality that the example uses for my own project.

    But I also need to disable the AWS functionality, since I won't be needing AWS as a cloud communication service.

  • I also get this error message after running west build with most of the AWS IoT settings turned off in prj.conf

    FAILED: zephyr/zephyr_prebuilt.elf
    cmd.exe /C "cd . && C:\Users\patricab\ncs\v1.5.0\toolchain\opt\bin\arm-none-eabi-gcc.exe    @CMakeFiles\zephyr_prebuilt.rsp  -o zephyr\zephyr_prebuilt.elf  && cd ."
    Memory region         Used Size  Region Size  %age Used
               FLASH:      145152 B     409088 B     35.48%
                SRAM:       67216 B     178968 B     37.56%
            IDT_LIST:         152 B         2 KB      7.42c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `cloud_wrap_event_handler':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:238: undefined reference to `cloud_codec_decode_config'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `connect_cloud':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:422: undefined reference to `cloud_wrap_connect'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `setup':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:452: undefined reference to `cloud_wrap_init'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `config_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:341: undefined reference to `cloud_wrap_state_send'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `config_get':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:359: undefined reference to `cloud_wrap_state_get'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `batch_data_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:371: undefined reference to `cloud_wrap_batch_send'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `ui_data_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:389: undefined reference to `cloud_wrap_ui_send'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(cloud_module.c.obj): in function `data_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/cloud_module.c:323: undefined reference to `cloud_wrap_data_send'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(data_module.c.obj): in function `config_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/data_module.c:589: undefined reference to `cloud_codec_encode_config'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(data_module.c.obj): in function `data_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/data_module.c:510: undefined reference to `cloud_codec_encode_data'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/data_module.c:547: undefined reference to `cloud_codec_encode_batch_data'
    c:/users/patricab/ncs/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(data_module.c.obj): in function `data_ui_send':
    C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build/../src/modules/data_module.c:620: undefined reference to `cloud_codec_encode_ui_data'
    collect2.exe: error: ld returned 1 exit status
    %
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\Users\patricab\ncs\v1.5.0\toolchain\opt\bin\cmake.EXE' --build 'C:\Users\patricab\ncs\v1.5.0\nrf\applications\asset_tracker_v2\build'
    

  • Hi,

     

    patricab said:
    My bad. Was planning on setting up a connection to a private server using CoAP. I wanted to add this a module in the Asset Tracker v2 example, since I need a lot of the functionality that the example uses for my own project.

    I still think you're going down the least easy path here. If you provide more information towards the specific server/service you're planning to connect to, I might be able to give you better advice.

    Which web service are you going to connect to? If its a private server that uses CoAP, you might want to look at the "coap_client" sample. Is this a LWM2M server you're connecting to? LWM2M uses CoAP, and adds logic on top.

     

    Kind regards,

    Håkon

  • Hi. Sorry for the long reply. 

    Found a patch that solved my problem: https://github.com/simensrostad/fw-nrfconnect-nrf/commit/c07fe56cf477f9a27bef22fb66c071fd10de0769

    Yep, running a local LWM2M server that I want to connect to. Looking into the coap_client sample right now.

    I have to modify the data module to send data through CoAP to my LWM2M server, but it should be doable.

    Thanks for the help ;)

Related