34 Commits

Author SHA1 Message Date
Orne Brocaar
5794f41324 Fix clippy feedback (cargo clippy --fix). 2024-08-07 14:59:25 +01:00
Orne Brocaar
a22ed43883 Update dependencies.
There are still a few dependencies left to update, but these updates
require additional code changes.
2024-07-22 11:48:08 +01:00
Orne Brocaar
f76a4b7f83 lrwn: Allow empty string for AES128Key, DevAddr, EUI64 and NetID.
In case an empty string is provided, the default "null" value will be
used.

Fixes #453.
2024-07-11 10:05:23 +01:00
Orne Brocaar
f153eb8ca0 lrwn: Fix typo in snr clamp. 2024-07-09 11:57:20 +01:00
Orne Brocaar
4a33f67ed6 lrwn: Fix cargo clippy feedback. 2024-07-09 11:39:32 +01:00
Orne Brocaar
b7dad2a7d0 Add RP002-1.0.4 option to device-profile. 2024-05-08 15:05:14 +01:00
Orne Brocaar
18e56957e2 lrwn: Validate max payload sizes for RP002-1.0.4. 2024-05-08 10:41:42 +01:00
Orne Brocaar
8c875c3bf1 Bump version to 4.7.0 2024-03-13 10:44:21 +00:00
Orne Brocaar
09e1ae0263 Refactor JS join_eui to join_eui_prefix.
This makes it possible to use a range of JoinEUIs per Join Server.
Use-cases are either Join Servers using a JoinEUI range or the
configuration of a "catch-all" Join Server prefix ("0000000000000000/0").
2023-10-30 15:44:34 +00:00
Orne Brocaar
5e63c5efe0 Make it explicit that tx power is in EIRP + fixes.
Historically, the tx power was defined as ERP. The Semtech UDP Packet
Forwarder protocol was never explicit if the "powe" field was in ERP or
EIRP. However, as the antenna gain in the Semtech UDP Packet Forwarder
is documented as dBi and is deducted from the "powe" field, this means
that "powe" is in EIRP.

This commit corrects all values to EIRP, to make sure that if the
antenna gain is properly configured (which should be), that the correct
rf_power is used by the gateway.
2023-10-12 15:36:11 +01:00
Orne Brocaar
943ccd558d lrwn: Fix AS923 max payload-size table.
See #283
2023-10-02 14:00:56 +01:00
Orne Brocaar
2c986d0889 Fix AS923 max-payload table.
Fixes #283 and #276.
2023-09-29 11:18:25 +01:00
Orne Brocaar
ee0597f500 lrwn: Fix compiler warnings. 2023-09-04 14:11:05 +01:00
Orne Brocaar
4031c5cb95 Fix sending channel-mask twice for US915 (like). 2023-07-03 12:27:26 +01:00
Orne Brocaar
318f097344 Fix CN470 ping-slot frequencies + add comments.
The frequency-hopping ping-slots are equal to the beacon frequencys.
With the US915 and AU915 channels using the Class-A downlink
channels as beacon-frequencies, this was wrongly implemented in the
same way, but in case of CN470 the beacon-frequencies are not equal
to the Class-A downlink frequencies.
2023-06-09 09:24:06 +01:00
Orne Brocaar
b89221a932 Update dependencies + Diesel related changes. 2023-05-30 12:42:42 +00:00
Orne Brocaar
cefe61072d Initial Relay support implementation (TS011).
Closes #59.
2023-05-22 11:04:13 +01:00
Orne Brocaar
5146c87940 Fix netid_type method.
It would panic in case all bits are set (which would be
an invalid DevAddr prefix type).
2023-05-17 15:12:19 +01:00
Orne Brocaar
0679f10fad Add feature flags to lrwn crate.
This avoids pulling and building unnecessary dependencies for simple
use-cases.
2023-04-27 10:37:34 +01:00
Orne Brocaar
ddea09d9d4 Decode frm_payload mac-commands in device frame log. 2023-03-02 12:21:42 +00:00
Tim Cooijmans
fcdc432812
Update US902-928 to right Downlink MinDR according to RP2-1.0.3 (#115)
RP2-1.0.3 defines that the MinDR for US902-928 is 8 (SF12BW500) not 10 (SF10BW500)
2023-02-14 14:37:23 +00:00
Orne Brocaar
cee3dd8d9c Fix clippy feedback in lrwn crate. 2023-01-07 19:56:07 +00:00
Orne Brocaar
e2214f9485 Add coding_rate field to LoraDataRate (+ fix 2.4GHz coding-rate).
Per Regional Parameters Specification, the LoRa modulation always uses
coding-rate 4/5, however this is not the case for ISM2400 (which is
currently not covered by the reg. params) in which case coding-rate
4/8LI must be used.

Closes #51.
2022-11-08 15:19:45 +00:00
Orne Brocaar
6cc813aed1 Implement DevAddrPrefix type.
This type defines the (NetID derived) prefix that must be used when
generating device addresses. This can be retrieved from the NetID, but
it is also possible to define a prefix that defines a smaller address
range within the NetID.

See also #49.
2022-10-19 12:03:55 +01:00
Orne Brocaar
bb188949df Update dependencies + fix clippy warnings. 2022-09-26 12:58:01 +01:00
Orne Brocaar
d97da8ed50 Fix c > 64 to c >= 64 typo in channel-mask calculation.
Depending the channel-configuration, this would send three LinkADRReq
mac-commands while the same configuration could be send to the device in
two LinkADRReq mac-commands.
2022-08-21 21:48:27 +01:00
Orne Brocaar
92a710fd1e Fix NewChannelReq for LoRaWAN 2.4GHz freqs. 2022-08-08 11:49:47 +01:00
Orne Brocaar
7890dc7539 Also match 1.0 and 1.1 strings for MacVersion. 2022-08-01 14:45:43 +01:00
Orne Brocaar
54d582504f Fix clippy warnings. 2022-08-01 10:24:15 +01:00
Orne Brocaar
3bfb7d577f Fix coding_rate string in test.
The CodeRate type (in Rust) will decode both "1/3" and "2/6" as
CodeRate::Cr26. To string, this type is always encoded to "2/6".
2022-07-25 10:29:46 +01:00
Orne Brocaar
c0a450c8f8 Change LR-FHSS code_rate to CodeRate type. 2022-07-22 12:19:36 +01:00
Orne Brocaar
634aea6a71 Update diesel to 2.0.0-rc.0.
Diesel 1.4.x makes it impossible to properly cross-compile when using
PostgreSQL and thus having a dependency on libpq. On compile and I
believe when using the diesel_migrations crate, there is a dependency on
both the host and target libpq. Unfortunately, only one can be installed
at a time, because of conflicts. See also:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995768

Until now the cross-compile solution is based on docker buildx, which
uses qemu to emulate the different targets. This works, but is very,
very slow.

Diesel 2.0.0-rc.0 no longer depends on both the host and target libpq on
compile and makes it possible to implement proper cross-compiling (using
the rust --target flag in combination with the cross-compile
toolchains).
2022-07-20 10:55:59 +01:00
Orne Brocaar
f27b8da38d Re-implement passive-roaming. 2022-06-30 11:17:26 +01:00
Orne Brocaar
96fe672fc7 Initial commit. 2022-04-06 21:18:32 +01:00