Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1801636imm; Thu, 2 Aug 2018 00:59:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdktwwcriuf9zbyvnvJw1xvTVDtm/gIvJcGNGkgGIm8Q4WXp642lU5m85ssA5bPYpialPwx X-Received: by 2002:a63:1644:: with SMTP id 4-v6mr1700403pgw.103.1533196770515; Thu, 02 Aug 2018 00:59:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533196770; cv=none; d=google.com; s=arc-20160816; b=v6s2IPla9ZM/rQf0Sld2hIdEb2rDU9+FRKVBGiWh3ZMg78tvffIZpHWhvfLkcXInzR oKqe4zWaJH/VRLAFUuLoDuWpFrRY92bzVwdyJtgpKab7Ak3a1w1unV6fWbi1j7o/RGLo JwEeAVbDRL7lHL9TKaofAE1sp0TuVM1cjdgz7I91tj0K0Z98Hvd6UcTrpWL+4qdXwAct SBpdmpkOIvByQfwBmLbWleg4D8gR1yLIoGYssdIh1Fo3IWmb3LNDfVezq+jbSpZIcgCy nU2427XCJYwuEKZhW98OrNr/weLj9hquXiz+Wf8zBQzYhItQC6hKoTlvrno9l6JBTtrs W+Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=kVxS+Yz970GeDqpuVOiGrtGIfFpMLYlJ67ct0l2ebR0=; b=ttSrP57L6Jz6OGIXWoRpV3dBa3mc9RiKnRYHc6Us90rA1dvX/ysKowwa96WkMbg7I4 J+XeeIi4cHaDNR3m9KdnIwQ3ZBr2XwawQ1PC4kRFYsmiAJj+jhwl3zWJ/cRwl+V+UJKR 8owc+3cC1MSJegm5BtxVx5SKzs/vy0lmhJKTQrwYX4nTtexyW0laJ4HiJndskqGjBoEZ swUGYUBiPS0MRERSTJ0h9PMoonEF6de7KDFSHbRYHSWQliWw5RBFwSmlyaZma2qZILwn b9+KTgZJOh+IeD97I9LrUUINr63tgzcQn7GpHxI2xsMoDVMxOEMgNS+3F2qpNRGdsWvF CXzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@g.ncu.edu.tw header.s=google header.b=nbGcnLYo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l67-v6si1331710pfl.167.2018.08.02.00.59.15; Thu, 02 Aug 2018 00:59:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@g.ncu.edu.tw header.s=google header.b=nbGcnLYo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727349AbeHBJsV (ORCPT + 99 others); Thu, 2 Aug 2018 05:48:21 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:33708 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726522AbeHBJsU (ORCPT ); Thu, 2 Aug 2018 05:48:20 -0400 Received: by mail-oi0-f44.google.com with SMTP id 8-v6so2407726oip.0 for ; Thu, 02 Aug 2018 00:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=g.ncu.edu.tw; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kVxS+Yz970GeDqpuVOiGrtGIfFpMLYlJ67ct0l2ebR0=; b=nbGcnLYo/eJ0/K5zrdDMHNi7JReHHwWZXkRiNviJ7oJZMQ3MYWXUXApysXg6pZqtau r/3W116StkeFva82J+K3teGpXIhZ5LghoqBOi/x+I6bldy7oirSJtDtQTXGD0GRcPcsO ERSFic+DlDOIDMvJP3ApDI8RNss5cCW7Cvvgk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=kVxS+Yz970GeDqpuVOiGrtGIfFpMLYlJ67ct0l2ebR0=; b=idvzwCaFaTUDGNCx7c54dh2V4QArlG38pJ32HSIBuxcAM0ZxhzbeyER6F9WBK3d5kh 7jue8gCgzURiMawvxHsz9Y5q4YiMCiPdvGptv9iouvXb18dP/N/Wa925oNUoHLgoGqTu n0N4GhiFJdBsDbnOwkSbcF518vdlaCIKh49iDPlyjf1PwzX7iLo58V0D+sDyFhL2Bo0k 956hUjjaRF2mAuwb7j9AUFwDtcjXzbhfk7ON/YDzxbbVvwthWBOzsveojpMpllt5zUHM 2hXmtmV4toiEewoYOxwLjAY6sJqCkHUiIJDBCYzYHxQT5WWcGq/naIzrUgsWBsm6wutA Y+FQ== X-Gm-Message-State: AOUpUlGMWpqtSedCXzrNN2zsYHr+cQ5J41T3x1LACn0uJajJtkv73MhI tf1qF5DtHnLooCJf4JrF0NIxAg== X-Received: by 2002:aca:d509:: with SMTP id m9-v6mr1854678oig.82.1533196702707; Thu, 02 Aug 2018 00:58:22 -0700 (PDT) Received: from mail-oi0-f47.google.com (mail-oi0-f47.google.com. [209.85.218.47]) by smtp.gmail.com with ESMTPSA id b125-v6sm934792oia.38.2018.08.02.00.58.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 00:58:22 -0700 (PDT) Received: by mail-oi0-f47.google.com with SMTP id n21-v6so2376742oig.3; Thu, 02 Aug 2018 00:58:22 -0700 (PDT) X-Received: by 2002:aca:7c2:: with SMTP id 185-v6mr1711347oih.31.1533196341901; Thu, 02 Aug 2018 00:52:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:b54c:0:0:0:0:0 with HTTP; Thu, 2 Aug 2018 00:52:21 -0700 (PDT) In-Reply-To: References: <20180701110804.32415-1-afaerber@suse.de> From: Jian-Hong Pan Date: Thu, 2 Aug 2018 15:52:21 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC net-next 00/15] net: A socket API for LoRa To: Ben Whitten Cc: =?UTF-8?Q?Andreas_F=C3=A4rber?= , "netdev@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Jiri Pirko , Marcel Holtmann , "David S . Miller" , Matthias Brugger , Janus Piwek , =?UTF-8?Q?Michael_R=C3=B6der?= , Dollar Chen , Ken Yu , =?UTF-8?Q?Konstantin_B=C3=B6hm?= , Jan Jongboom , Jon Ortego , "contact@snootlab.com" , Brian Ray , "lora@globalsat.com.tw" , Alexander Graf , =?UTF-8?Q?Michal_Kube=C4=8Dek?= , Rob Herring , "devicetree@vger.kernel.org" , Steve deRosier , Mark Brown , "linux-spi@vger.kernel.org" , Hasnain Virk , Stefan Schmidt , "linux-wireless@vger.kernel.org" , "seth.forshee@canonical.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-07-18 19:28 GMT+08:00 Ben Whitten : >> Subject: Re: [RFC net-next 00/15] net: A socket API for LoRa >> >> + linux-wireless + Stefan + Seth >> >> Am 11.07.2018 um 17:21 schrieb Ben Whitten: >> >> This patchset is clearly not ready for merging, but is being >> >> submitted for >> >> discussion, as requested by Jiri, in particular of the design >> >> choices: >> >> >> >> 1) PF_LORA/AF_LORA and associated identifiers are >> >> proposed to represent >> >> this technology. While for an SX1276 - case a) above - it >> >> might work to >> >> layer LoRaWAN as a protocol option for PF_LORA and >> add >> >> LoRaWAN address >> >> fields to the union in my sockaddr_lora, how would that >> >> work for devices >> >> that only support LoRaWAN but not pure LoRa? Do we >> >> need both AF_LORA and >> >> AF_LORAWAN, or just a separate ETH_P_LORAWAN or >> >> ARPHRD_LORAWAN? >> >> >> >> 2) PF_LORA is used with SOCK_DGRAM here. The >> >> assumption is that RAW mode >> >> would be DGRAM plus preamble plus optional >> checksum. >> >> >> >> 3) Only the transmit path is partially implemented >> already. >> >> The assumption >> >> is that the devices should go into receive mode by >> default >> >> and only >> >> interrupt that when asked to transmit. >> >> >> >> 4) Some hardware settings need to be supplied >> externally, >> >> such as the radio >> >> frequency for some modules, but many others can be >> >> runtime-configured, >> >> such as Spreading Factor, Bandwidth, Sync Word, or >> which >> >> antenna to use. >> >> What settings should be implemented as socket option >> vs. >> >> netlink layer >> >> vs. ioctl vs. sysfs? What are the criteria to apply? >> >> >> >> 5) Many of the modules support multiple modes, such as >> >> LoRa, LoRaWAN and FSK. >> >> Lacking a LoRaWAN implementation, I am currently >> >> switching them into LoRa >> >> mode at probe time wherever possible. How do we >> deal >> >> with that properly? >> >> >> >> a) Is there any precedence from the Wifi world for >> >> dynamically selecting >> >> between our own trusted Open Source >> implementation >> >> vs. hardware/firmware >> >> accelerated and/or certified implementations? >> >> >> >> b) Would a proof of concept for FSK (non-LoRa) modes >> be >> >> required for >> >> merging any LoRa driver for chipsets that support >> both? >> >> Or is there any >> >> facility or design guidelines that would allow us to >> focus >> >> on LoRa and >> >> LoRaWAN and leave non-LoRa radio modes to later >> >> contributors? >> > >> > Down the line I think we should also plan for a CRDA style >> regdb somewhere in the path for raw LoRa transceivers >> operating as softMAC, much like with WiFi. >> >> Yes, I had raised the topic of wireless-regdb for Stefan's >> conference - >> currently it seems to only cover 2.4 GHz, 5 GHz and 60 GHz. >> Not sure if >> we can easily extend that to cover 433 MHz, 868 MHz, 915 >> MHz and 923 MHz >> bands or whether we'd just need something similar... Is >> 802.15.4 able to >> share this database with Wifi? > > Well the README in the wireless-regdb doesn't bind itself to 80211, there= are references to the other ETSI EN specs so this would be the place rathe= r than duplicating. > There would need a bit of additional information to capture duty-cycle re= quirements, however the SRD spec states the maximum bandwidths can be 'The = whole band', so with a flag set we could hijack this band information for d= uty-cycle. > I am unsure if 802.15.4 uses this database, most of the naming seems gear= ed towards 80211, nl80211, cfg80211 so perhaps we need our own versions of = these with a common component, I hope the maintainers can give some guidanc= e here. > >> An argument to share with Wifi might be that Semtech's >> SX1280 and SX1281 >> 2.4 GHz transceivers claim to support LoRa modulation, too. >> Having two >> different regulatory DBs interact with LoRa drivers seems a >> bad idea, >> and duplicating 2.4 GHz into a new DB doesn't sound >> appealing either. > > Well I'm not sure if the modulation affects regulatory information, just = bands, power, and techniques like DFS. > As these chips are 2.4GHz only I expect they are bound by the existing re= gulatory information we would just need a path to access it. > >> https://www.semtech.com/products/wireless-rf/24-ghz- >> transceivers >> >> Meanwhile my attempt to play with netlink during SUSE >> Hackweek has been >> going slow and I could use some guidance or a volunteer to >> contribute: I >> have a bare skeleton of registration, commands, attributes >> and multicast >> groups, but no plan yet how to connect that to the actual >> drivers to >> query or apply the settings... > > Happy to help, I will be starting from zero on netlink but I can contribu= te my existing work incorporating Marks comments for sx1301 etal. > >> https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/li >> nux-lora.git/tree/net/lora/netlink.c?h=3Dlora-next Is this the repository used for the LoRa subsystem now?!!! If it is, than great! As the previous mails, I am trying to implement the LoRaWAN specification as the soft MAC as the MAC layer over LoRa PHY. This is the the talk about LoRaWAN class module I gave in Netdev Conf https://www.slideshare.net/chienhungpan/lorawan-class-module-and-subsystem The expectation is: socket APIs: send and receive the data ------------------------------------------------------------ LoRaWAN class module implements MAC: append the header/footer, encryption/decryption, timing slot and MAC comman= ds ------------------------------------------------------------ LoRa device drivers: send and receive the messages for MAC layer ------------------------------------------------------------ LoRa devices Is it possible that combine the LoRaWAN class module I implemented? I start from the simplest class A end device's behavior, especially the timing slot. Also the encryption/decryption for uplink/downlink data messages. I can send it as patches. However, I have 2 problems right now. 1. Which Address and Protocol Family should we use? PF_LORA or PF_LORAWAN? 2. To test the LoRaWAN class module, adding more procedures in LoRa device drivers to register as a LoRaWAN device is needed. Regards, Jian-Hong Pan >> > LoRa radios used in Gateway devices are typically relatively >> high power (capable of 27dBm) and operate in bands with >> certain restrictions, eg the EU has keep out areas within >> 868MHz for alarms and SRD devices must abide by certain >> duty cycle restrictions, there are also maximum powers to >> consider for sub-bands. (ETSI EN 300 220-2 V3.2.1, Bands K, >> L, M, N, P, Q) >> >> > The certified AT style modules will (should) already have >> this regulatory data baked in so it only applied to situations >> where we drive the transceivers directly, but it wouldn't >> hurt to check that the frequency being asked to transmit on >> doesn't spill into a restricted band. >> >> Some do have configuration options that will need to be set >> or checked. >> >> Regards, >> Andreas >> >> -- >> SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany >> GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton >> HRB 21284 (AG N=C3=BCrnberg)