@pmaini90
Did you purchase your APM2.5 from 3D Robotics or another dealer? If you purchased it from 3DR, I suggest that you open a support ticket with them explaining your problem and they will assist you in troubleshooting the APM. Also, what version of the MP are you using? There have been CLI issues with ver 1.2.57 or 1.2.58.
Regards,
TCIII