Skip to content

Commit b1c62a9

Browse files
Antti Kauppilaadbridge
authored andcommitted
Unit test for LorawanInterface
1 parent ed8ebf3 commit b1c62a9

File tree

13 files changed

+713
-45
lines changed

13 files changed

+713
-45
lines changed

UNITTESTS/features/cellular/framework/AT/at_cellularinformation/at_cellularinformationtest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ TEST_F(TestAT_CellularInformation, test_AT_CellularInformation_get_manufacturer)
6060
AT_CellularInformation aci(ah);
6161

6262
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
63-
ATHandler_stub::read_string_value = "some";
63+
ATHandler_stub::read_string_value = (char *)"some";
6464
ATHandler_stub::ssize_value = 4;
6565

6666
char buf[8];
@@ -82,7 +82,7 @@ TEST_F(TestAT_CellularInformation, test_AT_CellularInformation_get_model)
8282
AT_CellularInformation aci(ah);
8383

8484
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
85-
ATHandler_stub::read_string_value = "model";
85+
ATHandler_stub::read_string_value = (char *)"model";
8686
ATHandler_stub::ssize_value = 5;
8787
char buf[8];
8888
EXPECT_TRUE(NSAPI_ERROR_OK == aci.get_model(buf, 8));
@@ -105,7 +105,7 @@ TEST_F(TestAT_CellularInformation, test_AT_CellularInformation_get_revision)
105105
AT_CellularInformation *aci = new AT_CellularInformation(ah);
106106

107107
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
108-
ATHandler_stub::read_string_value = "revision";
108+
ATHandler_stub::read_string_value = (char *)"revision";
109109
ATHandler_stub::ssize_value = 8;
110110

111111
char buf[9];
@@ -129,7 +129,7 @@ TEST_F(TestAT_CellularInformation, test_AT_CellularInformation_get_serial_number
129129
AT_CellularInformation aci(ah);
130130

131131
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
132-
ATHandler_stub::read_string_value = "1234567";
132+
ATHandler_stub::read_string_value = (char *)"1234567";
133133
ATHandler_stub::ssize_value = 7;
134134
char buf[8];
135135

@@ -147,7 +147,7 @@ TEST_F(TestAT_CellularInformation, test_AT_CellularInformation_get_serial_number
147147
EXPECT_TRUE(strlen(buf) == 0);
148148

149149
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
150-
ATHandler_stub::read_string_value = "1234567";
150+
ATHandler_stub::read_string_value = (char *)"1234567";
151151
ATHandler_stub::ssize_value = 7;
152152
AT_CellularBase_stub::supported_bool = true;
153153
EXPECT_TRUE(NSAPI_ERROR_OK == aci.get_serial_number(buf, 8, CellularInformation::IMEI));

UNITTESTS/features/cellular/framework/AT/at_cellularnetwork/at_cellularnetworktest.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
252252
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
253253
ATHandler_stub::bool_value = false;
254254
ATHandler_stub::read_string_index = 1;
255-
ATHandler_stub::read_string_table[0] = "";
255+
ATHandler_stub::read_string_table[0] = (char *)"";
256256
ATHandler_stub::int_value = 1;
257257
EXPECT_TRUE(NSAPI_ERROR_UNSUPPORTED == cn.activate_context());
258258

@@ -261,7 +261,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
261261
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
262262
ATHandler_stub::bool_value = false;
263263
ATHandler_stub::read_string_index = 1;
264-
ATHandler_stub::read_string_table[0] = "IPV6";
264+
ATHandler_stub::read_string_table[0] = (char *)"IPV6";
265265
ATHandler_stub::int_value = 1;
266266
EXPECT_TRUE(NSAPI_ERROR_NO_CONNECTION == cn.activate_context());
267267

@@ -270,8 +270,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
270270
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
271271
ATHandler_stub::bool_value = false;
272272
ATHandler_stub::read_string_index = 2;
273-
ATHandler_stub::read_string_table[0] = "internet";
274-
ATHandler_stub::read_string_table[1] = "IP";
273+
ATHandler_stub::read_string_table[0] = (char *)"internet";
274+
ATHandler_stub::read_string_table[1] = (char *)"IP";
275275
ATHandler_stub::int_value = 1;
276276
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_credentials("apn", CellularNetwork::CHAP, "user", "passwd"));
277277
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.activate_context());
@@ -281,8 +281,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
281281
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
282282
ATHandler_stub::bool_value = false;
283283
ATHandler_stub::read_string_index = 2;
284-
ATHandler_stub::read_string_table[0] = "internet";
285-
ATHandler_stub::read_string_table[1] = "IPV4V6";
284+
ATHandler_stub::read_string_table[0] = (char *)"internet";
285+
ATHandler_stub::read_string_table[1] = (char *)"IPV4V6";
286286
ATHandler_stub::int_value = 1;
287287
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_stack_type(IPV4_STACK));
288288
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_credentials("internet"));
@@ -293,8 +293,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
293293
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
294294
ATHandler_stub::bool_value = false;
295295
ATHandler_stub::read_string_index = 2;
296-
ATHandler_stub::read_string_table[0] = "internet";
297-
ATHandler_stub::read_string_table[1] = "IPV6";
296+
ATHandler_stub::read_string_table[0] = (char *)"internet";
297+
ATHandler_stub::read_string_table[1] = (char *)"IPV6";
298298
ATHandler_stub::int_value = 1;
299299
EXPECT_TRUE(NSAPI_ERROR_OK == my_cnipv6.set_stack_type(IPV6_STACK));
300300
EXPECT_TRUE(NSAPI_ERROR_OK == my_cnipv6.set_credentials("internet"));
@@ -305,8 +305,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
305305
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
306306
ATHandler_stub::bool_value = false;
307307
ATHandler_stub::read_string_index = 2;
308-
ATHandler_stub::read_string_table[0] = "internet";
309-
ATHandler_stub::read_string_table[1] = "IPV4V6";
308+
ATHandler_stub::read_string_table[0] = (char *)"internet";
309+
ATHandler_stub::read_string_table[1] = (char *)"IPV4V6";
310310
ATHandler_stub::int_value = 1;
311311
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_stack_type(DEFAULT_STACK));
312312
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_credentials("internet"));
@@ -317,8 +317,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
317317
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
318318
ATHandler_stub::bool_value = false;
319319
ATHandler_stub::read_string_index = 2;
320-
ATHandler_stub::read_string_table[0] = "internet";
321-
ATHandler_stub::read_string_table[1] = "IPV4V6";
320+
ATHandler_stub::read_string_table[0] = (char *)"internet";
321+
ATHandler_stub::read_string_table[1] = (char *)"IPV4V6";
322322
ATHandler_stub::int_value = 1;
323323
EXPECT_TRUE(NSAPI_ERROR_OK == my_cnipv6.set_stack_type(DEFAULT_STACK));
324324
EXPECT_TRUE(NSAPI_ERROR_OK == my_cnipv6.set_credentials("internet"));
@@ -329,8 +329,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
329329
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
330330
ATHandler_stub::bool_value = false;
331331
ATHandler_stub::read_string_index = 2;
332-
ATHandler_stub::read_string_table[0] = "internet";
333-
ATHandler_stub::read_string_table[1] = "IPV6";
332+
ATHandler_stub::read_string_table[0] = (char *)"internet";
333+
ATHandler_stub::read_string_table[1] = (char *)"IPV6";
334334
ATHandler_stub::int_value = 1;
335335
EXPECT_TRUE(NSAPI_ERROR_OK == my_cnipv6.set_stack_type(DEFAULT_STACK));
336336
EXPECT_TRUE(NSAPI_ERROR_OK == my_cnipv6.set_credentials("internet"));
@@ -341,8 +341,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_activate_context)
341341
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
342342
ATHandler_stub::bool_value = false;
343343
ATHandler_stub::read_string_index = 2;
344-
ATHandler_stub::read_string_table[0] = "internet";
345-
ATHandler_stub::read_string_table[1] = "IP";
344+
ATHandler_stub::read_string_table[0] = (char *)"internet";
345+
ATHandler_stub::read_string_table[1] = (char *)"IP";
346346
ATHandler_stub::int_value = 1;
347347
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_stack_type(DEFAULT_STACK));
348348
EXPECT_TRUE(NSAPI_ERROR_OK == my_cn.set_credentials("internet"));
@@ -795,9 +795,9 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_scan_plmn)
795795

796796

797797
ATHandler_stub::read_string_index = 3;
798-
ATHandler_stub::read_string_table[0] = "44444";
799-
ATHandler_stub::read_string_table[1] = "33333";
800-
ATHandler_stub::read_string_table[2] = "12345";
798+
ATHandler_stub::read_string_table[0] = (char *)"44444";
799+
ATHandler_stub::read_string_table[1] = (char *)"33333";
800+
ATHandler_stub::read_string_table[2] = (char *)"12345";
801801
ATHandler_stub::int_value = 1;
802802
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
803803
ATHandler_stub::info_elem_true_counter = 1;
@@ -922,13 +922,13 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_pdpcontext_params)
922922
ATHandler_stub::int_valid_count_table[0] = 9;
923923

924924
ATHandler_stub::read_string_index = 7;
925-
ATHandler_stub::read_string_table[6] = "internet";
926-
ATHandler_stub::read_string_table[5] = "1.2.3.4.5.6.7.8.9.10.11.112.13.14.15.16.1.2.3.44.55.6.7.8.9.10.11.12.13.14.15.16";
927-
ATHandler_stub::read_string_table[4] = "23.33.44.1.2.3.55.123.225.34.11.1.0.0.123.234";
928-
ATHandler_stub::read_string_table[3] = "1.2.3.4";
929-
ATHandler_stub::read_string_table[2] = "0.255.0.255";
930-
ATHandler_stub::read_string_table[1] = "25.66.77.88";
931-
ATHandler_stub::read_string_table[0] = "004.003.002.001";
925+
ATHandler_stub::read_string_table[6] = (char *)"internet";
926+
ATHandler_stub::read_string_table[5] = (char *)"1.2.3.4.5.6.7.8.9.10.11.112.13.14.15.16.1.2.3.44.55.6.7.8.9.10.11.12.13.14.15.16";
927+
ATHandler_stub::read_string_table[4] = (char *)"23.33.44.1.2.3.55.123.225.34.11.1.0.0.123.234";
928+
ATHandler_stub::read_string_table[3] = (char *)"1.2.3.4";
929+
ATHandler_stub::read_string_table[2] = (char *)"0.255.0.255";
930+
ATHandler_stub::read_string_table[1] = (char *)"25.66.77.88";
931+
ATHandler_stub::read_string_table[0] = (char *)"004.003.002.001";
932932

933933
EXPECT_TRUE(NSAPI_ERROR_OK == cn.get_pdpcontext_params(list));
934934
CellularNetwork::pdpcontext_params_t *params = list.get_head();
@@ -1005,8 +1005,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_cell_id)
10051005
EXPECT_TRUE(id == -1);
10061006

10071007
ATHandler_stub::read_string_index = 2;
1008-
ATHandler_stub::read_string_table[1] = "00C3";
1009-
ATHandler_stub::read_string_table[0] = "1234FFC1"; //== cellid and in dec: 305463233
1008+
ATHandler_stub::read_string_table[1] = (char *)"00C3";
1009+
ATHandler_stub::read_string_table[0] = (char *)"1234FFC1"; //== cellid and in dec: 305463233
10101010
ATHandler_stub::int_value = 1;
10111011
// Get registration status to modify cell_id
10121012
CellularNetwork::RegistrationType type;
@@ -1043,7 +1043,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_operator_params)
10431043
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
10441044
ATHandler_stub::int_value = 0;
10451045
ATHandler_stub::read_string_index = 1;
1046-
ATHandler_stub::read_string_table[0] = "12345";
1046+
ATHandler_stub::read_string_table[0] = (char *)"12345";
10471047
EXPECT_TRUE(NSAPI_ERROR_OK == cn.get_operator_params(format, ops));
10481048
EXPECT_TRUE(format == 0);
10491049
EXPECT_TRUE(strcmp(ops.op_long, "12345") == 0);
@@ -1054,7 +1054,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_operator_params)
10541054
ops.op_long[0] = 0;
10551055
ATHandler_stub::int_value = 1;
10561056
ATHandler_stub::read_string_index = 1;
1057-
ATHandler_stub::read_string_table[0] = "12345";
1057+
ATHandler_stub::read_string_table[0] = (char *)"12345";
10581058
EXPECT_TRUE(NSAPI_ERROR_OK == cn.get_operator_params(format, ops));
10591059
EXPECT_TRUE(format == 1);
10601060
EXPECT_TRUE(strlen(ops.op_long) == 0);
@@ -1065,7 +1065,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_operator_params)
10651065
ops.op_short[0] = 0;
10661066
ATHandler_stub::int_value = 2;
10671067
ATHandler_stub::read_string_index = 1;
1068-
ATHandler_stub::read_string_table[0] = "12345";
1068+
ATHandler_stub::read_string_table[0] = (char *)"12345";
10691069
EXPECT_TRUE(NSAPI_ERROR_OK == cn.get_operator_params(format, ops));
10701070
EXPECT_TRUE(format == 2);
10711071
EXPECT_TRUE(strlen(ops.op_long) == 0);
@@ -1097,8 +1097,8 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_operator_names)
10971097
ATHandler_stub::resp_info_true_counter = 1;
10981098
ATHandler_stub::bool_value = false;
10991099
ATHandler_stub::read_string_index = 2;
1100-
ATHandler_stub::read_string_table[1] = "12345";
1101-
ATHandler_stub::read_string_table[0] = "56789";
1100+
ATHandler_stub::read_string_table[1] = (char *)"12345";
1101+
ATHandler_stub::read_string_table[0] = (char *)"56789";
11021102
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
11031103
name_list.delete_all();
11041104
EXPECT_TRUE(NSAPI_ERROR_OK == cn.get_operator_names(name_list));

UNITTESTS/features/cellular/framework/AT/at_cellularsim/at_cellularsimtest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ TEST_F(TestAT_CellularSIM, test_AT_CellularSIM_set_pin)
7373
EXPECT_TRUE(NSAPI_ERROR_DEVICE_ERROR == sim.set_pin("12"));
7474

7575
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
76-
ATHandler_stub::read_string_value = "READY";
76+
ATHandler_stub::read_string_value = (char *)"READY";
7777
ATHandler_stub::ssize_value = 5;
7878
EXPECT_TRUE(NSAPI_ERROR_OK == sim.set_pin("12"));
7979

@@ -131,22 +131,22 @@ TEST_F(TestAT_CellularSIM, test_AT_CellularSIM_get_sim_state)
131131
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_sim_state(state));
132132
EXPECT_TRUE(CellularSIM::SimStateUnknown == state);
133133

134-
ATHandler_stub::read_string_value = "READY";
134+
ATHandler_stub::read_string_value = (char *)"READY";
135135
ATHandler_stub::ssize_value = 5;
136136
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_sim_state(state));
137137
EXPECT_TRUE(CellularSIM::SimStateReady == state);
138138

139-
ATHandler_stub::read_string_value = "SIM PIN";
139+
ATHandler_stub::read_string_value = (char *)"SIM PIN";
140140
ATHandler_stub::ssize_value = 7;
141141
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_sim_state(state));
142142
EXPECT_TRUE(CellularSIM::SimStatePinNeeded == state);
143143

144-
ATHandler_stub::read_string_value = "SIM PUK";
144+
ATHandler_stub::read_string_value = (char *)"SIM PUK";
145145
ATHandler_stub::ssize_value = 7;
146146
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_sim_state(state));
147147
EXPECT_TRUE(CellularSIM::SimStatePukNeeded == state);
148148

149-
ATHandler_stub::read_string_value = "SOME CRAP";
149+
ATHandler_stub::read_string_value = (char *)"SOME CRAP";
150150
ATHandler_stub::ssize_value = 9;
151151
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_sim_state(state));
152152
EXPECT_TRUE(CellularSIM::SimStateUnknown == state);
@@ -161,7 +161,7 @@ TEST_F(TestAT_CellularSIM, test_AT_CellularSIM_get_imsi)
161161
char imsi[16];
162162
AT_CellularSIM sim(at);
163163
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
164-
ATHandler_stub::read_string_value = "123456789012345";
164+
ATHandler_stub::read_string_value = (char *)"123456789012345";
165165
ATHandler_stub::ssize_value = 15;
166166
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_imsi(imsi));
167167
EXPECT_TRUE(strcmp(ATHandler_stub::read_string_value, imsi) == 0);
@@ -190,7 +190,7 @@ TEST_F(TestAT_CellularSIM, test_AT_CellularSIM_get_iccid)
190190
char buf[16];
191191
AT_CellularSIM sim(at);
192192
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
193-
ATHandler_stub::read_string_value = "123456789012345";
193+
ATHandler_stub::read_string_value = (char *)"123456789012345";
194194
ATHandler_stub::ssize_value = 15;
195195
EXPECT_TRUE(NSAPI_ERROR_OK == sim.get_iccid(buf, 16));
196196
EXPECT_TRUE(strcmp(ATHandler_stub::read_string_value, buf) == 0);
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2018, Arm Limited and affiliates
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include "gtest/gtest.h"
19+
#include "LoRaMac.h"
20+
21+
using namespace events;
22+
23+
class Test_LoRaMac : public testing::Test {
24+
protected:
25+
LoRaMac *object;
26+
27+
virtual void SetUp()
28+
{
29+
object = new LoRaMac();
30+
}
31+
32+
virtual void TearDown()
33+
{
34+
delete object;
35+
}
36+
};
37+
38+
TEST_F(Test_LoRaMac, constructor)
39+
{
40+
EXPECT_TRUE(object);
41+
}
42+
43+
void my_cb()
44+
{
45+
46+
}
47+
48+
TEST_F(Test_LoRaMac, initialize)
49+
{
50+
EXPECT_TRUE(LORAWAN_STATUS_OK == object->initialize(NULL, my_cb));
51+
}
52+
53+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#[[
2+
* Copyright (c) 2018, Arm Limited and affiliates
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
]]
17+
18+
# Unit test suite name
19+
set(TEST_SUITE_NAME "lorawan_LoRaMac")
20+
21+
# Source files
22+
set(unittest-sources
23+
../features/lorawan/lorastack/mac/LoRaMac.cpp
24+
)
25+
26+
# Add test specific include paths
27+
set(unittest-includes ${unittest-includes}
28+
target_h
29+
../features/lorawan/lorastack/mac
30+
)
31+
32+
# Test & stub files
33+
set(unittest-test-sources
34+
../features/lorawan/loramac/Test_LoRaMac.cpp
35+
stubs/LoRaPHY_stub.cpp
36+
stubs/LoRaWANStack_stub.cpp
37+
stubs/mbed_assert_stub.c
38+
stubs/LoRaMacCrypto_stub.cpp
39+
stubs/LoRaMacChannelPlan_stub.cpp
40+
stubs/LoRaWANTimer_stub.cpp
41+
stubs/LoRaMacCommand_stub.cpp
42+
stubs/EventQueue_stub.cpp
43+
44+
)
45+
46+
# defines
47+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_ADR_ON=true -DMBED_CONF_LORA_PUBLIC_NETWORK=true -DMBED_CONF_LORA_NB_TRIALS=2 -DMBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5")
48+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_ADR_ON=true -DMBED_CONF_LORA_PUBLIC_NETWORK=true -DMBED_CONF_LORA_NB_TRIALS=2 -DMBED_CONF_LORA_DOWNLINK_PREAMBLE_LENGTH=5")
49+
50+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_DUTY_CYCLE_ON=true -DMBED_CONF_LORA_MAX_SYS_RX_ERROR=10 -DMBED_CONF_LORA_NWKSKEY=\"{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\"")
51+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_DUTY_CYCLE_ON=true -DMBED_CONF_LORA_MAX_SYS_RX_ERROR=10 -DMBED_CONF_LORA_NWKSKEY=\"{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\"")
52+
53+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_APPSKEY=\"{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\"")
54+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_APPSKEY=\"{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}\"")
55+
56+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_LORA_DEVICE_ADDRESS=\"0x00000000\"")
57+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_LORA_DEVICE_ADDRESS=\"0x00000000\"")
58+

0 commit comments

Comments
 (0)