simple coap sample to send data to the nrf cloud

Hi
the UDP sample is a very nice example for testing LTE Cat M and NB IoT power saving features and RAI, however, it does not show data to any cloud and it does not wait for the ACK,

Now that nRF Cloud with coap has been released, is it possible to have a simple coap sample (similar to our upd sample) that send some simple data (similar to the payload we send on the upd sample) and we can see this in the cloud (at least in the terminal interface)? 

It should be easy to optionally enable at least
PSM - and change the timers
eDRX- and change the timers 
RAI
periodic upload: how often it should send data --> timer should be easily configurable (I guess it can be selected on the device?)
push button --> to send data 
CID should be default enabled.
Device should send the data, wait for ack (coap) and then go back to sleep. 
Is there any sample available that implements this?
Thanks
Lorenzo
Parents
  • Hi, 

    Here is the PR https://github.com/nrfconnect/sdk-nrf/pull/12492

    The nrf_cloud_multi_service sample has a new overlay overlay_min_coap.conf that will hopefully meet your request.

    Regards,
    Amanda H.

  • Hi Amanda, 

    I enabled logs, but I cannot connect to the cloud. How do I add the certificates to the device ? and how do I add the device to the cloud? see the errors below. I followed same procedure as asset tracker v2.
    (I have even tried to enable CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y but at built time this is changed automatically to "n") 

    Can you try on your side?


    Thanks

    BR
    LA


    +CSCON: 0
    [00:02:43.587,493] <inf> cloud_connection: Waiting for network ready...
    [00:02:43.587,524] <inf> cloud_connection: Network is ready
    [00:02:43.587,554] <inf> cloud_connection: Connecting to nRF Cloud
    +CSCON: 1
    [00:02:44.879,211] <err> nrf_cloud_coap_transport: Connect failed : -111
    [00:02:44.880,157] <err> cloud_connection: Could not connect to nRF Cloud, error: -1
    [00:02:44.880,157] <inf> cloud_connection: Retrying in 30 seconds...
    +CSCON: 0
    [00:03:14.880,279] <inf> cloud_connection: Waiting for network ready...
    [00:03:14.880,310] <inf> cloud_connection: Network is ready
    [00:03:14.880,340] <inf> cloud_connection: Connecting to nRF Cloud
    +CSCON: 1
    [00:03:16.397,369] <err> nrf_cloud_coap_transport: Connect failed : -111
    [00:03:16.398,284] <err> cloud_connection: Could not connect to nRF Cloud, error: -1
    [00:03:16.398,315] <inf> cloud_connection: Retrying in 30 seconds...

Reply
  • Hi Amanda, 

    I enabled logs, but I cannot connect to the cloud. How do I add the certificates to the device ? and how do I add the device to the cloud? see the errors below. I followed same procedure as asset tracker v2.
    (I have even tried to enable CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y but at built time this is changed automatically to "n") 

    Can you try on your side?


    Thanks

    BR
    LA


    +CSCON: 0
    [00:02:43.587,493] <inf> cloud_connection: Waiting for network ready...
    [00:02:43.587,524] <inf> cloud_connection: Network is ready
    [00:02:43.587,554] <inf> cloud_connection: Connecting to nRF Cloud
    +CSCON: 1
    [00:02:44.879,211] <err> nrf_cloud_coap_transport: Connect failed : -111
    [00:02:44.880,157] <err> cloud_connection: Could not connect to nRF Cloud, error: -1
    [00:02:44.880,157] <inf> cloud_connection: Retrying in 30 seconds...
    +CSCON: 0
    [00:03:14.880,279] <inf> cloud_connection: Waiting for network ready...
    [00:03:14.880,310] <inf> cloud_connection: Network is ready
    [00:03:14.880,340] <inf> cloud_connection: Connecting to nRF Cloud
    +CSCON: 1
    [00:03:16.397,369] <err> nrf_cloud_coap_transport: Connect failed : -111
    [00:03:16.398,284] <err> cloud_connection: Could not connect to nRF Cloud, error: -1
    [00:03:16.398,315] <inf> cloud_connection: Retrying in 30 seconds...

Children
Related