Клиент CoAP с использованием nRF9160DK, zephyr RTOS

Я тестирую образец клиента lwm2m на nRF9160DK с zephyr RTOS. В пакете CoAP есть опция добавления проблемы. Я не знаю, как добавить опцию под названием «другие».

      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,  <-- **this option**

Ниже нет опции «другие».

          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,
    };

Я использовал эту функцию

      int coap_packet_append_option(struct coap_packet *cpkt, uint16_t code,
                  const uint8_t *value, uint16_t len);

Кто-нибудь знает, что мне не хватает?

Спасибо.

0 ответов

Другие вопросы по тегам