Closed dizcza closed 8 months ago
Hi,
There is little value in having support 2 different chips under the same repository. They won't share anything in common. According to sx126x data sheet it works a little bit differently. Even though it supports both LoRa and FSK.
sx127x need only SPI transport, that already abstracted in ESP32, Linux or any other systems.
Retry, encryption and etc is not implemented in the chip's hardware. Thus must be implemented on the higher abstraction layers.
Could you recommend any third-party lib for ESP32 that provides HW-agnostic higher abstraction layers as I mentioned? Given hardware send & receive methods implemented in your lib, it'd be nice to bind it with user-friendly APIs that send & receive messages to a particular client rather than just broadcasting, encryption, etc.
You most likely need a higher level protocol - LoRa WAN. You can find details and implementation here: https://github.com/Lora-net/LoRaMac-node
Please consider adding the constant
qualifier to arguments that should be constant. In particular, sx127x_lora_tx_set_for_transmission
. The spi_transaction_t.tx_buffer
is marked constant in ESP-IDF.
When I tighten the Lora SS pin to GND (in software by setting it low with a pull-down) and set dev_cfg.spics_io_num = -1
, the module is initialized correctly but the transmission is never completed (DIO0 ISR callback never gets executed).
Is it expected behavior? I don't see any reason why one shouldn't tighten the SS to GND.
SS pin should be HIGH after transmutation completes according to the specification:
sx1272 and sx1262 are often interchanged and unfortunately, I haven't seen a library that supports both except RadioLib.
Also, are you planning to implement a transport layer on top of the physical layer as it's done in RadioHead (device-to-device communication in a network, encryption, send failure notification and handling via retry)?