Navio + AccelGyroMag not working

i am using navio+ and raspberry Pi 2 with modified rasbian image provided by emlid.I freshly installed every thing when try to build from source its through an error
%% control_rtl.o
cc1plus: error: unrecognized command line option ‘-std=gnu++11’
…/mk/ recipe for target ‘/tmp/’ failed
make: *** [/tmp/] Error 1

so i installed the available deb package form emlid website
when i try to run the sudo ./AccelGyroMag after make

i am only getting 0 values its not updating even when i change the orientation of navio+

Acc: +0.000 +0.000 +0.000 Gyr: +0.000 +0.000 +0.000 Mag: +0.000 +0.000 +0.000
Acc: +0.000 +0.000 +0.000 Gyr: +0.000 +0.000 +0.000 Mag: +0.000 +0.000 +0.000
Acc: +0.000 +0.000 +0.000 Gyr: +0.000 +0.000 +0.000 Mag: +0.000 +0.000 +0.000

so whats the solution please help me to slove this and when i try to connect to the apm planner or tower it connects and disconnects after 5 secs. i tryed both udp and tcp.

Need your supports help me in getting this done correctly


Are you running AccelGyroMag at the same time as ArduCopter?

no i tested them seperately

Can you please post a picture of how everything is connected?