Merge pull request #11880 from fjmolinas/pr_loramac_no_ack_retcode

pkg/semtech-loramac: update documentation
This commit is contained in:
Leandro Lanzieri 2019-07-23 09:06:19 +02:00 committed by GitHub
commit b1babe5c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -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);
@ -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);

View File

@ -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");