Phil, the good (or bad) news is I am looking into it.
I have the xbeetest program updated with the packet mode of the ATDL command and found it was having problems. That is the bad new. The good news is that I have a version of the test program working now on both a Bap28 as well as a Bap40 which should be the same as on Arc32, which I may test out later. I now need to merge it back into the transmitter program and upload all of this. Note: on Bap40 and Arc32, I have partial changes in place to use HSERIAL instead of serout s_out, i9600, but not yet in the support functions… But if you wish to try the probable changes out in your transmitter to see if it finds your bots, before I get the chance to finish and test it out:
Change the code in the DIY Transmitter.bas file for the function UpdateNDListFromXBEE: to
[code]UpdateNDListFromXBEE:
_cNDListIn = cNDList ; remember how many we had from EEPROM (no need to check dups of items beyond this)
#ifdef DEBUG
serout s_out, i9600, “C: UNDL”, 13]
#endif
; use same helper function to send command as our get functions
gosub APISendXBeeGetCmd"N","D"]
; I think I can loop calling the APIRecvPacket - but as the data it returns is in a different
; file, I may have to have helper function over there.
repeat
;gosub APIProcessGetXBeeVal@_bAPIPacket,32,3000000], _cbRet
gosub APIRecvPacket[3000000], _cbRet
if _cbret > 11 then ; MY(2), SH(4), SL(4), DB(1), NI???
; ok lets extract the information for this item
awNDMY(cNDList) = _bAPIPacket(0) << 8 + _bAPIPacket(1)
alNDSNH(cNDList) = _bAPIPacket(2) << 24 + _bAPIPacket(3) << 16 + _bAPIPacket(4) << 8 + _bAPIPacket(5)
alNDSNL(cNDList) = _bAPIPacket(6) << 24 + _bAPIPacket(7) << 16 + _bAPIPacket(8) << 8 + _bAPIPacket(9)
; The Node identifier starts in bTemp(11)
; We want to blank this field out to our default size we use
_i = _cbRet - 12 ; number of actual characters transfered.
while _i < CBNIMAX
_bAPIPacket(_i+11) = " "
_i = _i + 1
wend
_fItemDup = 0
if _cNDListIn then
for _i = 0 to _cNDListIn-1
if (alNDSNH(_i) = alNDSNH(cNDList)) and (alNDSNL(_i) = alNDSNL(cNDList)) then
; We have seen this one before...
_fItemDup = 1; ; signal that this item is a duplicate...
; but we will also make sure the MY or the NI has not changed.
if (awNDMY(_i) <> awNDMY(cNDList)) then
_fListChanged = 1; we know that we need to write the stuff back out...
awNDMY(_i) = awNDMY(cNDList)
endif
for _j = 0 to CBNIMAX-1
if abNDNIS(_i*CBNIMAX + _j) <> _bAPIPacket(_j+11) then
abNDNIS(_i*CBNIMAX + _j) = _bAPIPacket(_j+11)
_fListChanged = 1; we know that we need to write the stuff back out...
endif
next
endif
next
endif
; only save away the data if this is not a duplicate and we have room
if (_fItemDup = 0) and (cNDList < CMAXNDLIST) then
for _j = 0 to CBNIMAX-1 ; copy the NI string in.
abNDNIS(cNDList*CBNIMAX + _j) = _bAPIPacket(_j+11)
next
cNDList = cNDList + 1
_fListChanged = 1 ; yes the list changed - have new node
endif
endif
until _cbret <= 11 ; MY(2), SH(4), SL(4), DB(1), NI???
return
[/code]
The issues was: Code changed for what the receive a packet returned. It used to only return the user data, now it returns the whole packet after the size, so there are something like 5 extra bytes of data that we need to skip over.
Second issue: for some reason before code that looked like: My = a(5) << 8 + a(6)
was returning the correct data, now it appears to be returning 0. But: My= (a(5) << 8) + a(6)
Works.
Kurt