Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
LoRaWAN benchmark
RIOT - IM880B
Commits
edb85a0c
Commit
edb85a0c
authored
Apr 30, 2019
by
Guillaume Gonnet
Browse files
Orange provider is now working!
parent
e1a249c7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
12 deletions
+29
-12
src/app/main.c
src/app/main.c
+2
-1
src/app/providers/providers.c
src/app/providers/providers.c
+13
-2
src/app/providers/providers.h
src/app/providers/providers.h
+3
-0
src/appmem.h
src/appmem.h
+2
-1
src/lorakeys.h
src/lorakeys.h
+8
-4
src/lorariot/controller/controller.h
src/lorariot/controller/controller.h
+1
-1
src/lorariot/controller/send.c
src/lorariot/controller/send.c
+0
-3
No files found.
src/app/main.c
View file @
edb85a0c
...
...
@@ -21,7 +21,7 @@ This project is under the MIT license
// TMP: send a ping message.
static
void
send_message
(
void
)
{
bm_encode_payload
(
9
,
4
,
0
);
bm_encode_payload
(
9
,
2
,
1
);
puts
(
"Sending message ..."
);
pvd_send
(
&
pvd_orange_cmd
,
&
bm_payload
);
...
...
@@ -45,6 +45,7 @@ int main(void)
// pvd_reset_all();
#endif
return
0
;
// xtimer_sleep(10);
uint32_t
start
=
xtimer_now_usec
();
...
...
src/app/providers/providers.c
View file @
edb85a0c
...
...
@@ -39,6 +39,17 @@ static const pvd_otta_t orange_cmd_otta = {
const
provider_t
pvd_orange_cmd
=
PVD_IMPLEM_OTAA
(
orange_cmd_otta
);
// Campus IOT provider (using OTAA).
static
const
pvd_otta_t
campus_otta
=
{
EEPROM_CAMPUS_OTAA
,
CAMPUS_IOT_DEVEUI
,
CAMPUS_IOT_APPEUI
,
CAMPUS_IOT_APPKEY
};
const
provider_t
pvd_campus_otaa
=
PVD_IMPLEM_OTAA
(
campus_otta
);
// TTN provider (for benchmark).
static
const
pvd_ttn_t
ttn_bm_ttn
=
{
EEPROM_TTN_BM
,
TTN_BM_COUNT
,
...
...
@@ -53,8 +64,8 @@ const provider_t pvd_ttn_bm = PVD_IMPLEM_TTN(ttn_bm_ttn);
// All defined providers.
static
const
provider_t
*
pvd_all
[]
=
{
&
pvd_orange_bm
,
//
&pvd_orange_cmd,
//
&pvd_orange_bm,
&
pvd_orange_cmd
,
&
pvd_ttn_bm
};
...
...
src/app/providers/providers.h
View file @
edb85a0c
...
...
@@ -68,6 +68,9 @@ void pvd_ttn_reset(const provider_t *pvd);
extern
const
provider_t
pvd_orange_bm
;
extern
const
provider_t
pvd_orange_cmd
;
// Campus IOT providers.
extern
const
provider_t
pvd_campus_otaa
;
// TTN provider.
extern
const
provider_t
pvd_ttn_bm
;
...
...
src/appmem.h
View file @
edb85a0c
...
...
@@ -18,6 +18,7 @@ OTAA join cache takes 32 bytes + 4 bytes for the frame counter.
// EEPROM space for join cache (36 bytes).
#define EEPROM_ORANGE_BM 0
#define EEPROM_ORANGE_CMD 36
#define EEPROM_CAMPUS_OTAA 72
// EEPROM space for TTN.
#define EEPROM_TTN_BM
72
#define EEPROM_TTN_BM
108
src/lorakeys.h
View file @
edb85a0c
...
...
@@ -14,13 +14,17 @@ This project is under the MIT license
#define ORANGE_BM_APPKEY { 0x4B, 0x20, 0xEF, 0x23, 0xB1, 0xC3, 0xA9, 0x39, 0x3F, 0x03, 0x4F, 0x65, 0x27, 0xCA, 0x71, 0xF2 }
// Orange provider for command.
// #define ORANGE_CMD_DEVEUI { 0x18, 0xC0, 0x81, 0xB5, 0x70, 0x9C, 0x54, 0x55 }
// #define ORANGE_CMD_APPEUI { 0x90, 0x5C, 0x55, 0x55, 0xC7, 0xCD, 0x88, 0xBE }
#define ORANGE_CMD_DEVEUI { 0x19, 0xC0, 0x81, 0xB5, 0x70, 0x9C, 0x54, 0x55 }
#define ORANGE_CMD_APPEUI { 0x91, 0x5C, 0x55, 0x55, 0xC7, 0xCD, 0x88, 0xBE }
#define ORANGE_CMD_DEVEUI { 0x18, 0xC0, 0x81, 0xB5, 0x70, 0x9C, 0x54, 0x55 }
#define ORANGE_CMD_APPEUI { 0x90, 0x5C, 0x55, 0x55, 0xC7, 0xCD, 0x88, 0xBE }
#define ORANGE_CMD_APPKEY { 0x08, 0xAC, 0xA9, 0x4C, 0xA5, 0xFD, 0x3E, 0xF1, 0x11, 0x9D, 0x7B, 0x73, 0x5E, 0xE7, 0x3D, 0x5A }
// Campus IOT (using OTAA).
#define CAMPUS_IOT_DEVEUI { 0x19, 0xC0, 0x81, 0xB5, 0x70, 0x9C, 0x54, 0x55 }
#define CAMPUS_IOT_APPEUI { 0x19, 0xC0, 0x81, 0xB5, 0x70, 0x9C, 0x54, 0x55 }
#define CAMPUS_IOT_APPKEY { 0x08, 0xAC, 0xA9, 0x4C, 0xA5, 0xFD, 0x3E, 0xF1, 0x11, 0x9D, 0x7B, 0x73, 0x5E, 0xE7, 0x3D, 0x5A }
// TTN provider for benchmark.
#define TTN_BM_DEVADDR 0x26019200
#define TTN_BM_COUNT 256
...
...
src/lorariot/controller/controller.h
View file @
edb85a0c
...
...
@@ -17,7 +17,7 @@ LGPLv2.1 license.
#include <msg.h>
#include <net/netdev.h>
#define ENABLE_DEBUG (
0
)
#define ENABLE_DEBUG (
1
)
#include <debug.h>
...
...
src/lorariot/controller/send.c
View file @
edb85a0c
...
...
@@ -102,13 +102,11 @@ int lorariot_send(const lorariot_mcps_t *mcps)
{
// Call `LoRaMacMcpsRequest` in event loop thread.
lorariot_call
((
lorariot_func_t
)
_send_mcps
,
(
void
*
)
mcps
);
DEBUG
(
"[lorariot] MCPS call requested!
\n
"
);
// Wait for TX status information from LoRaMAC-node.
msg_t
msg
;
msg_receive
(
&
msg
);
DEBUG
(
"[lorariot] MCPS requested!
\n
"
);
return
msg
.
content
.
value
;
}
...
...
@@ -118,7 +116,6 @@ int lorariot_waitsend(void)
{
lorariot
.
caller_pid
=
thread_getpid
();
DEBUG
(
"[lorariot] Wait for confirm!
\n
"
);
msg_t
msg
;
msg_receive
(
&
msg
);
return
msg
.
content
.
value
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment