"The Xbee modules ship with a default of 9600bps, which you must change to match the APM's serial speed of 115200bps; set your Xbee modules to match this speed."
have you done this?
what is the response on the 'S' command?
Does it work in other baud rates (like 57600)?
Try setting the baud rate in the code to 111111.
#define SerBau 111111
I had a similar problem, you can read about it here:
why do you switch back to slave?^^
I don't have those Breakout boards from DIY, just 2 similar without switch from Sparkfun (just like both are master) and it works without any problems
You should not switch to slave, but leave both on "Master.