contiki-os / contiki

The official git repository for Contiki, the open source OS for the Internet of Things
http://www.contiki-os.org/
Other
3.72k stars 2.58k forks source link

CoAP does not work with llsec #2471

Open amitbhanja opened 6 years ago

amitbhanja commented 6 years ago

Hi,

I have one rpl border router and a base station. The border router is running on raspberry pi. There exists also nodejs script which holds firmware binary of size of around 80KB, which has to be sent to leaf node. I have configured to send 64 bytes at once.

however, when leaf node asks for the start of the transfer from the first byte, the nodejs receives the coap get request and responds. However on the leaf node, I get the following error.

*** Failed to store N-fragment - could not find session - tag: 13 offset: 14. I am not clear till now what the error is about.

The configuration for both the nodes:

define NETSTACK_CONF_MAC csma_driver

define NETSTACK_CONF_RDC contikimac_driver

//#define NETSTACK_CONF_RDC contikimac_driver

define NETSTACK_CONF_RDC_CHANNEL_CHECK_RATE 8

undef UIP_CONF_TCP

define UIP_CONF_TCP 0

define RPL_CONF_LEAF_ONLY 1

define RPL_CONF_PROBING_INTERVAL (600 * CLOCK_SECOND)

define UIP_CONF_ROUTER 0

define NETSTACK_CONF_WITH_IPV6 1

define UIP_CONF_IP_FORWARD 0

define CC26XX_UART_CONF_ENABLE 1 //Enable/Disable UART I/O

define RF_CHANNEL 26

// configurations for security feature

undef LLSEC802154_CONF_ENABLED

define LLSEC802154_CONF_ENABLED 1

undef NETSTACK_CONF_FRAMER

define NETSTACK_CONF_FRAMER noncoresec_framer

undef NETSTACK_CONF_LLSEC

define NETSTACK_CONF_LLSEC noncoresec_driver

undef NONCORESEC_CONF_SEC_LVL

define NONCORESEC_CONF_SEC_LVL 0x05

define NONCORESEC_CONF_KEY { 0x01 , 0x12 , 0x24 , 0x37 , \

                     0x48 , 0x55 , 0x66 , 0x7A , \
                     0x90 , 0xE9 , 0xDA , 0xCB , \
                     0x01 , 0xDA , 0xEF , 0xCF }

define RDC_CONF_HARDWARE_ACK 1

// OTA configurations /---------------------------------------------------------------------------/ / COAP / /---------------------------------------------------------------------------/

undef UIP_CONF_BUFFER_SIZE

define UIP_CONF_BUFFER_SIZE 1280

/ Increase rpl-border-router IP-buffer when using more than 64. /

undef REST_MAX_CHUNK_SIZE

define REST_MAX_CHUNK_SIZE 256

/ Multiplies with chunk size, be aware of memory constraints. /

undef COAP_MAX_OPEN_TRANSACTIONS

define COAP_MAX_OPEN_TRANSACTIONS 4

/ Filtering .well-known/core per query can be disabled to save space. /

undef COAP_LINK_FORMAT_FILTERING

define COAP_LINK_FORMAT_FILTERING 0

undef COAP_PROXY_OPTION_PROCESSING

define COAP_PROXY_OPTION_PROCESSING 0

Please provide some information about the reason and what could be done to avoid.

amitbhanja commented 6 years ago

@kkrentz , can you give some input regarding the above.