[SOLVED] "AK8963: bad DEVICE ID" error during Ardupilot start

@mikhail.avkhimenia:
Is there maybe a possibility to make an update repo?

At the moment it can only be updated manually, but it’s quite easy - just copy stuff on the card.
We will automate updates of the system and autopilot software in the nearest future, but first we need to work some things out.

Hi
tested your code but same error occur when overcloking with pi2.

@Bernt_Christian_Egel

Thanks! I’ll try to do something with the driver then.

Was the core or the arm overclocked?
I think, the spi error will only affect core overclocking.
I reported this issue.

I was talking about that few posts above - yes, it is the core clock that affects SPI.
The problem is that it doesn’t happen all the time or on all RPis. Seems like two RPi2 boards that I have are not affected by that, but the one that @george.staroselskiy has is.
I’ll swap my RPi for his tomorrow, so I can test that stuff myself.

@CodeChief @Bernt_Christian_Egel @benrexwinkel @dgrat

All right, with the help of popcornmix I am finally able to reproduce the issue. Turns out my RPis never actually overclocked as I used a problematic USB WiFi dongle that causes undervoltage, so RPi disabled force_turbo for safety.

Also, I found that cpufreq cannot be trusted - it displays overclocked values while they are not tied to the real values. The correct way to check clocks is to use vcgencmd:

vcgencmd measure_clock arm #to check the processor frequency
vcgencmd measure_clock core #to check video core frequency

So here is a simple temporary workaround for those who want to overclock their Raspeberry Pi 2 with Navio - do not overclock the core_freq, keep its value = 250. You will still get most of the performance gain - more horsepower and faster memory, except faster cache.

Overclocking settings in /boot/config.txt should look like this:

arm_freq=1000
core_freq=250
sdram_freq=500
over_voltage=2
force_turbo=1
1 Like

I am getting the same error… I have tried everthing sugested in the form and have had not success. please help. I am on a deadline and I feel I am dead in the water here… please help… this is what I am getting…

##############################################

Last login: Tue Jun 16 21:04:49 2015 from testing-pc
pi@navio-rpi ~ $ sudo ArduCopter-quad -A udp:10.10.10.43:14550
Raspberry Pi 2 with BCM2709!
0
AK8963: bad DEVICE ID
pi@navio-rpi ~ $

@davidabsa

Does the AccelGyroMag example work?

We need to be on the same page. Everything implies:

  1. The raspberry is not overclocked.
  2. i2cdetect shows that MPU9250 is present.
  3. You’ve tried to reboot the RPi with a power chord off.

Either of these statements is true, isn’t it?

I have tried the AccelGyroMag with no success and have tried everything above. I was on your first order of boards so maybe I have a lemon. I wish I had tested this earlier. I am no a time crunch. does anyone know a workaround??

Hi David,

Could you please post the output of:

sudo i2cdetect -y 1 

Does AccelGyroMag give you all zeros?

 0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – UU – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – UU – -- – --
40: 40 – -- – -- – -- – 48 – -- – -- – -- –
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

What command do I run to get AccelGyroMag. I got it to work before but I can seem to get it to give me any results… maybe I am doing the wrong command.

I tried to put the NAVIO+ on a different pi2 and fallowed your install to the sim card all over again… it did the exactly the same thing. I double checked my self.

getting the same results…

pi@navio-rpi ~ $ sudo ArduCopter-quad -A udp:10.10.10.43:14550
Raspberry Pi 2 with BCM2709!
0
AK8963: bad DEVICE ID
pi@navio-rpi ~ $

@davidabsa Looks strange, only two chips on your board are working. Can you post a picture of your setup?

I have tried even removing the camera and the wifi link and using a keyboard and the hdmi… I still get the same problem. This is a new board directly from you and a new Pi2 directly from amazon. I even tried a dirrent PI but with the same results. Please help.

@davidabsa Please send me a private message with your order number and we will find a way to replace your Navio+.

Just want to confirm this actually works? If I can improve gstreamer without any impact it seems to be a no-brainer!

Hi All,

My NAVIO+ turned up, during the week, it’s plugged into a PI 2 B.

However, I am having the β€œAK8963: bad DEVICE ID” start issue.

Here’s my i2cdetect output:

pi@navio-rpi:~$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – UU – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – UU – -- – --
40: 40 – -- – -- – -- – 48 – -- – -- – -- –
50: 50 – -- – -- – -- – -- – -- – -- – -- –
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – 77

Where do I go to from here ?

Thanks

Andrew

Hi Andrew,

Could you please try to run AccelGyroMag example and post its output here?
http://docs.emlid.com/Navio-dev/mpu9250-imu/

Hi,

The AccelGyroMag produced output, the values appeared to change as I moved the board around.

Acc: -0.327 +0.608 +0.470 Gyr: +86.707 +67.317 -58.171 Mag: -4.261 +13.181 +13.734
Acc: -0.315 +0.598 +0.483 Gyr: +85.061 +66.159 -57.439 Mag: -4.261 +13.181 +13.734
Acc: -0.328 +0.604 +0.475 Gyr: +83.171 +64.695 -56.524 Mag: -4.261 +13.181 +13.734
Acc: -0.328 +0.599 +0.472 Gyr: +81.402 +63.354 -55.427 Mag: -4.261 +13.181 +13.734
Acc: -0.280 +0.651 +0.569 Gyr: +78.902 +62.317 -53.537 Mag: -4.261 +13.181 +13.734
Acc: -0.287 +0.633 +0.547 Gyr: +80.000 +64.268 -53.171 Mag: +0.000 +0.000 +0.000
Acc: -0.306 +0.630 +0.550 Gyr: +80.732 +69.878 -52.805 Mag: +1318.050 +0.000 +0.000
Acc: -0.289 +0.646 +0.558 Gyr: +80.793 +75.244 -52.744 Mag: +548.241 +68.400 +4658.700
Acc: -0.307 +0.641 +0.565 Gyr: +81.707 +80.244 -53.232 Mag: +28.406 +2257.200 +87.900
Acc: -0.333 +0.628 +0.541 Gyr: +80.061 +78.293 -52.866 Mag: -9.942 +24.225 +7.554
Acc: -0.354 +0.595 +0.501 Gyr: +76.707 +73.171 -51.646 Mag: -9.942 +24.225 +7.554
Acc: -0.345 +0.585 +0.486 Gyr: +72.561 +67.500 -49.756 Mag: -9.942 +24.225 +7.554
Acc: -0.343 +0.599 +0.502 Gyr: +68.171 +57.378 -45.976 Mag: -9.942 +24.225 +7.554
Acc: -0.345 +0.605 +0.500 Gyr: +66.646 +53.598 -43.963 Mag: -9.942 +24.225 +7.554
Acc: -0.343 +0.614 +0.501 Gyr: +64.878 +50.183 -42.134 Mag: -9.942 +24.225 +7.554
Acc: -0.355 +0.617 +0.492 Gyr: +63.171 +46.890 -40.366 Mag: -9.942 +24.225 +7.554
Acc: -0.342 +0.628 +0.511 Gyr: +63.110 +49.329 -37.317 Mag: -9.942 +24.225 +7.554
Acc: -0.356 +0.634 +0.526 Gyr: +63.659 +51.707 -36.220 Mag: -9.942 +24.225 +7.554
Acc: -0.347 +0.644 +0.520 Gyr: +62.561 +48.049 -35.183 Mag: -9.942 +24.225 +7.554
Acc: -0.359 +0.641 +0.533 Gyr: +62.195 +46.463 -34.024 Mag: -9.942 +24.225 +7.554
Acc: -0.367 +0.655 +0.538 Gyr: +63.476 +49.939 -33.049 Mag: -9.942 +24.225 +7.554
Acc: -0.364 +0.667 +0.562 Gyr: +62.805 +46.951 -31.220 Mag: -9.942 +24.225 +7.554
Acc: -0.373 +0.670 +0.572 Gyr: +63.232 +47.317 -30.122 Mag: -9.942 +24.225 +7.554
Acc: -0.364 +0.694 +0.622 Gyr: +63.780 +47.988 -29.146 Mag: -9.942 +24.225 +7.554
Acc: -0.364 +0.706 +0.665 Gyr: +63.780 +48.110 -28.232 Mag: -9.942 +24.225 +7.554
Acc: -0.379 +0.702 +0.660 Gyr: +63.537 +49.268 -27.500 Mag: -9.942 +24.225 +7.554
Acc: -0.380 +0.704 +0.651 Gyr: +62.073 +51.463 -26.220 Mag: -9.942 +24.225 +7.554
Acc: -0.387 +0.714 +0.638 Gyr: +61.280 +51.402 -25.671 Mag: -9.942 +24.225 +7.554
Acc: -0.387 +0.710 +0.629 Gyr: +61.037 +51.951 -25.122 Mag: -9.942 +24.225 +7.554
Acc: -0.394 +0.712 +0.618 Gyr: +61.098 +53.049 -24.573 Mag: -9.942 +24.225 +7.554
Acc: -0.402 +0.730 +0.602 Gyr: +61.585 +54.390 -23.293 Mag: -9.942 +24.225 +7.554
Acc: -0.409 +0.716 +0.589 Gyr: +61.768 +54.329 -22.866 Mag: -9.942 +24.225 +7.554
Acc: -0.419 +0.720 +0.566 Gyr: +62.195 +54.024 -22.439 Mag: -9.942 +24.225 +7.554
Acc: -0.436 +0.723 +0.569 Gyr: +63.232 +54.573 -22.012 Mag: -9.942 +24.225 +7.554
Acc: -0.453 +0.722 +0.540 Gyr: +64.634 +55.305 -21.707 Mag: -9.942 +24.225 +7.554
Acc: -0.487 +0.715 +0.544 Gyr: +67.317 +55.732 -21.402 Mag: -9.942 +24.225 +7.554
Acc: -0.496 +0.710 +0.518 Gyr: +68.537 +55.305 -21.220 Mag: -9.942 +24.225 +7.554
Acc: -0.519 +0.693 +0.530 Gyr: +69.756 +54.329 -21.037 Mag: -9.942 +24.225 +7.554
Acc: -0.535 +0.697 +0.501 Gyr: +71.402 +53.659 -21.159 Mag: -9.942 +24.225 +7.554
Acc: -0.570 +0.679 +0.513 Gyr: +73.171 +53.293 -21.402 Mag: -9.942 +24.225 +7.554
Acc: -0.606 +0.673 +0.493 Gyr: +76.463 +52.500 -21.890 Mag: -9.942 +24.225 +7.554
Acc: -0.632 +0.666 +0.499 Gyr: +77.866 +50.793 -22.378 Mag: -9.942 +24.225 +7.554
Acc: -0.646 +0.663 +0.484 Gyr: +79.268 +49.146 -22.988 Mag: -9.942 +24.225 +7.554
Acc: -0.665 +0.651 +0.492 Gyr: +80.793 +48.232 -23.902 Mag: -9.942 +24.225 +7.554
Acc: -0.679 +0.653 +0.474 Gyr: +82.256 +47.256 -24.878 Mag: -9.942 +24.225 +7.554
Acc: -0.692 +0.649 +0.473 Gyr: +84.939 +44.939 -27.073 Mag: -9.942 +24.225 +7.554

Does this help, I guess know the navio board is working ?

Andrew

Good, that means that everything is fine with MPU9250.

  1. What binaries are you using?
  2. Did you overclock your Raspberry Pi?