Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tinydtls-dev] handshake message not received due to long processing

Raul Fuentes <ra.fuentess.sam+tinyDTLS@xxxxxxxxx> writes:

> Is strictly required that TinyDTLs have the extra contiki thread in
> the library ? (dtls.c:4062)

This thread makes life easier for application programmers as it
automatically handles the retransmits.

> I mean, the contiki examples already create a thread, and then the
> state machine generates a second one which remains in an infinite
> cycle. I still don't get inside of the details of how Contiki handle
> its threads, so I could be missing an important point here. 

The additional thread is not an issue in the sense that it does not make
things worse. The issue is that Contiki uses cooperative multitasking,
i.e., each thread must pause itself to enable other threads to be
executed. The issue here is that the time-consuming calculations in the
ECC code unfortunately block the entire MCU until the calculation has
finished. But there is faster code known to be out there, so this can be
improved to some degree.

Grüße
Olaf


Back to the top