From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:51918 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729732AbeHIDND (ORCPT ); Wed, 8 Aug 2018 23:13:03 -0400 Subject: Re: [RFC net-next 00/15] net: A socket API for LoRa From: =?UTF-8?Q?Andreas_F=c3=a4rber?= References: <20180701110804.32415-1-afaerber@suse.de> <92ee4016-1da9-826b-3674-b2d604a64848@suse.de> Message-ID: Date: Thu, 9 Aug 2018 02:50:39 +0200 MIME-Version: 1.0 In-Reply-To: <92ee4016-1da9-826b-3674-b2d604a64848@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-wpan-owner@vger.kernel.org List-ID: To: Jian-Hong Pan Cc: 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, Ben Whitten , 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, Pieter Robyns , Hasnain Virk , Alan Cox , linux-wpan , Stefan Schmidt , Daniele Comel , Xue Liu , =?UTF-8?Q?Sebastian_He=c3=9f?= Am 05.08.2018 um 02:11 schrieb Andreas Färber: > Am 03.07.2018 um 17:11 schrieb Jian-Hong Pan: >> 2018-07-01 19:07 GMT+08:00 Andreas Färber : >>> 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? [...] > Independently of what LoRaWAN does, the > user needs to be able to send on the physical layer from a selection of > LoRa, GFSK, FSK, OOK, GMSK and MSK. > Supposedly Wireless M-Bus and IEEE 802.15.4 can be implemented via those > according to the SX1276 datasheet. > > This opens a can of worms... > > SX127x has a single channel, so I don't think there should be six > network interfaces lora0, gfsk0, fsk0, ook0, gmsk0 and msk0 exposed to > the user. > Having a lora0 interface speak non-LoRa modulations may be confusing, > but since the chip is sold as LoRa transceiver it might be acceptable. > > SX130x has 8+2 channels, with IF9 dedicated to GFSK/FSK. It appears to > use one FIFO for receiving (up to 16 packets) and can only transmit one > packet at a time. So I think this should be one lora0 interface, too. > > With a view to supporting non-LoRa RF chipsets such as Si4xxx (GFSK, > FSK, OOK) or nRF905 and nRF24L01+ (both GFSK) at a later date, I don't > think those modulations should be some netlink option on a PF_LORA > interface but cleanly distinguished as ETH_P_GFSK or something. > For example, the Chistera Pi HAT has both an RFM95W and an RFM22 module. Answering myself here: MSK is a special case of FSK, and GMSK a special case of GFSK. SX1276 allows to switch between LoRa and FSK/OOK modes, and in FSK/OOK mode between FSK and OOK modulation types and for FSK modulation allows to set Gaussian filter values. I assume (G)MSK is selected indirectly through BitRate and Fdev settings or something. So we would just need ETH_P_FSK and ETH_P_OOK plus some skb fields for ETH_P_FSK. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)