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
[…]
;------------------------------------------------------------------------