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

nRF9160 lwm2m registeration, how to add option(others)?

SDK: NCS 1.4.0

board: nRF9160-DK

sample: lwm2m_client

registration CoAP packet

options => {
    "if_match_list": null,
    "uri_host": null,
    "etag_list": null,
    "if_none_match": false,
    "uri_port": null,
    "location_path_list": null,
    "uri_path_list": [
        "rd"
    ],
    "content_format": 40,
    "max_age": null,
    "uri_query_list": [
        "lwm2m=1.0",
        "",
        "lt=86400"
    ],
    "accept": -1,
    "location_query_list": null,
    "proxy_uri": null,
    "proxy_scheme": null,
    "block1": null,
    "block2": null,
    "size1": null,
    "size2": null,
    "observe": null,
    "others": null,  <--- Here

In option enum, there is no "others". Where can I get this information?

enum coap_option_num {
 COAP_OPTION_IF_MATCH = 1,
 COAP_OPTION_URI_HOST = 3,
 COAP_OPTION_ETAG = 4,
 COAP_OPTION_IF_NONE_MATCH = 5,
 COAP_OPTION_OBSERVE = 6,
 COAP_OPTION_URI_PORT = 7,
 COAP_OPTION_LOCATION_PATH = 8,
 COAP_OPTION_URI_PATH = 11,
 COAP_OPTION_CONTENT_FORMAT = 12,
 COAP_OPTION_MAX_AGE = 14,
 COAP_OPTION_URI_QUERY = 15,
 COAP_OPTION_ACCEPT = 17,
 COAP_OPTION_LOCATION_QUERY = 20,
 COAP_OPTION_BLOCK2 = 23,
 COAP_OPTION_BLOCK1 = 27,
 COAP_OPTION_SIZE2 = 28,
 COAP_OPTION_PROXY_URI = 35,
 COAP_OPTION_PROXY_SCHEME = 39,
 COAP_OPTION_SIZE1 = 60,
 };

Related