Error uploading over wireless xbee.

I am using wireless telemetry(xbees) with my arducopter (with the APM 2.5 autopilot) that work fine and have been configured correctly. However when i try to upload wirelessly, i get the message 'avrdude: stk500v2_getsync(): timeout communicating with programmer' . If there any way to solve this?