All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jian-Hong Pan <starnight@g.ncu.edu.tw>
To: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Cc: "Andreas Färber" <afaerber@suse.de>,
	"Ben Whitten" <Ben.Whitten@lairdtech.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"<linux-arm-kernel@lists.infradead.org\\"
	<linux-arm-kernel@lists.infradead.org>,
	"Jan Jongboom" <jan.jongboom@arm.com>,
	"Konstantin Böhm" <konstantin.boehm@ancud.de>,
	"Ken Yu" <ken.yu@rakwireless.com>,
	"Dollar Chen" <dollar.chen@wtmec.com>,
	"Michael Röder" <michael.roeder@avnet.eu>,
	"Janus Piwek" <jpiwek@arroweurope.com>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"S. Miller" <davem@davemloft.net>,
	"linux-kernel@vger.kernel.org>," <contact@snootlab.com>,
	"Brian Ray" <brian.ray@link-labs.com>
Subject: Re: linux-lora.git and LoRaWAN (was: [RFC net-next 00/15] net: A socket API for LoRa)
Date: Sun, 5 Aug 2018 22:08:10 +0800	[thread overview]
Message-ID: <CAC=mGzgW2fmRAA9GxojcbiBWm_G=rWqFh2MZECu-VST20MePBg@mail.gmail.com> (raw)
In-Reply-To: <20180803150258.791b9942@alans-desktop>

Hi Alan,

2018-08-03 22:02 GMT+08:00 Alan Cox <gnomes@lxorguk.ukuu.org.uk>:
>> I'm not yet too deep into LoRaWAN, but from the AT command interfaces
>> I've seen there's confirmed and unconfirmed transmission modes that with
>> PF_LORAWAN might be mapped to SOCK_STREAM and SOCK_DGRAM. Or do you see
>> a way of doing both on a single PF_LORA SOCK_LORAWAN socket?
>
> SOCK_STREAM is not a confirmed message, but a reliable data stream where
> packet boundaries have no meaning.
>
> SOCK_SEQPACKET is a reliable ordered stream where message boundaries have
> meaning.
>
> SOCK_RDM is reliable messaging where there is no ordering.
>
> The standard socket API has no concept of a single connection doing both
> reliable and unreliable messages.

Thanks for the useful information.

LoRaWAN has 4 kinds of data messages: Unconfirmed data up/down,
Confirmed data up/down.

Unconfirmed data up/down can be mapped to SOCK_DGRAM.
Confirmed data up/down can be mapped to SOCK_SEQPACKET.  Because,
there is the FCnt (frame counter) field in frame header for the order.

Regards,
Jian-Hong Pan

>> Additionally I've been looking into socket options at PF_LORA dgram
>> layer for some radio options, but discarded that again for lack of
>> precedence. Basically I wondered whether we could allow to choose SF,
>
> I don't know if it'll stretch that far in the right directions but to the
> extent you can re-use bits of the wifi API and it makes sense it would be
> good to do so.
>
> For stuff bound to a specific socket you need to use the generic SOCK_
> stuff or you may indeed need some socket options at the PF_LORA level -
> which is fine, and the whole point of setsockopt passing layers around.
>
> Some of the existing general stuff like priority is probably quite
> useable.
>
>> bandwidth, etc. on socket level and then apply those settings before
>> sending one packet rather than expecting a global netlink operation that
>> affects all sockets for that interface.
>
> Alan

WARNING: multiple messages have this Message-ID (diff)
From: starnight@g.ncu.edu.tw (Jian-Hong Pan)
To: linux-arm-kernel@lists.infradead.org
Subject: linux-lora.git and LoRaWAN (was: [RFC net-next 00/15] net: A socket API for LoRa)
Date: Sun, 5 Aug 2018 22:08:10 +0800	[thread overview]
Message-ID: <CAC=mGzgW2fmRAA9GxojcbiBWm_G=rWqFh2MZECu-VST20MePBg@mail.gmail.com> (raw)
In-Reply-To: <20180803150258.791b9942@alans-desktop>

Hi Alan,

2018-08-03 22:02 GMT+08:00 Alan Cox <gnomes@lxorguk.ukuu.org.uk>:
>> I'm not yet too deep into LoRaWAN, but from the AT command interfaces
>> I've seen there's confirmed and unconfirmed transmission modes that with
>> PF_LORAWAN might be mapped to SOCK_STREAM and SOCK_DGRAM. Or do you see
>> a way of doing both on a single PF_LORA SOCK_LORAWAN socket?
>
> SOCK_STREAM is not a confirmed message, but a reliable data stream where
> packet boundaries have no meaning.
>
> SOCK_SEQPACKET is a reliable ordered stream where message boundaries have
> meaning.
>
> SOCK_RDM is reliable messaging where there is no ordering.
>
> The standard socket API has no concept of a single connection doing both
> reliable and unreliable messages.

Thanks for the useful information.

LoRaWAN has 4 kinds of data messages: Unconfirmed data up/down,
Confirmed data up/down.

Unconfirmed data up/down can be mapped to SOCK_DGRAM.
Confirmed data up/down can be mapped to SOCK_SEQPACKET.  Because,
there is the FCnt (frame counter) field in frame header for the order.

Regards,
Jian-Hong Pan

>> Additionally I've been looking into socket options at PF_LORA dgram
>> layer for some radio options, but discarded that again for lack of
>> precedence. Basically I wondered whether we could allow to choose SF,
>
> I don't know if it'll stretch that far in the right directions but to the
> extent you can re-use bits of the wifi API and it makes sense it would be
> good to do so.
>
> For stuff bound to a specific socket you need to use the generic SOCK_
> stuff or you may indeed need some socket options at the PF_LORA level -
> which is fine, and the whole point of setsockopt passing layers around.
>
> Some of the existing general stuff like priority is probably quite
> useable.
>
>> bandwidth, etc. on socket level and then apply those settings before
>> sending one packet rather than expecting a global netlink operation that
>> affects all sockets for that interface.
>
> Alan

  parent reply	other threads:[~2018-08-05 16:12 UTC|newest]

Thread overview: 173+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 11:07 [RFC net-next 00/15] net: A socket API for LoRa Andreas Färber
2018-07-01 11:07 ` Andreas Färber
2018-07-01 11:07 ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 01/15] net: Reserve protocol numbers " Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 02/15] net: lora: Define sockaddr_lora Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 03/15] net: lora: Add protocol numbers Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 04/15] net: Add lora subsystem Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 05/15] HACK: net: lora: Deal with .poll_mask in 4.18-rc2 Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-02 16:22   ` Jiri Pirko
2018-07-02 16:22     ` Jiri Pirko
2018-07-02 16:59     ` Andreas Färber
2018-07-02 16:59       ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 06/15] net: lora: Prepare for device drivers Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 07/15] net: lora: Add Semtech SX1276 Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 12:02   ` Andreas Färber
2018-07-01 12:02     ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 08/15] net: lora: sx1276: Add debugfs Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-02 16:26   ` Jiri Pirko
2018-07-02 16:26     ` Jiri Pirko
2018-07-02 17:57     ` Andreas Färber
2018-07-02 17:57       ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 09/15] net: lora: Prepare EUI helpers Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:07 ` [RFC net-next 10/15] net: lora: Add Microchip RN2483 Andreas Färber
2018-07-01 11:07   ` Andreas Färber
2018-07-01 11:08 ` [RFC net-next 11/15] net: lora: Add IMST WiMOD Andreas Färber
2018-07-01 11:08   ` Andreas Färber
2019-01-06 14:57   ` Heinrich Schuchardt
2019-01-06 14:57     ` Heinrich Schuchardt
2019-01-07 11:29     ` Andreas Färber
2019-01-07 11:29       ` Andreas Färber
2018-07-01 11:08 ` [RFC net-next 12/15] net: lora: Add USI WM-SG-SM-42 Andreas Färber
2018-07-01 11:08   ` Andreas Färber
2018-07-01 11:08 ` [RFC net-next 13/15] net: lora: Prepare RAK RAK811 Andreas Färber
2018-07-01 11:08   ` Andreas Färber
2018-07-01 11:08 ` [RFC net-next 14/15] net: lora: Prepare Semtech SX1257 Andreas Färber
2018-07-01 11:08   ` Andreas Färber
2018-07-01 11:08 ` [RFC net-next 15/15] net: lora: Add Semtech SX1301 Andreas Färber
2018-07-01 11:08   ` Andreas Färber
2018-07-02 11:51   ` Ben Whitten
2018-07-02 11:51     ` Ben Whitten
2018-07-03  3:01     ` Andreas Färber
2018-07-03  3:01       ` Andreas Färber
2018-07-05  8:59       ` Ben Whitten
2018-07-05  8:59         ` Ben Whitten
2018-07-05  8:59         ` Ben Whitten
2018-07-02 16:12   ` Mark Brown
2018-07-02 16:12     ` Mark Brown
2018-07-02 16:12     ` Mark Brown
2018-07-02 17:34     ` Andreas Färber
2018-07-02 17:34       ` Andreas Färber
2018-07-02 20:43       ` Ben Whitten
2018-07-02 20:43         ` Ben Whitten
2018-07-03  3:21         ` Andreas Färber
2018-07-03  3:21           ` Andreas Färber
2018-07-03  3:21           ` Andreas Färber
2018-07-05  8:43           ` Ben Whitten
2018-07-05  8:43             ` Ben Whitten
2018-07-05  8:43             ` Ben Whitten
2018-07-03 14:50       ` Mark Brown
2018-07-03 14:50         ` Mark Brown
2018-07-03 15:09         ` Andreas Färber
2018-07-03 15:09           ` Andreas Färber
2018-07-03 15:09           ` Andreas Färber
2018-07-03 15:31           ` Mark Brown
2018-07-03 15:31             ` Mark Brown
2018-07-03 15:31             ` Mark Brown
2018-07-03 16:40             ` Andreas Färber
2018-07-03 16:40               ` Andreas Färber
2018-07-04 11:43               ` Mark Brown
2018-07-04 11:43                 ` Mark Brown
2018-07-04 13:41                 ` Ben Whitten
2018-07-04 13:41                   ` Ben Whitten
2018-07-04 13:41                   ` Ben Whitten
2018-07-04 14:32                   ` Mark Brown
2018-07-04 14:32                     ` Mark Brown
2018-07-04 14:32                     ` Mark Brown
2018-07-03 15:11 ` [RFC net-next 00/15] net: A socket API for LoRa Jian-Hong Pan
2018-07-03 15:11   ` Jian-Hong Pan
2018-07-03 15:11   ` Jian-Hong Pan
2018-08-05  0:11   ` Andreas Färber
2018-08-05  0:11     ` Andreas Färber
2018-08-05  0:11     ` Andreas Färber
2018-08-08 20:36     ` Alan Cox
2018-08-08 20:36       ` Alan Cox
2018-08-08 20:36       ` Alan Cox
2018-08-08 22:42       ` Andreas Färber
2018-08-08 22:42         ` Andreas Färber
2018-08-08 22:42         ` Andreas Färber
2018-08-09 11:59         ` Alan Cox
2018-08-09 11:59           ` Alan Cox
2018-08-09 11:59           ` Alan Cox
2018-08-09 15:02           ` Jian-Hong Pan
2018-08-09 15:02             ` Jian-Hong Pan
2018-08-09 15:02             ` Jian-Hong Pan
2018-08-09 15:21             ` Alexander Aring
2018-08-09 15:21               ` Alexander Aring
2018-08-09 15:21               ` Alexander Aring
2018-08-10 15:57             ` Alan Cox
2018-08-10 15:57               ` Alan Cox
2018-08-10 15:57               ` Alan Cox
2018-08-11 18:30               ` Stefan Schmidt
2018-08-11 18:30                 ` Stefan Schmidt
2018-08-11 18:30                 ` Stefan Schmidt
2018-08-12 16:49                 ` Andreas Färber
2018-08-12 16:49                   ` Andreas Färber
2018-08-12 16:49                   ` Andreas Färber
2018-08-12 16:37               ` Jian-Hong Pan
2018-08-12 16:37                 ` Jian-Hong Pan
2018-08-12 16:37                 ` Jian-Hong Pan
2018-08-12 17:59                 ` Andreas Färber
2018-08-12 17:59                   ` Andreas Färber
2018-08-12 17:59                   ` Andreas Färber
2018-08-13 12:36                   ` Alan Cox
2018-08-13 12:36                     ` Alan Cox
2018-08-13 12:36                     ` Alan Cox
2018-08-09 15:12           ` Alexander Aring
2018-08-09 15:12             ` Alexander Aring
2018-08-09 15:12             ` Alexander Aring
2018-08-09 15:12             ` Alexander Aring
2018-08-09  0:50     ` Andreas Färber
2018-08-09  0:50       ` Andreas Färber
2018-08-09  0:50       ` Andreas Färber
2018-07-04 18:26 ` Stefan Schmidt
2018-07-04 18:26   ` Stefan Schmidt
2018-07-04 18:26   ` Stefan Schmidt
2018-07-05 10:43   ` Helmut Tschemernjak
2018-07-05 10:43     ` Helmut Tschemernjak
2018-07-05 10:43     ` Helmut Tschemernjak
2018-07-11  2:07     ` Andreas Färber
2018-07-11  2:07       ` Andreas Färber
2018-07-11  2:07       ` Andreas Färber
2018-07-11 11:45       ` Helmut Tschemernjak
2018-07-11 11:45         ` Helmut Tschemernjak
2018-07-11 11:45         ` Helmut Tschemernjak
2018-07-11 15:21 ` Ben Whitten
2018-07-11 15:21   ` Ben Whitten
2018-07-11 15:21   ` Ben Whitten
2018-07-15 18:13   ` Andreas Färber
2018-07-15 18:13     ` Andreas Färber
2018-07-15 18:13     ` Andreas Färber
2018-07-18 11:28     ` Ben Whitten
2018-07-18 11:28       ` Ben Whitten
2018-07-18 11:28       ` Ben Whitten
2018-07-18 11:28       ` Ben Whitten
2018-08-02  7:52       ` Jian-Hong Pan
2018-08-02  7:52         ` Jian-Hong Pan
2018-08-02  7:52         ` Jian-Hong Pan
2018-08-02  7:52         ` Jian-Hong Pan
2018-08-03  8:44         ` linux-lora.git and LoRaWAN (was: [RFC net-next 00/15] net: A socket API for LoRa) Andreas Färber
2018-08-03  8:44           ` Andreas Färber
2018-08-05 12:49           ` Jian-Hong Pan
2018-08-05 12:49             ` Jian-Hong Pan
2018-08-05 12:49             ` Jian-Hong Pan
2018-08-05 12:49             ` Jian-Hong Pan
     [not found]           ` <20180803150258.791b9942@alans-desktop>
2018-08-05 14:08             ` Jian-Hong Pan [this message]
2018-08-05 14:08               ` Jian-Hong Pan
2018-08-05 13:49       ` [RFC net-next 00/15] net: A socket API for LoRa Andreas Färber
2018-08-05 13:49         ` Andreas Färber
2018-08-05 13:49         ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC=mGzgW2fmRAA9GxojcbiBWm_G=rWqFh2MZECu-VST20MePBg@mail.gmail.com' \
    --to=starnight@g.ncu.edu.tw \
    --cc=Ben.Whitten@lairdtech.com \
    --cc=afaerber@suse.de \
    --cc=brian.ray@link-labs.com \
    --cc=contact@snootlab.com \
    --cc=davem@davemloft.net \
    --cc=dollar.chen@wtmec.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=jan.jongboom@arm.com \
    --cc=jpiwek@arroweurope.com \
    --cc=ken.yu@rakwireless.com \
    --cc=konstantin.boehm@ancud.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mbrugger@suse.com \
    --cc=michael.roeder@avnet.eu \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.