Series I & remote to base and back to remote; ideas on how

i have 6 endpoints that have sensor data to send to the coordinator. i’m looking for ideas on how do i ensure that each endpoint/pic sends it’s data point-to-point to the coordinator and also have the coordinator “ack” the received data back to the correct sender, and also avoid collisons?

is there a built-in “ack” in AT mode on can check?

is it better to use the 16-bit addressing for point-to-point?

if the base communicates point-to-point via “serout” i’ll need to set the destination address in that block of code? i guess the sending endpoint could include it’s address so i wouldn’t need to hard code that in the code for the base?

i’m using pic16f88’s and PBP on this project.

below is the xbee configs for ver and addressing along with some pseudo code hoping that illustrates what i’m trying to accomplish

tia

=================================
Modem = XB24
Function Set = xbee 802.15.4
Version = 1084

[Coordinator]
CE - Coordinator Enable = 1
DL - Destination Addr Low = FFFF
MY - 16-bit Src Addr = 0
PAN = 3332

[End Points; 6 total]
DH = 0
DL = 0
MY = 1
.
.
.
MY = 6

;–[base]----------------------------------------------------------------

XB_Base_MYAddr CON $0 ’ Node Address Base
XB_DestDLAddr CON $1 ’ Destination address

SERIN2 RX\RTS, baud, [WAIT(“A”), DATAIN]

’ if FirstChar = “A” then 'do something on “A”
’ SEROUT2 TX, Baud,[“B”, Dec Z,13] 'send a char to E1 remote
’ Pause 2000 'pause due to a timing issue with buffers i think
’ else
’ if FirstChar = “C” then 'do someting on “C”
’ SEROUT2 TX, Baud,[“D”, Dec Z,13] 'send a char to E2 remote
’ Pause 2000 'pause due to a timing issue with buffers i think
’ else
’ etc., up through remote E6 unit
’ endif

;–[EP1]--------------------------------------------------------------------

XB_E1_MYAddr CON $1 ’ Node Address E1
XB_BASE_DestDLAddr CON $0 ’ Base Destination address

SEROUT2 TX, Baud,[“A”, Dec Z, 13] 'send char “A” + data to xbee base
SERIN2 RX\RTS, baud, 2500, TimeOut1, [Wait(“B”), Dec DataIn]

;–[EP2]--------------------------------------------------------------------

XB_E2_MYAddr CON $2 ’ Node Address E2
XB_BASE_DestDLAddr CON $0 ’ Base Destination address

SEROUT2 TX, Baud,[“C”, Dec Z,13] 'send char “C” + data to xbee base
SERIN2 RX\RTS, baud, 2500, TimeOut1, [Wait(“D”), Dec DataIn]

[…]
E3 … E6 remotes
[…]
;------------------------------------------------------------------------

If you are needing to see an ack from the xbee you will need to use API mode. If not, the AT mode has built in Acks but the ack will not be sent to your pic.

can i program the xbee to send the “ack” to my pic?

or better yet, what do the pro’s do so their programs are robust regarding “ack’s”, etc., in such a situation as mine?

since the xbee’s function as a wireless serial link, i should be able to get some of the comm status indicators into my pic code i would think, yes | no ?

tia

The only way to get the pic to send the “ack” to your pic is to use API mode. When you send data in API mode the Xbee will send an API packet back to the pic that includes an “ack”. The “pros” that I know use a form of API mode or create code on the recieving device to send an “ack” back to the sensor. The Xbee was designed to replace a serial link but can not fully replicate what occurs on a wired link. My suggestion is to spend a few hours or a day to learn how to assemble API packets and how to parse an API packet. Using API will make it much easier, faster, and give you more options to work with.

idea well taken. i will practice using the API …

tia