[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tinydtls-dev] Feedback trying to use tinyDTLS with Contiki 2.7
|
Ii again,
I proposed changes on gerrit. With these, I can use tinydtls as is in my
contiki repository.
All the configuration for contiki now resides in
platform-specific/platform.h, tinydtls.h is static, almost empty and
included in place of dtls_config.h
Also, I added commits which removes, at the end, all the platform
specific code: (not tested on these platforms !)
* set SHA2_USE_INTTYPES by default for contiki as set for all platforms
defined in Makefile.
* Set BYTE_ORDER/LITTLE_ENDIAN/BIG_ENDIAN from contiki/uip values
* Set HAVE_ASSERT_H by default. Asserts can still be disabled by using
NDEBUG or defining an empty 'assert' macro.
* Removed the 'ssize_t' definition for sky platform as it's unused in
the repository (except in non-contiki file tests/dtls-client.c)
This will need testing of course, I just wanted to propose modifications.
Regards,
Gaëtan
On 12/09/2016 12:43 PM, Gaëtan Harter wrote:
Hi everyone,
I'm thinking of trying to integrate tinydtls as close as possible to
contiki.
For this I would like to use it without running autoreconf ./configure
options.
Just clone it in "contiki/apps/tinydtls" and start using it (maybe
even as a submodule in the official repository ?).
When compiling with contiki, a "CONTIKI" flag is defined, which could
be used to detect contiki mode automatically and set "WITH_CONTIKI"
for the sources files.
When packaging tinydtls in contiki, I also needed an option to run
./configure --without-ecc or --without-psk.
So this configuration could be let on contiki build system
responsability.
For this, I would make tinydtls.h static, remove the ECC/PSK define in
there, and include either a dtls_config_contiki.h or the generated
dtls_config.h.
By doing this, I would only loose the generated PACKAGE_ variables in
Contiki.
These PACKAGE_ variable could be manually set in
dtls_config_contiki.h, or just enclose the debug functions using them
with #ifdef.
This depends if the maintainer wants to update both autoconf and
header file values, or if the VERSION variable are not that important
for contiki mode.
In the dtls_config_contiki.h, there would be "TINYDTLS_CONF_WITH_ECC"
variables to overwrite WITH_ECC, and include the platform-specific stuff.
From what I see, the dls_config_contiki.h would even only be
platform-specific/platform.h with new variables because CONF variables
should be after '#include "contiki.h"'.
What do you think of this and the way of doing it ?
I will do a proposal on Gerrit when I have something done.
Regards,
Gaëtan
On 12/05/2016 02:32 PM, Gaëtan Harter wrote:
Hi all developers,
I posted the changes I did on gerrit one commit at a time.
The most important changes are I think:
* The fix for "peer.h" https://git.eclipse.org/r/86360
* The fix for contiki "dtls_retransmit_process"
https://git.eclipse.org/r/86351
These are real issues that makes the code crash without knowing why.
The others are easily fixable when using tinydtls in your application
but prevent it to work out of the box without warning.
Please give me feedback on these changes.
I can rebase any moment if needed.
Regards,
Gaëtan Harter
On 12/01/2016 04:45 PM, Gaëtan Harter wrote:
Hi Raul, developers,
On 11/29/2016 04:13 PM, Raul Fuentes wrote:
Hi Gaëtan,
Now after some time, the client and server get stuck I will try to
see why.
I have noticed this also with my implementation over RIOT. There
is a point where the server is unable to accept new DTLS sessions
(around the sixth time a node tries to establish a DTLS session
with PSK). My theory is that the DTLS session are not cleaning
properly the memory released from previous DTLS sessions.
For the "getting stuck" status, it was that the first ClientHello
was received by the server but not the second.
The second is a bit bigger than the first one and it was a size limit.
It was only a problem of my border-router UIP_CONF_BUFFER_SIZE that
was not set and so was not big enough.
Setting it to 1500 fixed everything.
Communication with both PSK and ECC is now working with one client
and one server.
However with ECC, connection is really slow on our hardware so maybe
not really usable in practice.
I did not tested long time usage for the moment however.
For the problems of include I mentioned before, I choose to include
dtls_config.h in tinydtls.h and include tinydtls.h in almost all
headers.
Now it's both working with utash and without.
I will give more feedback if I find new issues or have good news
while using it more.
Regards,
Gaëtan Harter
Sincerely, Raul Fuentes
_______________________________________________
tinydtls-dev mailing list
tinydtls-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tinydtls-dev
_______________________________________________
tinydtls-dev mailing list
tinydtls-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tinydtls-dev
_______________________________________________
tinydtls-dev mailing list
tinydtls-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tinydtls-dev