Commit graph

132 commits

Author SHA1 Message Date
Jan Gromeš
e44e9b4bce
[PHY] Get/Set modem (#1294)
* [PHY] Added set modem method

* Added new keyword

* [SX126x] Added setModem implementation

* [LoRaWAN] Use setModem

* [PHY] Added getModem

* [LoRaWAN] Use getModem instead of caching modulation

* [SX126x] Implement getModem

* Added new keywords

* [LR11x0] Added get/set modem

* [LLCC68] Added get/set modem

* [SX126x] Added missing default branch

* [SX127x] Added get/set modem

* [SX128x] Added get/set modem

* [CI] Drop Hellschreiber from AVR builds

* [CI] Drop Arduino Uno from CI
2024-10-26 17:49:35 +02:00
StevenCellist
61494b8270 [LoRaWAN] Fix #1284 (max length) and channel struct for fixed bands 2024-10-22 20:21:52 +02:00
StevenCellist
94d5d59d80 Merge branch 'master' of https://github.com/jgromes/RadioLib 2024-10-14 12:29:50 +02:00
StevenCellist
3633391442 [LoRaWAN] Fix missing us-to-ms divisor 2024-10-14 12:29:42 +02:00
StevenCellist
1ca12abc88
Merge pull request #1267 from PCo-IoT-2024/Feature_isFrmPending
[LoRaWAN] Add `frmPending` field in `LoRaWANEvent_t`
2024-10-11 22:15:41 +02:00
Volker Christian
d9ea40032f [LoRaWAN] Just for convenience: Add a frmPending field in 2024-10-11 21:07:07 +02:00
StevenCellist
aecef28380 [LoRaWAN] Move templates to .h to prevent linker errors 2024-10-10 15:33:19 +02:00
Volker Christian
a7feeee1e0
[SX1276, LoRaWAN] Fix confusing return value in LoRaWAN::processJoinAccept (#1262)
The error RADIOLIB_ERR_LORA_HEADER_DAMAGED board returned fromreadData(...)
and signaled from a SX1276 is in fact correctly ignored but the state
variable is not corrected.

This confuses the caller due to the wrongly returned state value
RADIOLIB_ERR_LORA_HEADER_DAMAGED.

Change: Clear state also.
2024-10-09 20:32:50 +02:00
StevenCellist
bce4d91715 [LoRaWAN] Fix type format 2024-10-07 23:29:14 +02:00
StevenCellist
9db98f2ab4 [LoRaWAN] Collection of fixes (also fixes #1254) 2024-10-07 23:17:41 +02:00
StevenCellist
5d076f616a [LoRaWAN] Fix channel mask persistence (#1238) 2024-09-28 12:17:41 +02:00
jgromes
79b1b8c887 [LoRaWAN] Fixed size_t comparison (CI_BUILD_ALL) 2024-09-16 18:56:22 +02:00
StevenCellist
e9ed961c97 [LoRaWAN] Fix ADR backoff 2024-09-16 08:36:14 +02:00
StevenCellist
97579292de [LoRaWAN] Remove shadowed variable 2024-09-16 01:28:25 +02:00
StevenCellist
b76327c10f [LoRaWAN] Fix RekeyConf, change session buffer layout 2024-09-16 01:23:10 +02:00
StevenCellist
740ee7e235 [LoRaWAN] Verification cleanup 2024-09-16 00:39:12 +02:00
jgromes
8aedf53272 [LoRaWAN] Fix narrow type comparison 2024-09-10 20:27:49 +01:00
jgromes
78a6897e1b [LoRaWAN] Silence class-memaccess warning 2024-09-10 20:24:00 +01:00
StevenCellist
f7f0b62e7f
[LoRaWAN] Major rework (#1204)
* [LoRaWAN] Major rework

* [LoRaWAN] Some CI fixes, add retransmission timeout

* [LoRaWAN] CI fixes

* [LoRaWAN] Add missing initializers

* [LoRaWAN] Return Rx window number, fix casing

* [LoRaWAN] Un-static functions to fix overriding

* [LoRaWAN] Integrate feedback, fix session save/restore

* [LoRaWAN] Add const

* [LoRaWAN] Do not accept invalid Rx2 datarate

* [LoRaWAN] Integrate feedback

* [LoRaWAN] Fix retransmission, ADR backoff, setDatarate; reject out-of-band frequencies

* Update keywords.txt

* [LoRaWAN] Fix initial datarate, misc cleanup

* [LoRaWAN] Update examples

* [LoRaWAN] Update README

* [LoRaWAN] Reject oversized downlinks

* [LoRaWAN] Remove VLAs

* [LoRaWAN] CI fixes

* [LoRaWAN] More CI

* [LoRaWAN] Fix getMaxPayloadLen

* [LoRaWAN] Rename some status codes

* [CI] Skip LoRaWAN on XMega48

* [CI] Skip FW update for LR11x0

---------

Co-authored-by: jgromes <jan.gromes@gmail.com>
2024-09-10 21:11:16 +02:00
Jan Gromeš
bc801c7004
[PHY] Channel scan configuration (#1190)
* [PHY] Added channel scan configuration

* [LR11x0] Added channel scan configuration

* [SX126x] Added channel scan configuration

* [SX128x] Added channel scan configuration

* Use microsecond timeout

* [PHY] Added generalized IRQ handling via PHY

* [LR11x0] Added generalized IRQ handling via PHY

* [SX126x] Added generalized IRQ handling via PHY

* [SX127x] Added generalized IRQ handling via PHY

* [SX128x] Added generalized IRQ handling via PHY

* Added missing typedef

* [PHY] Fix IRQ method argument type

* [SX128x] Fix non-trivial initializer usage

* [LR11x0] Added missing override specifiers

* [SX126x] Added missing override specifiers

* [SX127x] Added missing override specifiers

* [SX128x] Added missing override specifiers

* [PHY] Added missing IRQ map initializer

* [CI] Drop APRS builds on AVR

* [CI] Drop Morse builds for AVR

* [PHY] Rework generic IRQ to allow multiple flags

* [LR11x0] Rework generic IRQ to allow multiple flags

* [SX126x] Rework generic IRQ to allow multiple flags

* [SX127x] Rework generic IRQ to allow multiple flags

* [SX128x] Rework generic IRQ to allow multiple flags

* [LoRaWAN] Use generic IRQ

* Add missing typedef

* [SX127x] Make Rx mode implicit based on timeout

* [SX127x] Fixed shadowed variable

* [LR11x0] Fix missing initializers

* [SX127x] Added default startReceive arguments

* [LR11x0] Pass scan config by const reference

* [SX126x] Pass scan config by const reference

* [SX128x] Pass scan config by const reference

* [PHY] Pass scan config by const reference

* [SX127x] Add missing IRQ conversion

* [SX126x] Fixed default CAD scan config IRQ

* [LR11x0] Fixed default CAD scan config IRQ

* [LR11x0] Fix comments referencing DIO1
2024-09-01 18:19:07 +02:00
StevenCellist
647fa23ce9 [LoRaWAN] Remove redundant PHY check 2024-08-17 22:04:28 +02:00
StevenCellist
0bc0e3d9c8 [PHY, modules, LoRaWAN] Integrate feedback 2024-08-17 22:03:48 +02:00
StevenCellist
32dc5babd4 [LoRaWAN] Move to generalized IRQ check (PHY) 2024-08-16 00:05:55 +02:00
StevenCellist
9195dbabda
[LoRaWAN] Fix downlink user-MAC commands piling up 2024-07-21 22:39:28 +02:00
StevenCellist
a6c9d0037a [LoRaWAN] Collection of fixes
- Fix v1.0.4 MAC-in-payload decryption
- Don't process 0MHz frequencies from CFList
- Fix downlink-event datarate not showing correctly after ADR request
- Convert getDevAddr to uint32_t
- Backend: improve MAC Queue<>Buffer processing
2024-07-21 21:37:01 +02:00
Jan Gromeš
a93dd1af91
Merge pull request #1158 from alistair23/alistair/scan-guard
protocol: LoRaWAN: Allow configuring scanGuard
2024-07-13 17:10:01 +02:00
Alistair Francis
5b9cad0c8c protocol: LoRaWAN: Allow configuring scanGuard
The current code uses scanGuard to increase the Rx window. Sometimes the
default 10ms scanGuard isn't enough. So allow uses of LoRaWAN to set a
larger scanGuard.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
2024-07-11 10:09:55 +10:00
StevenCellist
0eeb5fe0d9 [LoRaWAN] Fix #1154, finalize LW v1.0.4
Holiday parting gift - happy holidays!
2024-07-09 21:01:09 +02:00
StevenCellist
33480235d6 [LoRaWAN] Fix JoinRequest dwelltime calculation 2024-06-27 17:38:29 +02:00
StevenCellist
e42cd7e2a5 [LoRaWAN] Fix dwelltime & JR-dr for AU915, add JR dwelltime check 2024-06-05 21:27:19 +02:00
jgromes
5d9917eb06 [LoRaWAN] Change FSK switch to modulation variable 2024-06-02 09:29:55 +02:00
jgromes
cc2cb2c9a0 [LoRaWAN] Fix shadowed variable 2024-05-26 11:26:15 +01:00
jgromes
79d10c242a [LoRaWAN] Use memset for channel array init 2024-05-26 09:27:00 +02:00
jgromes
525fdfb1a0 [LoRaWAN] Cppcheck cleanup 2024-05-26 09:02:23 +02:00
StevenCellist
139fc7ee35 [LoRaWAN] Force default Rx2 for JoinAccept 2024-05-25 15:25:46 +02:00
StevenCellist
7186ae598b [LoRaWAN] Improve debug output 2024-05-25 15:12:36 +02:00
StevenCellist
237531c9a0 [LoRaWAN] Improve FPort checks, add TS009 option 2024-05-25 15:00:36 +02:00
StevenCellist
d4b25e75af [LoRaWAN] Hide Rx2 config into guarded setRx2Dr() 2024-05-25 14:38:04 +02:00
StevenCellist
88b4da94c1 [LoRaWAN] Fix cppcheck warnings 2024-05-25 13:13:35 +02:00
StevenCellist
fe221cf84f [LoRaWAN] Revert LW to LORAWAN 2024-05-25 13:00:02 +02:00
StevenCellist
298a612699
[LoRaWAN] Change session activation (#1093)
* [LoRaWAN] Improve session restoration/activation behaviour

* [LoRaWAN] Custom return codes for session begin

* [LoRaWAN] Separate begin() and activate()

* [LoRaWAN] Fix activateABP()

* [LoRaWAN] Additional error-code

* [LoRaWAN] Fix rejoining during active session

* [LoRaWAN] Expose clearSession, drop `force`

* Update keywords...
2024-05-21 12:03:49 +02:00
Thomas Schätzlein
f2e1b547d5 fix payload of DevStatusAns mac-command
Lorawan specs say (e.g. 1.0.4 or 1.1), that the first byte is the
battery-level and the second byte is the margin.
2024-05-20 10:51:41 +02:00
jgromes
d12e9f11f5 [LoRaWAN] Added timeout to downlink wait loop 2024-05-08 15:29:39 +02:00
jgromes
90eca88859 [LoRaWAN] Use 32-bit IRQ flags 2024-05-08 14:51:43 +02:00
jgromes
2c9446ef1e [LoRaWAN] Added rx start assert 2024-05-08 14:50:34 +02:00
StevenCellist
bb7fffe95d [LoRaWAN] Improve readability to better match documentation 2024-05-04 23:26:59 +02:00
StevenCellist
bbeca9a53e [LoRaWAN] Consistent fOpts casing to match documents 2024-05-04 23:21:45 +02:00
StevenCellist
163a4020d2 [LoRaWAN] Consistent fCnt/fPort casing to match documents 2024-05-04 23:18:36 +02:00
StevenCellist
43adfee174 [LoRaWAN] Shorten LORAWAN to LW 2024-05-03 22:58:11 +02:00
jgromes
6fe581aea7 Fix minor format warnings 2024-05-03 20:54:18 +01:00