Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbdLNSOE (ORCPT ); Thu, 14 Dec 2017 13:14:04 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:45344 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753774AbdLNSN7 (ORCPT ); Thu, 14 Dec 2017 13:13:59 -0500 X-Google-Smtp-Source: ACJfBosg3TmejwhiQfyLtMoXHKZNlZUHxvpmOh0L0XuqNyTsFl+UBSNnjbWNWy02Mxa+gEqAE5pQTQ== Date: Thu, 14 Dec 2017 19:13:55 +0100 From: Simon =?utf-8?Q?Sandstr=C3=B6m?= To: Marcus Wolf Cc: Marcin Ciupak , Oliver Graute , devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Marcus Wolf Subject: Re: rf69_get_lna_gain Message-ID: <20171214181355.hradc6w74xzorjsb@gamma.nikanor.nu> References: <20171213142156.3201-1-Valentin.Vidic@CARNet.hr> <20171213142156.3201-6-Valentin.Vidic@CARNet.hr> <70c9a1fc-31eb-27c4-1283-35590f8b80f6@smarthome-wolf.de> <20171213165514.12509-1-Valentin.Vidic@CARNet.hr> <38352026-045b-a082-93bb-10e9e70f9f55@smarthome-wolf.de> <20171213174444.21088-1-Valentin.Vidic@CARNet.hr> <20171214144215.zj35buhshkayopuj@mwanda> <20171214152020.15859-1-Valentin.Vidic@CARNet.hr> <7edef67c-f01f-48dc-4575-634f14515ec1@smarthome-wolf.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7edef67c-f01f-48dc-4575-634f14515ec1@smarthome-wolf.de> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2450 Lines: 56 On Thu, Dec 14, 2017 at 06:08:11PM +0200, Marcus Wolf wrote: > Hi! > > This is an information for all of you, doing experiments with real hardware! > > I wanted to explain, what this lna_gain stuff is used for: > > If you are receiving messages from different sender (let's say several > thermometers), it may happen (e. g. due to different distance and different > battery level) that the automatic gain control of the receiver amp isn't > able to work correctly. E.g. if it gets a very strong singal first and a > very weak afterwards, it is possible, that the agc isn't capable to > recognize the second telegram predictable. > > The procedure, need to be done in such a case is: > Switch on agc. Wait for a correct telegram to be received. Read the > lna_gain_current value and store it. This is the gain setting for optimal > reception for one of your sender. You now can set gain_select to this value, > in order to receive stuff from this sender (instead of using agc). > If you want to receive stuff from an other sender, you may want to try with > different other settings. As soon, as you have success, you can store this > value and use it for receiving stuff from that sender. > > Since I have just a 35m² flat, it is quite hard to have a setup, to test > such stuff. In summer I did some experiments on the pavement, but the > experimental code never was integrated in the productional source repo, > because I focused on tx first. Deeper use of rx is planned for late spring > next year. > > If you want to do experiments with rx of signals with different strength, > maybe you want to save a copy of the abstracions (rf69_set_lna_gain and > rf69_get_lna_gain) befor they get deleted in staging-next. > > Regards, > > Marcus > Hi Marcus, There is no need to make backups of code as it's still there in the git history. If we ever need to re-introduce rf69_get_lna_gain, or any other function that is removed due to not being used right now, it's just a simple matter of reverting the commit that removed them. Either revert them directly or use the revert as a base for re-introducing the functionality. So you don't have to feel like we're throwing away work that you've probably spent lots of time on. It will still be available for us when we actually need it. But right now, from what I've read in this thread, the functionality isn't used at all right now (dead code) and should therefore be removed. Regards, Simon