Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp557127imm; Fri, 22 Jun 2018 01:04:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKduNAK00rqKbaJ46nD6qhjoMod7f5W8O8/CJ2HHUV1lEOjOxDvvTOEoG139Cz6D9YwJoQU X-Received: by 2002:a65:4b82:: with SMTP id t2-v6mr460338pgq.175.1529654681077; Fri, 22 Jun 2018 01:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529654681; cv=none; d=google.com; s=arc-20160816; b=wsJ/5PglPPsDrx5P0SSArXiL7lRKLK73kLIQkop7jatq+FJizGIbgfDi9jQvgKcHFy j4ljtf0Y4yk60AY8BQOA4sQDvV2WfXt4/tfn+U2/cfM36EkH1UYpGGjzP4cseDhIG/KR +ZjXAxz61+wfch+QjB6qwi0okt8AiZBmBtTcqNizxoa1vI0sVTG50aZE40uIq6MyMq/U 5b19ARgYrMJSwlB1Q4s28llrrapkaHwsU95Z7XPOLstmP4WwP/j/6azuOfn5zv3dVgKb 3yXHhu4QEbM++0sjb22Vwg0inDmAQqe7Q9ZMC20SNN/fGbkQoDsuUbcMjkWrK9a51sPj 620g== 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:in-reply-to :mime-version:user-agent:date:message-id:autocrypt:openpgp:from :references:cc:to:subject:arc-authentication-results; bh=C2tuKHoHabNDHLyl+YlnPuolkYQh11+Asdo7g0Bc8AU=; b=qjYBZ/oeqd61tAqFJllYfnYD+6oQ0QruAip9HR8B7jsm7vV5sle1FJnYtlsRQhWYL7 uguCraAn+nWesPfMCgICpDWGQCj/U8yiOmrrOFPVnivSktRi1PHvg/NqhD29bjBGmOBq 4ZVBzajvCP47B2rtqudcx1XsdJh1vLvgNDNlT378wmn+6U5uK8924pMTVNg4y4wHPaNC o2MtIyNWOwkfq3NrMiEJq0mV29aztL1gpkUDpV9J/IVKtzVceHF6AHZDQe2rWACvNNDZ H97Zwpg4qQg/V1IADTQGhQ+kcel2Ebo8RPWLIuy50FmDuY1SScjeIeOUT1MGdWDBQKyZ ryRg== 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 u8-v6si5776886pgr.578.2018.06.22.01.04.25; Fri, 22 Jun 2018 01:04:41 -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 S1751400AbeFVICw (ORCPT + 99 others); Fri, 22 Jun 2018 04:02:52 -0400 Received: from dd39320.kasserver.com ([85.13.155.146]:37658 "EHLO dd39320.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbeFVICr (ORCPT ); Fri, 22 Jun 2018 04:02:47 -0400 Received: from [192.168.0.65] (x4db6f200.dyn.telefonica.de [77.182.242.0]) by dd39320.kasserver.com (Postfix) with ESMTPSA id 073382CE0040; Fri, 22 Jun 2018 10:02:43 +0200 (CEST) Subject: Re: pi433: initialization of tx config in pi433_open() To: Hugo Lefeuvre , Marcus Wolf Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman References: <20180622024741.GB1914@hle-laptop.local> From: Marcus Wolf Openpgp: preference=signencrypt Autocrypt: addr=marcus.wolf@smarthome-wolf.de; prefer-encrypt=mutual; keydata= xsBNBFn0gUABCADPoYmxJeUTvkgBA/fTa2vTIzv4pQy0gfdS23EounKFNBTUu8Rur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acjDagzwTds w+1vR7t9T39uV/+KOpZfqbwZx7Wc2trr2k7L+puBJght8xUTBlafa/EzABEBAAHCwGUEGAEI AA8FAln0gUACGwwFCQPCSPAACgkQsXtxmq7XNr+IIQf/Q6H5zTJNrq12vPMRZbXWS+1gytGM jDgD7AbJy2tr5C0X/kpcxHrohwLvL8I2xCt3rXB28nQMwT1FJJ8zCoHTVDMX921KKVaqGN1D SxP3yQULbrcUYXlp2+iBAVzFQETjWaLbS0zYif7UMIZ54x0pGw/0pspEYLhjnykgnjFjPoMr 79JhTMgKFwzOuINRGSHtHw8KIrfPymr2DrpGAXuIAXdjrel7nTVC6D+hVf7/qvFSgNS1sHky RNbd3S3GhFBT1zypnMRro+o4Qke5huxQ4mTLbFveo3f3T+u602PYbv4pz9tLwTPBKaKtJBNX kqgUYrGFKWlJJbaXegzkY9WmWg== Message-ID: <108baf56-d8a2-1b8f-0e0f-72c0605a051e@smarthome-wolf.de> Date: Fri, 22 Jun 2018 10:02:46 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180622024741.GB1914@hle-laptop.local> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hugo, thank you for all your work on Pi433 driver. For a better understanding some info about Pi433 and the ideas behind it. Pi433 was developed by me in order to have a simple to mount CE-compliant 433MHz shield for the Raspberry Pi. I wanted to put it on sale on the one side and develop a further product for home automation, using the Pi433. After three years of development and hard trying to find sales partner, I almost gave up, since after three years still earn on those topics by far do not cover the spendings. If nothing changes, I'll have to close my company at the end of this year. At a distinct point, the work on trying to sell exceeded the technical work, so no time was left for the driver development. And now I started over in freelancing to earn money. That's why all of you nearly hear nothing from me - very sad about that! Back to technics: There was already the idea of equipping the driver with default values. I see no benefit with setting the default values from the data sheet, since they do not lead to a good, maybe even not working setup of the rf69. Idea was to choose settings, that allow to use pipeoperators on the command sehll for transmitting and receiving telegrams. There was a longer discussion about one year ago with Marcin Ciupak about that topic. Most important point from my side was, that the defaults should be in a way, that CE recommandations are meat. You can find a lot of configurations, making Pi433 work in a way, that it isn't CE-compliant any more. The 4711 sound like just beeing a place holder. Since - like I told before - I inteded to use Pi433 mainly for OOK/ASK, my idea was to use an good OOK/ASK setup as default. I could provide you with a source code, I used the Pi433 with - but I think attachments are unwanted here. As far as I can remember, there were some more details to modify on the driver, to use it with pipes on command line. But I had a rough implementation. At least send was working... To long ago to remeber :-( Since it might happen, that Pi433 will go off the market in a few monthes (tears in my eyes), I think it's a good idea to modify the driver to become a generic hope-RF driver. I already did investigations on different hope-RF chips and asked hope-RF for a little support (e.g. partnership), but they were of opinion, that they don't need such a driver. It would be easy to cover up to five/six chips of them - even their brand new LoRaWan-chip. RFM-12 will be a little bit harder, since it works a little bit different. There were already preparations to support several chips - e. g. by capsulating the HW layer. But even hard discussions one year ago didn't help - according to kernel guide lines, it wasn't allowed to keep this capsulations. So the strict capsulation was broken and some of the basics for supporting more chips are lost now. Also on this topic I had several discussions with Marcin Ciupak, how to realise the support of the next chips. Maybe you can search the mailing list? If not, I can try to find the discussions in my inbox. I would love to help you with these extending topics, but since I am almost out of money, at the moment there is no margin for complimentary developments any more :-/ But if you like, I can discuss some stuff with you from time to time. Thank you so much for your interest in Pi433 and my driver!! If you need hradware for testing, let me know. Marcus Am 22.06.2018 um 04:47 schrieb Hugo Lefeuvre: > Hi Marcus, > > I'm currently working on the following TODO: > > 966 /* setup instance data*/ > 967 instance->device = device; > 968 instance->tx_cfg.bit_rate = 4711; > 969 // TODO: fill instance->tx_cfg; > > If a user calls write() right after open()-ing an instance, the driver > might try to setup the device with uninitialized garbage. In fact > nothing really bad will happen because the rf69 interface abstraction > will filter out wrong values, but this might be a confusing behavior > for the user. > > What do you think about initializing instance->tx_cfg with the default > values of the rf69 datasheet[0] ? > > Also, is there a specific reason why you chose 4711 as a default value > for the bit rate ? I couldn't find it anywhere in the datasheet nor on > the internet. > > Thanks ! > > Regards, > Hugo > > [0] http://www.hoperf.com/upload/rf/RFM69CW-V1.1.pdf >