Go Down

Topic: Xbee frame ID best practices (Read 998 times) previous topic - next topic

matejj

Hi all!
I am currently working on a xbee sensor with multiple input buttons. Each time one of them is pressed, I send a packet to the coordinator and wait for the TxStatusResponse before acting on it.

Each packet is sent with a different frame ID to differentiate them. The problem is that the TxStatusResponse may not come in the same order as sent.

My problem is how to associate each TxStatusResponse with the appropriate packet sent? I thought about using an associative array to associate each frameID to the proper action code, but I'm not sure if it's the best practice.

And the only associative array I found is the HashMap library (http://www.arduino.cc/playground/Code/HashMap) wich I am not sure is proper for the job.

Any ideas?

Wagner Sartori Junior

Sorry for resurrect this thread.

I was just thinking the same thing. I want to have a reliable communications among my XBees.

I want to make a queue of packets and remove only when I receive txstatus packets acknowledging delivery.

Some timeout, let's say 2 seconds. It's TCP/IP for XBee :D

Go Up