Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wakaama-dev] COAP over TCP/TLS

A runtime switch is proving to be more difficult than I had first imagined.  The binding, as it turns out, is not propagated to all areas of the code.  Erbium, for example, doesn't know what transport it is bound to.  Unfortunately, the COAP packet format for TCP is slightly different than for other bindings, so the serialization code needs to know what transport is being used.  We could certainly get the binding information down to the serialization code, but it means lots of extra plumbing to store it in various structures and pass it down.  If a runtime switch was a "requirement", it might be worth it.  Since it's currently a "nice to have", I can't justify the extra expense.  

I'm falling back to a compile-time switch for now.  We can certainly revisit this in the future if needs evolve.

-Bert

-----Original Message-----
From: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx] On Behalf Of Kraus Achim (INST/ESY1)
Sent: Wednesday, May 11, 2016 12:54 AM
To: Wakaama developer discussions <wakaama-dev@xxxxxxxxxxx>
Subject: Re: [wakaama-dev] COAP over TCP/TLS

Hi Bert,

> My intuition says that it would be more than a few but less than a hundred lines.

OK, so I would go for the switch.


Mit freundlichen Grüßen / Best regards

Achim Kraus

Bosch Software Innovations GmbH
Communications (INST/ESY1)
Stuttgarter Straße 130
71332 Waiblingen
GERMANY
https://na01.safelinks.protection.outlook.com/?url=www.bosch-si.de&data=01%7c01%7cbertk%40microsoft.com%7c0127f5868ba245a3ff6e08d379717711%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=84gxVAXu49FlmMmjxnIsgTxdLq8xENZWd9G%2fYXRUuk8%3d
https://na01.safelinks.protection.outlook.com/?url=www.blog.bosch-si.com&data=01%7c01%7cbertk%40microsoft.com%7c0127f5868ba245a3ff6e08d379717711%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=lC10qxBmJTsh1GGJjPrPhdHnTZGu4SM%2fJeNPcbfMgCI%3d 

Tel. +49 711 811-58139

Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B
Executives: Dr.-Ing. Rainer Kallenbach; Michael Hahn


-----Ursprüngliche Nachricht-----
Von: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx] Im Auftrag von Bert Kleewein
Gesendet: Dienstag, 10. Mai 2016 19:36
An: Wakaama developer discussions
Betreff: Re: [wakaama-dev] COAP over TCP/TLS

Hi Achim, 

In terms of code size, the cost comes in the different packet size between UDP and TCP.  The RFC below changes the COAP packet structure for TCP.  In particular, the message ID is removed from the packet, but I believe there are other changes.  I believe that this would be an easy change to the serialization code.

My intuition says that it would be more than a few but less than a hundred lines.

-Bert

-----Original Message-----
From: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx] On Behalf Of Kraus Achim (INST/ESY1)
Sent: Tuesday, May 10, 2016 3:31 AM
To: Wakaama developer discussions <wakaama-dev@xxxxxxxxxxx>
Subject: Re: [wakaama-dev] COAP over TCP/TLS

Hi Bert,

> My question is this:  What is the community preference for switching between TCP and UDP?  Would a run-time switch (via the lwm2m_binding_t enum) or a build-time switch (via #define) be preferred?

>From my personal view, this depends on the size the firmware-images will get larger using a switch instead of the #define/#if.
Are there just a few different lines or is the difference larger (several hundred lines)?
 
Mit freundlichen Grüßen / Best regards

Achim Kraus

Bosch Software Innovations GmbH
Communications (INST/ESY1)
Stuttgarter Straße 130
71332 Waiblingen
GERMANY
https://na01.safelinks.protection.outlook.com/?url=www.bosch-si.de&data=01%7c01%7cbertk%40microsoft.com%7c6b8d9fa9faf646f2757308d378be3100%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=lytl5KXxJgKJL9bIRQ4vTs3UWkH06U%2b7xpKeat4y31Q%3d
https://na01.safelinks.protection.outlook.com/?url=www.blog.bosch-si.com&data=01%7c01%7cbertk%40microsoft.com%7c6b8d9fa9faf646f2757308d378be3100%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=iSTVv%2faAPpm2YE5chf7uBkuUGZkaXCsGCb%2fR3uKZVGY%3d 

Tel. +49 711 811-58139
achim.kraus@xxxxxxxxxxxx

Registered office: Berlin, Register court: Amtsgericht Charlottenburg, HRB 148411 B
Executives: Dr.-Ing. Rainer Kallenbach; Michael Hahn


Von: wakaama-dev-bounces@xxxxxxxxxxx [mailto:wakaama-dev-bounces@xxxxxxxxxxx] Im Auftrag von Bert Kleewein
Gesendet: Dienstag, 10. Mai 2016 06:50
An: wakaama-dev@xxxxxxxxxxx
Cc: Carlos Alayo; Damon Barry; Haitham Shami
Betreff: [wakaama-dev] COAP over TCP/TLS

Hi All,

We are currently working to modify Wakaama/Erbium to support COAP over TCP/TLS (following https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2ftools.ietf.org%2fhtml%2fdraft-ietf-core-coap-tcp-tls-01&data=01%7c01%7cbertk%40microsoft.com%7c6b8d9fa9faf646f2757308d378be3100%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=yyxM3As8sRQmDCqs8VZGcSFQskX%2f%2bV8TM%2b%2fSZuRQC8Y%3d, but I assume we will upgrade to https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2ftools.ietf.org%2fhtml%2fdraft-ietf-core-coap-tcp-tls-02&data=01%7c01%7cbertk%40microsoft.com%7c6b8d9fa9faf646f2757308d378be3100%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=VpTZg5yFDQ2uZQ5eQpur4X%2f%2fjXqOIRdvcHKsS3hJhNI%3d) 

Our internal proof-of-concept currently chooses between UDP and TCP via compile-time switch (#define).  This was chosen as the path of least resistance, and it has both advantages and disadvantages.  

My question is this:  What is the community preference for switching between TCP and UDP?  Would a run-time switch (via the lwm2m_binding_t enum) or a build-time switch (via #define) be preferred?

Thanks,

-Bert

_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fdev.eclipse.org%2fmailman%2flistinfo%2fwakaama-dev&data=01%7c01%7cbertk%40microsoft.com%7c6b8d9fa9faf646f2757308d378be3100%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Wdd8Fy6iZWs8QxXGwDzA0dNL8pluxFRgKOjZHZyFlDk%3d
_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fdev.eclipse.org%2fmailman%2flistinfo%2fwakaama-dev&data=01%7c01%7cbertk%40microsoft.com%7c0127f5868ba245a3ff6e08d379717711%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=AvZ37kRUKSdhTVSosF8898jgRnRAfCQ9ILPReK0NvBo%3d
_______________________________________________
wakaama-dev mailing list
wakaama-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fdev.eclipse.org%2fmailman%2flistinfo%2fwakaama-dev&data=01%7c01%7cbertk%40microsoft.com%7c0127f5868ba245a3ff6e08d379717711%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=AvZ37kRUKSdhTVSosF8898jgRnRAfCQ9ILPReK0NvBo%3d


Back to the top