Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LMiC by
Revision 3:1079dc4b4c59, committed 2015-11-23
- Comitter:
- pnysten
- Date:
- Mon Nov 23 09:53:54 2015 +0000
- Parent:
- 2:bebd6b2e3d18
- Commit message:
- Encryption bypassed when port is >0
Changed in this revision
| lmic.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/lmic.cpp Fri Nov 20 12:30:06 2015 +0000
+++ b/lmic.cpp Mon Nov 23 09:53:54 2015 +0000
@@ -1227,9 +1227,16 @@
if( !replayConf ) {
// Handle payload only if not a replay
// Decrypt payload - if any
- if( port >= 0 && pend-poff > 0 )
+
+ //if( port >= 0 && pend-poff > 0 )
+ //aes_cipher(port <= 0 ? LMIC.nwkKey : LMIC.artKey, LMIC.devaddr, seqno, /*dn*/1, d+poff, pend-poff);
+
+ if( port == 0 && pend-poff > 0 )
+ {
+ debug_str("Payload decrypting...\r\n");
aes_cipher(port <= 0 ? LMIC.nwkKey : LMIC.artKey, LMIC.devaddr, seqno, /*dn*/1, d+poff, pend-poff);
-
+ }
+
EV(dfinfo, DEBUG, (e_.deveui = MAIN::CDEV->getEui(),
e_.devaddr = LMIC.devaddr,
e_.seqno = seqno,
