Skip to content

Commit

Permalink
Merge pull request #11880 from fjmolinas/pr_loramac_no_ack_retcode
Browse files Browse the repository at this point in the history
pkg/semtech-loramac: update documentation
  • Loading branch information
leandrolanzieri authored Jul 23, 2019
2 parents 0729beb + 41e440a commit b1babe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/semtech-loramac/include/semtech_loramac.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ int semtech_loramac_init(semtech_loramac_t *mac);
* @return SEMTECH_LORAMAC_JOIN_SUCCEEDED on success
* @return SEMTECH_LORAMAC_JOIN_FAILED on failure
* @return SEMTECH_LORAMAC_BUSY when the mac is already active (join or tx in progress)
* @return SEMTECH_LORAMAC_ALREADY_JOINED if network was already joined
*/
uint8_t semtech_loramac_join(semtech_loramac_t *mac, uint8_t type);

Expand All @@ -172,6 +173,7 @@ uint8_t semtech_loramac_join(semtech_loramac_t *mac, uint8_t type);
* @return SEMTECH_LORAMAC_BUSY when the mac is already active (join or tx in progress)
* @return SEMTECH_LORAMAC_DUTYCYCLE_RESTRICTED when the send is rejected because of dutycycle restriction
* @return SEMTECH_LORAMAC_TX_ERROR when an invalid parameter is given
* @return SEMTECH_LORAMAC_TX_CNF_FAILED when message was transmitted but no ACK was received
*/
uint8_t semtech_loramac_send(semtech_loramac_t *mac, uint8_t *data, uint8_t len);

Expand Down
4 changes: 4 additions & 0 deletions sys/shell/commands/sc_loramac.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ int _loramac_handler(int argc, char **argv)
case SEMTECH_LORAMAC_TX_ERROR:
puts("Cannot send: error");
return 1;

case SEMTECH_LORAMAC_TX_CNF_FAILED:
puts("Fail to send: no ACK received");
return 1;
}

puts("Message sent with success");
Expand Down

0 comments on commit b1babe5

Please sign in to comment.