As first for sound, make sure you got a speaker and not a buzzer (I made that mistake earlier).
I use TXD2/RXD2 for my xbee on arc32s (or bap40s as well). The first thing I would check is that they are connected to right wires and not reversed.
I thought I would rebuild mine again and check out what is displayed, but it does not build right now on the IDE that AcidTech(Nathan) released yesterday. The compiler is complaining about an HSEROUT2 command. Not sure yet but maybe he changed the syntax of HSEROUT/HSEROUT2 like Dale of BM mentioned in a posting talking about the manual…
Need to investigate… reported on BM forum. Will try a couple of things and see… Like:
HSerout …] => HSerout 1, …]
HSerout 2…] -> HSerout 2, …]
Please note I am happy with these changes as it would imply that I could do something like:
#ifdef BASICATOMPRO28
HSB_XBEE con 1
#else
HSB_XBEE con 2
#endif
...
HSerout HSB_XBEE, "Goes to the right one"]
When I am not sure how well my XBEE is communicating with my board I usually do things like add some debug stuff, just to see, if I can get the easy things working… I have some basic building blocks in the code that would make it easy. I would try things like: in the function InitXBee (phoenix_control_diy-xbee.bas) I would add some code at the end of the function that maybe looked something like:
#ifdef DEBUG_XBEE
gosub APISetXBeeHexVal"D","L", wNewDL]
hserout "MY: ", hex wNewDL]
gosub APISetXBeeHexVal"D","L", wNewDL]
gosub APIGetXBeeStringVal"N","I", @_bNI, 20], _cbRead ;
gosub APIGetXBeeHexVal"S","L",0x0], _lSNL ; get the serial low, don't enter or leave
gosub APIGetXBeeHexVal"S","H",0x2], _lSNH ; get the serial high,
hserout "DL: ", hex wNewDL, "X._NI: ", hex _lSNH, " ", hex _lSNL, "(", str _bNI\21\13,")", dec _cbRead, 13]
#endif
Note: I cut and pasted most of this code out of the area that handled a specific command, so some of these variables may not be defined now. You could easily change it to read each of the hex values into the same variable wNewDL and then output it before trying the next one. By doing this type of debug code, if the serial outputs look OK for the MY and the serial numbers and string (DL maybe 0 at this point), then you know that at least the XBEE and the Arc32 are communicating correctly.
Good Luck
Kurt