Menu

#38 How to run tinyDLTS by Cooja in instantContiki2.7?

1.0
open
nobody
None
2015-12-10
2015-10-11
Feynman
No

I extract the tinydtls-0.8.2.tar.gz file to ~/contiki/apps/tinydtls, then use ./configure -with-contiki, and edit both the /tinydtls-0.8.2/Makefile and examples/contiki/Makefile by adding APPS += tinydtls/aes tinydtls/sha2 tinydtls/ecc tinydtls.

What is the true place should i add " APPS += tinydtls/aes tinydtls/sha2 tinydtls/ecc tinydtls"? The Makefile in tinyDTLS/examples/contiki is attached.

But when i complie the example/dtls-client.c as sky mote or wismote mote,it comes some error in the following picture.
I am much nervous and really want to run tinyDTLS by Cooja.Any help will be sincerely appreciated.
Look forward your help,thanks a lot.

2 Attachments

Related

Tickets: #38

Discussion

  • Feynman

    Feynman - 2015-10-11

    I find out that many people suggest to remove the -g option in contiki/cpu/msp40/Makefile.msp430,but the directory in my computer is contiki/cpu/msp430/Makefile.msp430,and the -g option is already removed.

    Seems that the reason is the project is too big to run on sky mote,so i must decrease the size like commend out some debug?

     
    • rfuentess

      rfuentess - 2016-01-20

      Hello, after the long holidays I return to work with Contiki, CoAP and TinyDTLS.
      TinyDTLS is free of any fault with the compilation (though you need be careful if you are using the "native" platform).

      One big suggestion: Do not try to upgrade your instant contiki 2.7 V.M. to support Contiki 3.0; at least that you are an expert with Git and sub-modules and other dark references of Git. With a clean copy of Instant Contiki 3.0 the TinyDTLS examples are able to run (Though I moved them from the tinydtsl folder to contiki/examples).

      HOWEVER, if your plan is running uIPv6 (with RPL) + DTLS + CoAP (or CoAPS over 6LoWPAN), you are out of luck. Is just too much for them. I was able to compile (with optimization) for wismote, but I'm still in beta with CoAPS.

      P.d. TinyDTLS already try to make the most possible optimization with its Makefile.tinydtls

       
      • foram

        foram - 2016-02-08

        Hello sir . i am try to making tinydtls but getting this error please help
        me

        os:-instant contiki 2.5 ubuntu 12.04
        tinydtls-master

        thank you

        foram

        user@ubuntu:~/contiki/apps/tinydtls-master$ make
        TARGET not defined, using target 'native'
        gcc -DHARD_CODED_ADDRESS=\"aaaa::02:232\" -ffunction-sections
        -DUIP_CONF_TCP=0 -DSHA2_USE_INTTYPES_H -DCONTIKI=1
        -DCONTIKI_TARGET_NATIVE=1 -Wall -g -I/usr/local/include -O -I.
        -I../../platform/native/. -I../../platform/native/dev -I../../cpu/native/.
        -I../../cpu/native/net -I../../core/dev -I../../core/lib -I../../core/net
        -I../../core/net/mac -I../../core/net/rime -I../../core/net/rpl
        -I../../core/sys -I../../core/cfs -I../../core/ctk -I../../core/lib/ctk
        -I../../core/loader -I../../core/. -I../../platform/native/
        -DCONTIKI_VERSION_STRING=\"Contiki-2.5-release-532-gc1b3183\"
        -DAUTOSTART_ENABLE -c dtls-server.c -o dtls-server.co
        In file included from ../../core/./contiki.h:39:0,
        from dtls-server.c:30:
        ../../platform/native/./contiki-conf.h:71:0: warning: "UIP_CONF_TCP"
        redefined [enabled by default]
        <command-line>:0:0: note: this is the location of the previous definition
        In file included from dtls.h:41:0,
        from dtls-server.c:44:
        peer.h:88:35: warning: ‘struct dtls_context_t’ declared inside parameter
        list [enabled by default]
        peer.h:88:35: warning: its scope is only this definition or declaration,
        which is probably not what you want [enabled by default]
        dtls-server.c: In function ‘print_local_addresses’:
        dtls-server.c:126:18: error: ‘UIP_DS6_ADDR_NB’ undeclared (first use in
        this function)
        dtls-server.c:126:18: note: each undeclared identifier is reported only
        once for each function it appears in
        dtls-server.c:127:13: error: ‘uip_ds6_if’ undeclared (first use in this
        function)
        dtls-server.c:129:18: error: ‘ADDR_TENTATIVE’ undeclared (first use in this
        function)
        dtls-server.c:129:45: error: ‘ADDR_PREFERRED’ undeclared (first use in this
        function)
        make: *** [dtls-server.co] Error 1
        user@ubuntu:~/contiki/apps/tinydtls-master$</command-line>

        On Wed, Jan 20, 2016 at 8:39 PM, rfuentess rfuentess@users.sf.net wrote:

        Hello, after the long holidays I return to work with Contiki, CoAP and
        TinyDTLS.
        TinyDTLS is free of any fault with the compilation (though you need be
        careful if you are using the "native" platform).

        One big suggestion: Do not try to upgrade your instant contiki 2.7 V.M. to
        support Contiki 3.0; at least that you are an expert with Git and
        sub-modules and other dark references of Git. With a clean copy of Instant
        Contiki 3.0 the TinyDTLS examples are able to run (Though I moved them from
        the tinydtsl folder to contiki/examples).

        HOWEVER, if your plan is running uIPv6 (with RPL) + DTLS + CoAP (or CoAPS
        over 6LoWPAN), you are out of luck. Is just too much for them. I was able
        to compile (with optimization) for wismote, but I'm still in beta with
        CoAPS.

        P.d. TinyDTLS already try to make the most possible optimization with its
        Makefile.tinydtls


        Status: open
        Milestone: 1.0
        Created: Sun Oct 11, 2015 10:26 AM UTC by Feynman
        Last Updated: Thu Dec 10, 2015 01:51 PM UTC
        Owner: nobody
        Attachments:

        I extract the tinydtls-0.8.2.tar.gz file to ~/contiki/apps/tinydtls, then
        use ./configure -with-contiki, and edit both the /tinydtls-0.8.2/Makefile
        and examples/contiki/Makefile by adding APPS += tinydtls/aes tinydtls/sha2
        tinydtls/ecc tinydtls.

        What is the true place should i add " APPS += tinydtls/aes tinydtls/sha2
        tinydtls/ecc tinydtls"? The Makefile in tinyDTLS/examples/contiki is
        attached.

        But when i complie the example/dtls-client.c as sky mote or wismote
        mote,it comes some error in the following picture.
        I am much nervous and really want to run tinyDTLS by Cooja.Any help will
        be sincerely appreciated.
        Look forward your help,thanks a lot.


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/tinydtls/tickets/38/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        Foram Suthar
        TA CSE(NT) Dept,
        Institute of Technology,
        Nirma University, Ahmedabad

         

        Related

        Tickets: #38

        • rfuentess

          rfuentess - 2016-02-08

          Hello Foram,

          Seems that you are still trying to learn to use Contiki (which honestly, is not easy task).

          When you are compiling any mote program for Contiki your make should have the TARGET clause (if you are using Cooja you can see that runs those makes when load the simulation and when adding new motes).

          TinyDTLS for Contiki is an app not a program, therefore the make you are running in the TinyDTLS' directory is useless. HOWEVER, because TinyDTLS original target was TinyOS and Linux's kernels you need to compile the code for Contiki (the --with-contiki argument) but this is made only one time and its covered in the TinyDTLS tutorial and the first post of this topic.

          Try to follow the tutorial for installing (configuring is a better term) TinyDTLS for Contiki and try to generate a simulation using the examples of TinyDTLS with either Wissmotes or Z1 motes, they have enough space for the default program.

           
          • foram

            foram - 2016-02-08

            Thank you so much .

            On Monday, February 8, 2016, rfuentess rfuentess@users.sf.net wrote:

            Hello Foram,

            Seems that you are still trying to learn to use Contiki (which honestly,
            is not easy task).

            When you are compiling any mote program for Contiki your make should
            have the TARGET clause (if you are using Cooja you can see that runs
            those makes when load the simulation and when adding new motes).

            TinyDTLS for Contiki is an app not a program, therefore the make you
            are running in the TinyDTLS' directory is useless. HOWEVER, because
            TinyDTLS original target was TinyOS and Linux's kernels you need to compile
            the code for Contiki (the --with-contiki argument) but this is made
            only one time and its covered in the TinyDTLS tutorial and the first post
            of this topic.

            Try to follow the tutorial for installing (configuring is a better term)
            TinyDTLS for Contiki and try to generate a simulation using the examples of
            TinyDTLS with either Wissmotes or Z1 motes, they have enough space for the
            default program.


            Status: open
            Milestone: 1.0
            Created: Sun Oct 11, 2015 10:26 AM UTC by Feynman
            Last Updated: Thu Dec 10, 2015 01:51 PM UTC
            Owner: nobody
            Attachments:

            I extract the tinydtls-0.8.2.tar.gz file to ~/contiki/apps/tinydtls, then
            use ./configure -with-contiki, and edit both the /tinydtls-0.8.2/Makefile
            and examples/contiki/Makefile by adding APPS += tinydtls/aes tinydtls/sha2
            tinydtls/ecc tinydtls.

            What is the true place should i add " APPS += tinydtls/aes tinydtls/sha2
            tinydtls/ecc tinydtls"? The Makefile in tinyDTLS/examples/contiki is
            attached.

            But when i complie the example/dtls-client.c as sky mote or wismote
            mote,it comes some error in the following picture.
            I am much nervous and really want to run tinyDTLS by Cooja.Any help will
            be sincerely appreciated.
            Look forward your help,thanks a lot.


            Sent from sourceforge.net because you indicated interest in
            https://sourceforge.net/p/tinydtls/tickets/38/

            To unsubscribe from further messages, please visit
            https://sourceforge.net/auth/subscriptions/

            --
            Foram Suthar
            TA CSE(NT) Dept,
            Institute of Technology,
            Nirma University, Ahmedabad

             

            Related

            Tickets: #38

  • Feynman

    Feynman - 2015-10-11

    Some people also suggest to simulate as Z1 mote instead of sky mote because Z1 mote has more space of ROM. However the code it's still too big.It turns out the region 'rom' overflowed by 28674 bytes,while the region 'rom' overflowed by 36306 bytes on sky mote.

    I think i must reduce code .

    Do you meet this problem when you run tinyDTLS in instantContiki? Maybe i use a wrong way to run?
    Could you please tell me the right way to run tinyDTLS in instantContiki?
    I am really nervous,thank you

     
  • Feynman

    Feynman - 2015-10-12

    I'v tried all kinds of motes in instantContiki,and find out that examples/contiki/dtls-server.c dtls-client.c could be compiled successfuly in "Cooja Mote" and "exp5438 mote".

    But when i begin simulation,the display of "Mote output "window stops at 1s while the "network window" is still running.So i can't read the detailed output of each motes and don't know what's happening.
    How to keep the "Mote output"window displaying?
    BTW,what's the difference of sky,wismote,conja,exp5438 motes?I try to search by bing,but don't find userful answer :(

     
  • rfuentess

    rfuentess - 2015-11-17

    Hello,

    I'm having exactly the same problem with Contiki 3.0 and TinyDTLS 0.8.2.
    The cooja mote is a virtual mode but not physically possible.

     
  • TechProj

    TechProj - 2015-11-21

    I am having exactly the same problem as described in the original ticket (above) and by all that replied. Is there something missing in the instructions on how to install and test DTLS examples in Cooja? I tried pretty much everything, no success. I wonder if someone could share tips/tricks to help resolve this problem with TinyDLS and Cooja examples.

    Fernando

     
  • foram

    foram - 2015-12-03

    i am facing error in below picture after compile example/dtls-client.c as sky mote .please help me .thank you

     
  • rfuentess

    rfuentess - 2015-12-10

    From the work in Lithe [1] (Contiki 2.6 and probably TinyDTLS 0.4.0) seem that before Wissmotes were able to fit the program, but not Sky motes (Though could be after the heavy modifications from that project).

    So, maybe the problem is truly Conitki 2.7/3.0 and not TinyDTLS current version.

    [1] http://shahidraza.info/ (more specific http://www.shahidraza.info/resources/CoAP-DTLS.zip )

     
Monday.com Logo