Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1579751imm; Sun, 15 Jul 2018 11:16:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQni1TJShLZslQS+Zh8LGQ5lCzNsdXp78cSSl+G5rz7o/hAEI70b/GQl2+mrX60OzlhSCo X-Received: by 2002:a17:902:70cc:: with SMTP id l12-v6mr795226plt.132.1531678576815; Sun, 15 Jul 2018 11:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531678576; cv=none; d=google.com; s=arc-20160816; b=qIydkI6Bfwxu8RaMY6tKivW8vf4MVSTGtwyBkpfz+AucpcJpvU87fDf46++n66IBwV W5K4M75AuJsUq/2CpCLMpehi307A7+xIFyyVxjOCxoYW5xBO3WgnKn1J5b3KSLFlfhso JsnoPqQaRUhUuVU0KQMnbainIr4qT9niO0Dkwfc9Z63kTW2av+M6YB/7v8E7ZzhpfdVE FQErGOLxwWEK6VfvytH0i8HgAWKJSqwWbwHxp2aOtizJNqpk7ZUa+upcUSBO2QS/HLnC Ysiq6/H9NE6L1Ef93r05Xirm4GXdEDjB8f2M3aljcfmKUeUMxhenYTlwHap8EAk37j4D 07qQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject:arc-authentication-results; bh=6NGo5kOu4dduLJyHkl8UaUlGDMqceh6P9RKvfD3dk2c=; b=BMHJJWalggdglCIMocxHa2gE3mBcZzV9EozWbfI2WY2zbaj9hItbfoiN1i9xym+Sz8 m9cC2lqzFADOwsmKk9iBFX6qwClQYO9dI32N95qzp0cl+6MoSSr0Z1tQvGe5jBjP1pGm /CkIwq8bFEdSplKR1tY2YCNO0Z2zGa3GYSGioLjoWYOgrDI2wnKVuW1FWIGWp6FWt4IU y6a099GiZWKw8d03ZQUmurOJGhXT2yJUtfNDxljUlLKZKkS7+OycTVnKB+MGgY+MJ3Va qBzbE1r2A1JXiDm4a9llGzZxf/C0SIeoVsjGT6B8/WOCuPZTLBs28m/JH1yKS98B0ZKj Pw+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 z137-v6si8679739pgz.144.2018.07.15.11.15.36; Sun, 15 Jul 2018 11:16:16 -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; 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 S1726929AbeGOShv (ORCPT + 99 others); Sun, 15 Jul 2018 14:37:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:52400 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726735AbeGOShv (ORCPT ); Sun, 15 Jul 2018 14:37:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B1F11ADFB; Sun, 15 Jul 2018 18:14:03 +0000 (UTC) Subject: Re: [RFC net-next 00/15] net: A socket API for LoRa To: Ben Whitten Cc: "netdev@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Jian-Hong Pan , 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 References: <20180701110804.32415-1-afaerber@suse.de> From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Openpgp: preference=signencrypt Autocrypt: addr=afaerber@suse.de; prefer-encrypt=mutual; keydata= xsFNBE6W6ZQBEAC/BIukDnkVenIkK9O14UucicBIVvRB5WSMHC23msS+R2h915mW7/vXfn+V 0nrr5ECmEg/5OjujKf0x/uhJYrsxcp45nDyYCk+RYoOJmGzzUFya1GvT/c04coZ8VmgFUWGE vCfhHJro85dZUL99IoLP21VXEVlCPyIngSstikeuf14SY17LPTN1aIpGQDI2Qt8HHY1zOVWv iz53aiFLFeIVhQlBmOABH2Ifr2M9loRC9yOyGcE2GhlzgyHGlQxEVGFn/QptX6iYbtaTBTU0 c72rpmbe1Nec6hWuzSwu2uE8lF+HYcYi+22ml1XBHNMBeAdSEbSfDbwc///8QKtckUzbDvME S8j4KuqQhwvYkSg7dV9rs53WmjO2Wd4eygkC3tBhPM5s38/6CVGl3ABiWJs3kB08asUNy8Wk juusU/nRJbXDzxu1d+hv0d+s5NOBy/5+7Pa6HeyBnh1tUmCs5/f1D/cJnuzzYwAmZTHFUsfQ ygGBRRKpAVu0VxCFNPSYKW0ULi5eZV6bcj+NAhtafGsWcv8WPFXgVE8s2YU38D1VtlBvCo5/ 0MPtQORqAQ/Itag1EHHtnfuK3MBtA0fNxQbb2jha+/oMAi5hKpmB/zAlFoRtYHwjFPFldHfv Iljpe1S0rDASaF9NsQPfUBEm7dA5UUkyvvi00HZ3e7/uyBGb0QARAQABzSJBbmRyZWFzIEbD pHJiZXIgPGFmYWVyYmVyQHN1c2UuZGU+wsF7BBMBAgAlAhsDBgs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kTJDs7Uo2eb7WxOt5pSTVVqZkv7Q== Organization: SUSE Linux GmbH Message-ID: Date: Sun, 15 Jul 2018 20:13:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org + 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? 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. 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... https://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-lora.git/tree/net/lora/netlink.c?h=lora-next > 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ürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)