send()
sends a packet via XBee module.setSendingRetries()
function permits to do it. This function changes the value of the API variable. When a new send()
function is called, the new maximum number of retries will be used.send()
function, which means more power consumption on Waspmote and less channel availability for the rest of network nodes. Probably, after 3 or 4 (failed) retries, it does not make sense to keep on trying.xbee900HP._send_retries
→ stores the maximum number of application-level retriesreceivePacketTimeout()
waits a period of time trying to receive a packet through the XBee module. The period of time to wait is specified in millisecond units as input when calling the function.uint8_t _payload[MAX_DATA]
uint16_t _length
uint8_t _srcMAC[8]
\'0\' → OK: The command has been executed with no errors \'1\' → Error: timeout when receiving answer \'2\' → Error: Frame Type is not valid \'3\' → Error: Checksum byte is not available \'4\' → Error: Checksum is not correct \'5\' → Error: Error escaping character in checksum byte \'6\' → Error: Error escaping character within payload bytes \'7\' → Error: Buffer full. not enough memory space
xbee900HP._payload[]
→ Buffer where the received packet is storedxbee900HP._length
→ Length of the bufferxbee900HP._srcMAC[0-7]
→ Source\'s MAC address