Unable to find BMI160


#1

Hi,

I am using BMI160 device.

I am unable to find the BMI device. Below is the snippet of my code.

localCtx = iio_create_local_context();
LE_ASSERT(localCtx != NULL);*
bmi160 = iio_context_find_device(localCtx, “bmi160”);
LE_FATAL_IF(bmi160 == NULL, “Couldn’t find bmi160 device”);

Should I do something extra here, like follow any other step to add BMI160.

Kindly help.

Regards,
Devaiah


#2

What do you see in /sys/bus/iio/devices/?


#3

Thank you… when I do a ‘ls’ on /sys/bus/iio/devices/ I see nothing…
It is empty… should I mount it manually or something?

Regards,
Devaiah


#4

can i get some help here?


#5

do you know whether the driver is loaded:
lsmod


#6

Hi,

when i do lsmod I don’t see bmi160 running and then I do ‘insmod bmi160.ko’ after locating the .ko file.
But even after that though lsmod displays bmi160 i dont’t anything.

I have also attached the screenshot to explain it better.

And one more thing, I have an IoT card attached to mangOH red board, will this make any difference?

Also, when i execute ‘ls /sys/bus/i2c/devices/’ i see only 2 devices as shown below:
4-001a 4-003a i2c-4

Since BMI160 is connected to 0068h, I am also supposed to see something like 4-0068 right?

When I execute i2cdetect -y -r 4, this is what I get
root@swi-mdm9x28-wp:~# i2cdetect -y -r 4
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – 04 05 06 07 – -- – -- – -- – --
10: – -- – -- – -- – -- – -- UU – -- – -- –
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- UU – -- – -- –
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – 51 – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- 68 – -- – -- – -- –
70: – 71 – -- – -- 76 –

Can you please help me out here?

Regards,
Devaiah


#7

can you show me app status?
Did you build the mangoh system?
attach dmesg log as well


#8

Hi,

I figured out the issue. The board didn’t have the mangoh system. I was of the opinion IIO is present in all Legato systems. Thanks a lot!!

I am currently using Legato Version 18.09. When I tried to build latest mangoh source against the legato version 18.10.3 I ended up getting a lot of missing definition(similar types) error, I infact had made sure the mangoh source i chose was close to the legato source( I mean by release date).
Am I missing something here?

Regards,
Devaiah