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
e1a249c7
Commit
e1a249c7
authored
Apr 30, 2019
by
Guillaume Gonnet
Browse files
Make LoRaMAC-node faster when no reception windows.
parent
549433c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
3 deletions
+25
-3
src/app/main.c
src/app/main.c
+7
-2
src/loramac/include/loramac-timer.h
src/loramac/include/loramac-timer.h
+7
-0
src/loramac/mac/LoRaMac.c
src/loramac/mac/LoRaMac.c
+1
-0
src/lorariot/controller/controller.h
src/lorariot/controller/controller.h
+1
-1
src/lorariot/riot-adapt/timer.c
src/lorariot/riot-adapt/timer.c
+9
-0
No files found.
src/app/main.c
View file @
e1a249c7
...
...
@@ -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
,
5
,
0
);
bm_encode_payload
(
9
,
4
,
0
);
puts
(
"Sending message ..."
);
pvd_send
(
&
pvd_orange_cmd
,
&
bm_payload
);
...
...
@@ -47,8 +47,13 @@ int main(void)
// xtimer_sleep(10);
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
uint32_t
start
=
xtimer_now_usec
();
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
send_message
();
//xtimer_usleep(50 * 1000); // 50 ms
}
uint32_t
stop
=
xtimer_now_usec
();
printf
(
"Time: %ld ms
\n
"
,
(
stop
-
start
)
/
1000
);
}
src/loramac/include/loramac-timer.h
View file @
e1a249c7
...
...
@@ -84,6 +84,13 @@ void TimerStop(TimerEvent_t *obj);
*/
void
TimerReset
(
TimerEvent_t
*
obj
);
/**
* @brief Stop the timer and fire it immediatly.
*
* @param[in] obj Structure containing the timer object parameters
*/
void
TimerImmediate
(
TimerEvent_t
*
obj
);
/**
* @brief Set timer new timeout value
*
...
...
src/loramac/mac/LoRaMac.c
View file @
e1a249c7
...
...
@@ -682,6 +682,7 @@ static void OnRadioTxDone( void )
LoRaMacFlags
.
Bits
.
McpsReq
=
1
;
}
LoRaMacFlags
.
Bits
.
MacDone
=
1
;
TimerImmediate
(
&
MacStateCheckTimer
);
}
// Verify if the last uplink was a join request
...
...
src/lorariot/controller/controller.h
View file @
e1a249c7
...
...
@@ -17,7 +17,7 @@ LGPLv2.1 license.
#include <msg.h>
#include <net/netdev.h>
#define ENABLE_DEBUG (
1
)
#define ENABLE_DEBUG (
0
)
#include <debug.h>
...
...
src/lorariot/riot-adapt/timer.c
View file @
e1a249c7
...
...
@@ -38,6 +38,15 @@ void TimerReset(TimerEvent_t *obj)
TimerStart
(
obj
);
}
void
TimerImmediate
(
TimerEvent_t
*
obj
)
{
TimerStop
(
obj
);
msg_t
*
msg
=
&
(
obj
->
msg
);
msg
->
type
=
LORARIOT_TYPE_MAC_TIMEOUT
;
msg
->
content
.
ptr
=
obj
->
cb
;
msg_send
(
msg
,
lorariot_pid
);
}
void
TimerStart
(
TimerEvent_t
*
obj
)
{
obj
->
running
=
1
;
...
...
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