diff --git a/Dockerfile b/Dockerfile index 7c6f703ac..1ddee07b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Copy binary stage -FROM --platform=$BUILDPLATFORM alpine:3.18.0 as binary +FROM --platform=$BUILDPLATFORM alpine:3.20.0 AS binary ARG TARGETPLATFORM @@ -8,23 +8,23 @@ COPY target/armv7-unknown-linux-musleabihf/release/chirpstack /usr/bin/chirpstac COPY target/aarch64-unknown-linux-musl/release/chirpstack /usr/bin/chirpstack-aarch64 RUN case "$TARGETPLATFORM" in \ - "linux/amd64") \ - cp /usr/bin/chirpstack-x86_64 /usr/bin/chirpstack; \ - ;; \ - "linux/arm/v7") \ - cp /usr/bin/chirpstack-armv7hf /usr/bin/chirpstack; \ - ;; \ - "linux/arm64") \ - cp /usr/bin/chirpstack-aarch64 /usr/bin/chirpstack; \ - ;; \ - esac; + "linux/amd64") \ + cp /usr/bin/chirpstack-x86_64 /usr/bin/chirpstack; \ + ;; \ + "linux/arm/v7") \ + cp /usr/bin/chirpstack-armv7hf /usr/bin/chirpstack; \ + ;; \ + "linux/arm64") \ + cp /usr/bin/chirpstack-aarch64 /usr/bin/chirpstack; \ + ;; \ + esac; # Final stage -FROM alpine:3.18.0 +FROM alpine:3.20.0 RUN apk --no-cache add \ - ca-certificates + ca-certificates COPY --from=binary /usr/bin/chirpstack /usr/bin/chirpstack USER nobody:nogroup -ENTRYPOINT ["/usr/bin/chirpstack"] \ No newline at end of file +ENTRYPOINT ["/usr/bin/chirpstack"] diff --git a/chirpstack/src/test/class_a_pr_test.rs b/chirpstack/src/test/class_a_pr_test.rs index bfcc5b14b..edf2392e1 100644 --- a/chirpstack/src/test/class_a_pr_test.rs +++ b/chirpstack/src/test/class_a_pr_test.rs @@ -242,7 +242,7 @@ async fn test_sns_uplink() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), diff --git a/chirpstack/src/test/class_a_test.rs b/chirpstack/src/test/class_a_test.rs index e6109a5b8..89bb717e7 100644 --- a/chirpstack/src/test/class_a_test.rs +++ b/chirpstack/src/test/class_a_test.rs @@ -304,7 +304,7 @@ async fn test_region_config_id_filtering() { nwk_s_enc_key: vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], f_cnt_up: 7, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -804,7 +804,7 @@ async fn test_lorawan_10_skip_f_cnt() { nwk_s_enc_key: vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, skip_f_cnt_check: true, @@ -1131,7 +1131,7 @@ async fn test_lorawan_10_uplink() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -1760,7 +1760,7 @@ async fn test_lorawan_10_end_to_end_enc() { js_session_key_id: vec![1, 2, 3], f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -1779,7 +1779,7 @@ async fn test_lorawan_10_end_to_end_enc() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -2097,7 +2097,7 @@ async fn test_lorawan_11_uplink() { f_cnt_up: 8, n_f_cnt_down: 5, conf_f_cnt: 4, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -2335,7 +2335,7 @@ async fn test_lorawan_10_rx_delay() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, region_config_id: "eu868".into(), rx1_delay: 3, @@ -2780,7 +2780,7 @@ async fn test_lorawan_10_mac_commands() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, region_config_id: "eu868".into(), rx1_delay: 1, @@ -3145,7 +3145,7 @@ async fn test_lorawan_11_mac_commands() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, region_config_id: "eu868".into(), rx1_delay: 1, @@ -3339,7 +3339,7 @@ async fn test_lorawan_10_device_queue() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -3817,7 +3817,7 @@ async fn test_lorawan_11_device_queue() { f_cnt_up: 8, n_f_cnt_down: 5, a_f_cnt_down: 3, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, rx1_delay: 1, region_config_id: "eu868".into(), @@ -4297,7 +4297,7 @@ async fn test_lorawan_10_adr() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, rx1_delay: 1, region_config_id: "eu868".into(), @@ -4375,7 +4375,7 @@ async fn test_lorawan_10_adr() { dr: 3, tx_power: 0, ch_mask: lrwn::ChMask::new([ - true, true, true, false, false, false, false, false, + true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, ]), redundancy: lrwn::Redundancy { @@ -4388,7 +4388,7 @@ async fn test_lorawan_10_adr() { f_port: None, frm_payload: None, }), - mic: Some([57, 103, 222, 92]), + mic: Some([149, 254, 5, 160]), }, lrwn::PhyPayload { mhdr: lrwn::MHDR { @@ -4409,7 +4409,7 @@ async fn test_lorawan_10_adr() { dr: 3, tx_power: 0, ch_mask: lrwn::ChMask::new([ - true, true, true, false, false, false, false, false, + true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, ]), redundancy: lrwn::Redundancy { @@ -4422,7 +4422,7 @@ async fn test_lorawan_10_adr() { f_port: None, frm_payload: None, }), - mic: Some([57, 103, 222, 92]), + mic: Some([149, 254, 5, 160]), }, ]), ], @@ -4476,7 +4476,7 @@ async fn test_lorawan_10_adr() { dr: 0, tx_power: 3, ch_mask: lrwn::ChMask::new([ - true, true, true, false, false, false, false, false, false, + true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, ]), redundancy: lrwn::Redundancy { @@ -4526,7 +4526,7 @@ async fn test_lorawan_10_adr() { assert::tx_power_index(dev.dev_eui, 3), assert::dr(dev.dev_eui, 0), assert::nb_trans(dev.dev_eui, 1), - assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2]), + assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2, 3]), ], }, Test { @@ -4544,7 +4544,7 @@ async fn test_lorawan_10_adr() { dr: 0, tx_power: 3, ch_mask: lrwn::ChMask::new([ - true, true, true, false, false, false, false, false, false, + true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, ]), redundancy: lrwn::Redundancy { @@ -4594,7 +4594,7 @@ async fn test_lorawan_10_adr() { assert::tx_power_index(dev.dev_eui, 0), assert::dr(dev.dev_eui, 0), assert::nb_trans(dev.dev_eui, 0), - assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2]), + assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2, 3]), ], }, Test { @@ -4629,7 +4629,7 @@ async fn test_lorawan_10_adr() { assert: vec![ assert::f_cnt_up(dev.dev_eui, 11), assert::n_f_cnt_down(dev.dev_eui, 5), - assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2]), + assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2, 3]), assert::downlink_phy_payloads(vec![ lrwn::PhyPayload { mhdr: lrwn::MHDR { @@ -4719,8 +4719,10 @@ async fn test_lorawan_10_adr() { }, f_opts: lrwn::MACCommandSet::new(vec![ lrwn::MACCommand::LinkADRReq(lrwn::LinkADRReqPayload { - ch_mask: lrwn::ChMask::from_slice(&[true, true, true]) - .unwrap(), + ch_mask: lrwn::ChMask::from_slice(&[ + true, true, true, true, + ]) + .unwrap(), dr: 0, tx_power: 0, redundancy: lrwn::Redundancy { @@ -4733,7 +4735,7 @@ async fn test_lorawan_10_adr() { f_port: None, frm_payload: None, }), - mic: Some([0x8, 0xee, 0xdd, 0x34]), + mic: Some([0xdf, 0xf1, 0x3c, 0x30]), }, lrwn::PhyPayload { mhdr: lrwn::MHDR { @@ -4751,8 +4753,10 @@ async fn test_lorawan_10_adr() { }, f_opts: lrwn::MACCommandSet::new(vec![ lrwn::MACCommand::LinkADRReq(lrwn::LinkADRReqPayload { - ch_mask: lrwn::ChMask::from_slice(&[true, true, true]) - .unwrap(), + ch_mask: lrwn::ChMask::from_slice(&[ + true, true, true, true, + ]) + .unwrap(), dr: 0, tx_power: 0, redundancy: lrwn::Redundancy { @@ -4765,7 +4769,7 @@ async fn test_lorawan_10_adr() { f_port: None, frm_payload: None, }), - mic: Some([0x8, 0xee, 0xdd, 0x34]), + mic: Some([0xdf, 0xf1, 0x3c, 0x30]), }, ]), assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2, 3, 4, 5, 6, 7]), @@ -4786,7 +4790,7 @@ async fn test_lorawan_10_adr() { dr: 0, tx_power: 1, ch_mask: lrwn::ChMask::new([ - true, true, true, false, false, false, false, false, false, + true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, ]), redundancy: lrwn::Redundancy { @@ -4834,7 +4838,7 @@ async fn test_lorawan_10_adr() { assert::f_cnt_up(dev.dev_eui, 11), assert::n_f_cnt_down(dev.dev_eui, 5), assert::no_downlink_frame(), - assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2]), + assert::enabled_uplink_channel_indices(dev.dev_eui, vec![0, 1, 2, 3]), ], }, Test { @@ -4852,7 +4856,7 @@ async fn test_lorawan_10_adr() { dr: 0, tx_power: 1, ch_mask: lrwn::ChMask::new([ - true, true, true, false, false, false, false, false, false, + true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, ]), redundancy: lrwn::Redundancy { @@ -4954,8 +4958,10 @@ async fn test_lorawan_10_adr() { lrwn::MACCommand::LinkADRReq(lrwn::LinkADRReqPayload { dr: 3, tx_power: 0, - ch_mask: lrwn::ChMask::from_slice(&[true, true, true]) - .unwrap(), + ch_mask: lrwn::ChMask::from_slice(&[ + true, true, true, true, + ]) + .unwrap(), redundancy: lrwn::Redundancy { ch_mask_cntl: 0, nb_rep: 1, @@ -4966,7 +4972,7 @@ async fn test_lorawan_10_adr() { f_port: None, frm_payload: None, }), - mic: Some([57, 103, 222, 92]), + mic: Some([149, 254, 5, 160]), }, lrwn::PhyPayload { mhdr: lrwn::MHDR { @@ -4986,8 +4992,10 @@ async fn test_lorawan_10_adr() { lrwn::MACCommand::LinkADRReq(lrwn::LinkADRReqPayload { dr: 3, tx_power: 0, - ch_mask: lrwn::ChMask::from_slice(&[true, true, true]) - .unwrap(), + ch_mask: lrwn::ChMask::from_slice(&[ + true, true, true, true, + ]) + .unwrap(), redundancy: lrwn::Redundancy { ch_mask_cntl: 0, nb_rep: 1, @@ -4998,7 +5006,7 @@ async fn test_lorawan_10_adr() { f_port: None, frm_payload: None, }), - mic: Some([57, 103, 222, 92]), + mic: Some([149, 254, 5, 160]), }, ]), ], @@ -5140,7 +5148,7 @@ async fn test_lorawan_10_device_status_request() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, rx1_delay: 1, region_config_id: "eu868".into(), @@ -5412,7 +5420,7 @@ async fn test_lorawan_11_receive_window_selection() { f_cnt_up: 8, n_f_cnt_down: 5, conf_f_cnt: 4, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, rx1_delay: 1, region_config_id: "eu868".into(), diff --git a/chirpstack/src/test/class_b_test.rs b/chirpstack/src/test/class_b_test.rs index f5f3ff5cd..c71d9dc85 100644 --- a/chirpstack/src/test/class_b_test.rs +++ b/chirpstack/src/test/class_b_test.rs @@ -117,7 +117,7 @@ async fn test_uplink() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, region_config_id: "eu868".into(), ..Default::default() @@ -265,7 +265,7 @@ async fn test_downlink_scheduler() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, region_config_id: "eu868".into(), class_b_ping_slot_freq: 868300000, diff --git a/chirpstack/src/test/class_c_test.rs b/chirpstack/src/test/class_c_test.rs index bc4b818e9..a656147f5 100644 --- a/chirpstack/src/test/class_c_test.rs +++ b/chirpstack/src/test/class_c_test.rs @@ -99,7 +99,7 @@ async fn test_downlink_scheduler() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx2_frequency: 869525000, region_config_id: "eu868".into(), ..Default::default() diff --git a/chirpstack/src/test/otaa_js_test.rs b/chirpstack/src/test/otaa_js_test.rs index 7a7921f78..c4eaf1fa5 100644 --- a/chirpstack/src/test/otaa_js_test.rs +++ b/chirpstack/src/test/otaa_js_test.rs @@ -166,7 +166,7 @@ async fn test_js() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, @@ -230,7 +230,7 @@ async fn test_js() { js_session_key_id: vec![1, 2, 3, 4], rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, @@ -303,7 +303,7 @@ async fn test_js() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, diff --git a/chirpstack/src/test/otaa_test.rs b/chirpstack/src/test/otaa_test.rs index d6f5bb699..04968e703 100644 --- a/chirpstack/src/test/otaa_test.rs +++ b/chirpstack/src/test/otaa_test.rs @@ -188,7 +188,7 @@ async fn test_gateway_filtering() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, @@ -429,7 +429,7 @@ async fn test_lorawan_10() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, @@ -622,7 +622,7 @@ async fn test_lorawan_10() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), skip_f_cnt_check: true, @@ -669,10 +669,10 @@ async fn test_lorawan_10() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2, 3, 4, 5, 6, 7], + enabled_uplink_channel_indices: vec![0, 1, 2, 3, 4, 5, 6, 7, 8], extra_uplink_channels: [ ( - 3, + 4, internal::DeviceSessionChannel { frequency: 867100000, min_dr: 0, @@ -680,7 +680,7 @@ async fn test_lorawan_10() { }, ), ( - 4, + 5, internal::DeviceSessionChannel { frequency: 867300000, min_dr: 0, @@ -688,7 +688,7 @@ async fn test_lorawan_10() { }, ), ( - 5, + 6, internal::DeviceSessionChannel { frequency: 867500000, min_dr: 0, @@ -696,7 +696,7 @@ async fn test_lorawan_10() { }, ), ( - 6, + 7, internal::DeviceSessionChannel { frequency: 867700000, min_dr: 0, @@ -704,7 +704,7 @@ async fn test_lorawan_10() { }, ), ( - 7, + 8, internal::DeviceSessionChannel { frequency: 867900000, min_dr: 0, @@ -1050,7 +1050,7 @@ async fn test_lorawan_11() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, diff --git a/chirpstack/src/test/relay_class_a_test.rs b/chirpstack/src/test/relay_class_a_test.rs index c2b9255ae..60a720afb 100644 --- a/chirpstack/src/test/relay_class_a_test.rs +++ b/chirpstack/src/test/relay_class_a_test.rs @@ -135,7 +135,7 @@ async fn test_lorawan_10() { }), f_cnt_up: 8, n_f_cnt_down: 5, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), @@ -154,7 +154,7 @@ async fn test_lorawan_10() { }), f_cnt_up: 88, n_f_cnt_down: 55, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], rx1_delay: 1, rx2_frequency: 869525000, region_config_id: "eu868".into(), diff --git a/chirpstack/src/test/relay_otaa_test.rs b/chirpstack/src/test/relay_otaa_test.rs index fe6121e4f..ee70151e4 100644 --- a/chirpstack/src/test/relay_otaa_test.rs +++ b/chirpstack/src/test/relay_otaa_test.rs @@ -286,7 +286,7 @@ async fn test_lorawan_10() { }), rx1_delay: 1, rx2_frequency: 869525000, - enabled_uplink_channel_indices: vec![0, 1, 2], + enabled_uplink_channel_indices: vec![0, 1, 2, 3], nb_trans: 1, region_config_id: "eu868".to_string(), class_b_ping_slot_nb: 1, diff --git a/lrwn/src/region/eu868.rs b/lrwn/src/region/eu868.rs index 7c169425f..148a0b332 100644 --- a/lrwn/src/region/eu868.rs +++ b/lrwn/src/region/eu868.rs @@ -156,6 +156,14 @@ impl Configuration { }), }, ), + ( + 12, + DataRate { + uplink: true, + downlink: true, + modulation: DataRateModulation::Fsk(FskDataRate { bitrate: 200000 }), + }, + ), ] .iter() .cloned() @@ -175,6 +183,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -197,6 +206,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -219,6 +229,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -241,6 +252,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -263,6 +275,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -286,6 +299,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -302,6 +316,7 @@ impl Configuration { (5, MaxPayloadSize { m: 230, n: 222 }), (6, MaxPayloadSize { m: 230, n: 222 }), (7, MaxPayloadSize { m: 230, n: 222 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -322,6 +337,7 @@ impl Configuration { (9, MaxPayloadSize { m: 123, n: 115 }), (10, MaxPayloadSize { m: 58, n: 50 }), (11, MaxPayloadSize { m: 123, n: 115 }), + (12, MaxPayloadSize { m: 230, n: 222 }), ] .iter() .cloned() @@ -350,6 +366,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -372,6 +389,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -394,6 +412,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -416,6 +435,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -438,6 +458,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -461,6 +482,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -477,6 +499,7 @@ impl Configuration { (5, MaxPayloadSize { m: 250, n: 242 }), (6, MaxPayloadSize { m: 250, n: 242 }), (7, MaxPayloadSize { m: 250, n: 242 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -497,6 +520,7 @@ impl Configuration { (9, MaxPayloadSize { m: 123, n: 115 }), (10, MaxPayloadSize { m: 58, n: 50 }), (11, MaxPayloadSize { m: 123, n: 115 }), + (12, MaxPayloadSize { m: 250, n: 242 }), ] .iter() .cloned() @@ -525,6 +549,7 @@ impl Configuration { (9, vec![2, 1, 0, 0, 0, 0]), (10, vec![1, 0, 0, 0, 0, 0]), (11, vec![2, 1, 0, 0, 0, 0]), + (12, vec![5, 5, 5, 4, 3, 2]), ] .iter() .cloned() @@ -552,6 +577,13 @@ impl Configuration { enabled: true, user_defined: false, }, + Channel { + frequency: 868600000, + min_dr: 12, + max_dr: 12, + enabled: true, + user_defined: false, + }, ], downlink_channels: vec![ Channel { @@ -575,6 +607,13 @@ impl Configuration { enabled: true, user_defined: false, }, + Channel { + frequency: 868600000, + min_dr: 12, + max_dr: 12, + enabled: true, + user_defined: false, + }, ], }, } @@ -844,7 +883,7 @@ mod tests { #[test] fn get_user_defined_uplink_channel_indices() { assert_eq!( - vec![3, 4, 5, 6, 7], + vec![4, 5, 6, 7, 8], config_with_user_channels().get_user_defined_uplink_channel_indices() ); } @@ -864,7 +903,7 @@ mod tests { Test { device_channels: vec![], disabled_channels: vec![], - expected_uplink_channels: vec![0, 1, 2], + expected_uplink_channels: vec![0, 1, 2, 3], expected_link_adr_req_payloads: vec![LinkADRReqPayload { dr: 0, tx_power: 0, @@ -872,15 +911,15 @@ mod tests { ch_mask_cntl: 0, nb_rep: 0, }, - ch_mask: ChMask::from_slice(&[true, true, true]).unwrap(), + ch_mask: ChMask::from_slice(&[true, true, true, true]).unwrap(), }], }, // Base channels are active // Do not activate the CFList channels as we don't now if the node knows about these frequencies. Test { - device_channels: vec![0, 1, 2], + device_channels: vec![0, 1, 2, 3], disabled_channels: vec![], - expected_uplink_channels: vec![0, 1, 2], + expected_uplink_channels: vec![0, 1, 2, 3], expected_link_adr_req_payloads: vec![], }, // Base channels + two CFList channels are active @@ -895,9 +934,9 @@ mod tests { // network. // We disable the CFList channels as they became inactive. Test { - device_channels: vec![0, 1, 2, 3, 4, 5, 6, 7], - disabled_channels: vec![3, 4, 5, 6, 7], - expected_uplink_channels: vec![0, 1, 2], + device_channels: vec![0, 1, 2, 3, 4, 5, 6, 7, 8], + disabled_channels: vec![4, 5, 6, 7, 8], + expected_uplink_channels: vec![0, 1, 2, 3], expected_link_adr_req_payloads: vec![LinkADRReqPayload { dr: 0, tx_power: 0, @@ -905,7 +944,7 @@ mod tests { ch_mask_cntl: 0, nb_rep: 0, }, - ch_mask: ChMask::from_slice(&[true, true, true]).unwrap(), + ch_mask: ChMask::from_slice(&[true, true, true, true]).unwrap(), }], }, ]; @@ -938,6 +977,7 @@ mod tests { (false, 868100000), (false, 868300000), (false, 868500000), + (false, 868600000), (true, 867100000), (true, 867300000), (true, 867500000), @@ -957,6 +997,7 @@ mod tests { (3, 868100000), (3, 868300000), (3, 868500000), + (12, 868600000), (3, 867100000), (3, 867300000), (3, 867500000),