Re: [core] CoAP over Serial URLs

Carsten Bormann <cabo@tzi.org> Thu, 15 December 2016 05:47 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7D88A12955F for <core@ietfa.amsl.com>; Wed, 14 Dec 2016 21:47:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YxsvOO6lWKz8 for <core@ietfa.amsl.com>; Wed, 14 Dec 2016 21:47:27 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1A1B7128DF6 for <core@ietf.org>; Wed, 14 Dec 2016 21:47:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [134.102.201.11]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id uBF5lN0I022310; Thu, 15 Dec 2016 06:47:23 +0100 (CET)
Received: from [192.168.217.102] (p5DC7E34C.dip0.t-ipconnect.de [93.199.227.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 3tfMsR1zXjz8Kl4; Thu, 15 Dec 2016 06:47:23 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAOzLvV5rJB8F1LowHaveLYnRvX8-e6k3EQknyxbAz3BjS3yo3A@mail.gmail.com>
Date: Thu, 15 Dec 2016 06:47:24 +0100
X-Mao-Original-Outgoing-Id: 503473644.272101-97d89d11fc66e3e40b5b73207df67bc5
Content-Transfer-Encoding: quoted-printable
Message-Id: <C90477BA-D5C1-4A51-AA56-5B1505156A83@tzi.org>
References: <CAOzLvV5rJB8F1LowHaveLYnRvX8-e6k3EQknyxbAz3BjS3yo3A@mail.gmail.com>
To: Tobias Kaupat <tobias.kaupat@lobaro.de>
X-Mailer: Apple Mail (2.3251)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/L65x8oigRFWFTJf7nEd_k66kiAQ>
Cc: core@ietf.org
Subject: Re: [core] CoAP over Serial URLs
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Dec 2016 05:47:29 -0000

Hi Tobias,


> On 14 Dec 2016, at 19:30, Tobias Kaupat <tobias.kaupat@lobaro.de> wrote:
> 
> Hi all,
> I'm implementing CoAP over a serial RS232 connection

Interesting — we had a brief discussion about this at the T2TRG meeting in Ludwigsburg, and I’d sure like to know more about this.

> and wondering about the URL format.

When we started to think about the bluetooth URI format (draft-bormann-t2trg-ble-uri) we ran into a similar discussion.  A URI for a “local interconnect” isn’t really a “U”RI, as its meaning is dependent on that local context.  There is precedence in the file:// URI, but there is still some uneasiness around.  (There are also authority-based URIs with link-local addresses; similar problem.)

> For CoAP over SMS they use a separate scheme "coap+sms" (see: https://www.ietf.org/archive/id/draft-becker-core-coap-sms-gprs-05.txt) so I just took "coap+rs232" for my case.

Are the voltage levels on the serial line (which is what “RS232" is about) really important?
Do you need a different URI for TTL-level UARTs?  Maybe more like coap+serial or coap+uart.

How do you decide the bit rate?  The CoAP over Serial specification could align on a strong default (say, 115200 bit/s as in 6lobac), but there may occasionally be a need to deviate even from such a strong default.

> So far the only question I have is: Is there already some other URL scheme defined that I'm not aware of?

Not for serial.

> The actual question is regarding the Host. A serial connection is usually a file handle. For Windows something like "COM3" is just fine. On Linux based systems I have to connect to "/dev/ttyS3" which gets more problematic when encoding in URLs. What is the best way to deal with the slash characters?
> 
> 
> https://tools.ietf.org/html/rfc3986#page-21 restricts percent encoding of ASCII characters in the host part but allows system specific host lookups. Thats why I came up with an Implementation that implicitly adds the prefix "/dev/" to the host part of the URL before opening the connection on Linux systems.

That is probably the right approach.  Again, compare the link-local addresses which would need a % character (which need to percent-encoded) — endless discussion.

I’m definitely interested in also nailing down the data format over serial.  Let’s discuss this tomorrow...

Grüße, Carsten