[PATCH lora-next 00/11] net: lora: Get SX130x to transmit lora packets
From: Ben Whitten
Date: Mon Jan 28 2019 - 12:04:41 EST
Hello,
This series adds setup nessesary to transmit lora packets from the
SX1301x, it builds on the comments on the RFC [1] to a point where
the card is capable of sending out a LoRa modulated signal using
transmission paramaters from the LORA socket address.
As patches have been refactored and split up extensivly to bite
sized chunks they do not include individual RFC -> v1, this is
covered in this letter.
The setup involves starting the firmware up inside the card by
providing a LUT of its internal gain values calibrated against
the card output. As this information is hardware specific it
is added as a binding in the DT, with documentation to match.
Binding patch is based off a commit of the basic documentation
under review [2]
Not captured here are commands to set this gain table for use
in devices which do not use DT.
As _stat_xmit cannot sleep we spin the tx function to a work queue
so we can write to the SPI backed regmaps.
As proposed [3] as one way of getting lora packet metadata to
the driver is by using the socket address to encode spreading
factor, coding rate, bandwidth etc. The corresponding translation
is added on the driver side, populating the test transmission with
real values and has been tested to show changing bandwidths.
To perform testing a tx_test [4] was used to show changing
parameters on a spectrum analyser.
We also add patches to the defaults in the SX130x to fill in a TODO
in our initialisation.
Thanks,
Ben Whitten
[1] http://lists.infradead.org/pipermail/linux-lpwan/2018-December/000019.html
[2] http://lists.infradead.org/pipermail/linux-lpwan/2019-January/000150.html
[3] https://events.linuxfoundation.org/wp-content/uploads/2017/12/ELCE2018_LoRa_final_Andreas-Farber.pdf slide 16
[4] https://github.com/BWhitten/lora-modules/blob/master/tx_test.c
RFC -> v1
* Split up commits to sensible order and logical block sizes.
* Added DT binding for TX gain LUT.
* Fixed spelling mistakes.
* Converted metadata enums to suggested integers with suitable sizes.
* Fixed out by 1 in test transmission population.
CC: linux-lpwan@xxxxxxxxxxxxxxxxxxx
CC: netdev@xxxxxxxxxxxxxxx
CC: linux-kernel@xxxxxxxxxxxxxxx
Ben Whitten (11):
dt-bindings: net: lora: sx130x: add power lut binding
net: lora: sx130x: add loading of tx lut from DT
net: lora: sx130x: add CHRS to volatile register list
net: lora: sx130x: add helper function for writing to the SX130x MCU
net: lora: sx130x: initialise AGC
net: lora: sx130x: add detail to TODO in setup
net: lora: sx130x: add work queue to tx path
net: lora: sx130x: add test transmission
net: lora: introduce lora socket addressing for metadata
net: lora: sx130x: make use of lora address metadata in transmission
net: lora: sx130x: add patch to register fields
.../bindings/net/lora/semtech,sx130x.yaml | 13 +
drivers/net/lora/sx130x.c | 521 +++++++++++++++++-
drivers/net/lora/sx130x.h | 97 ++++
include/linux/lora/skb.h | 9 +
include/uapi/linux/lora.h | 14 +
net/lora/dgram.c | 45 ++
6 files changed, 697 insertions(+), 2 deletions(-)
--
2.17.1