Octave- Mangoh Red red sensor app

Hi Team,

Trying to get the redsensor app on Octave-> But cannot see the redSensor app on the octave platform under resources.
Any thoughts?
App is running under app status.

See the snip of logs below
Apr 20 09:24:50 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1060]/supervisor T=main | app.c CreateFileLink() 2041 | Could not stat file at ‘/sys/bus/i2c/devices/4-0068/iio:device0/in_accel_scale’. No such file or directory
Apr 20 09:24:50 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1060]/supervisor T=main | app.c CreateFileLink() 2158 | Failed to create link at ‘/driver/in_accel_scale’ in app ‘redSensor’.
Apr 20 09:24:50 swi-mdm9x28-wp user.err Legato: =ERR= | supervisor[1060]/supervisor T=main | app.c app_Start() 3501 | Failed to set Smack rules or set up app area.
Regards,
Kushani

Hi !

Are you using a WP77xx on your board ? I’ve had a similar issue once with wp77 and mangOH red.

Maybe the drivers for the accelerometer (BMI160) are not loaded, can you run this command on the board and give the output please ?

$ ls /sys/module | grep bmi

Hi Paul,

Yeah I’m using with WP7702. See for below output, I can see BMI160

root@swi-mdm9x28-wp:~# lsmod
Tainted: G
mt7697serial 6938 0 - Live 0xbf048000 (O)
mt7697q 16683 0 - Live 0xbf03f000 (O)
mcp251x 8589 0 - Live 0xbf039000 (O)
mangoh_red 7779 0 - Live 0xbf034000 (O)
ltc294x 5100 0 - Live 0xbf02f000 (O)
led 1835 0 - Live 0xbf02b000 (O)
cp2130 17755 1 mt7697q, Live 0xbf022000 (O)
bq27xxx_battery 22500 0 - Live 0xbf019000 (O)
bq24296 9679 0 - Live 0xbf013000 (O)
bmp280_i2c 2430 0 - Live 0xbf00f000 (O)
bmp280 8657 1 bmp280_i2c, Live 0xbf009000 (O)
bmi160_i2c 1682 0 - Live 0xbf005000 (O)
bmi160 4556 1 bmi160_i2c, Live 0xbf000000 (O)
root@swi-mdm9x28-wp:~# ls /sys/module/ | grep bmi
bmi160
bmi160_i2c
root@swi-mdm9x28-wp:~#

Regards,
Kush

what did you see for
“ls sys/bus/i2c/devices/4-0068/iio:device0/”

Hi Jyijyi,

Cannot find that iio:device0. See below
root@swi-mdm9x28-wp:~# ls /sys/bus/i2c/devices/4-0068/iio:device0/
ls: /sys/bus/i2c/devices/4-0068/iio:device0/: No such file or directory
root@swi-mdm9x28-wp:~# ls /sys/bus/i2c/devices/4-0068/
modalias name power subsystem uevent
root@swi-mdm9x28-wp:~#

Thanks for your support.

Regards,
Kushani

that means your bmi driver is not working

Hi jyijyi,

Any Tshoot step I can get the bmi drivers are working.

Regards,
Kushani

did you put the SW401 switch 3 to ON on mangoh red board?
not sure if you can find any debug message of the BMI driver on dmesg?

Hi Jyijyi,

Just realized I only put 1 and 8 to on. Now I made 3 on too.
Note :
root@swi-mdm9x28-wp:/sys/bus/iio/devices# ls
iio:device0
root@swi-mdm9x28-wp:/sys/bus/iio/devices# lsmod
Tainted: G
mt7697serial 6938 0 - Live 0xbf048000 (O)
mt7697q 16683 0 - Live 0xbf03f000 (O)
mcp251x 8589 0 - Live 0xbf039000 (O)
mangoh_red 7779 0 - Live 0xbf034000 (O)
ltc294x 5100 0 - Live 0xbf02f000 (O)
led 1835 0 - Live 0xbf02b000 (O)
cp2130 17755 1 mt7697q, Live 0xbf022000 (O)
bq27xxx_battery 22500 0 - Live 0xbf019000 (O)
bq24296 9679 0 - Live 0xbf013000 (O)
bmp280_i2c 2430 0 - Live 0xbf00f000 (O)
bmp280 8657 1 bmp280_i2c, Live 0xbf009000 (O)
bmi160_i2c 1682 0 - Live 0xbf005000 (O)
bmi160 4556 1 bmi160_i2c, Live 0xbf000000 (O)

Regards,
Kushani

Hi jyijyi,

I can see below now :slightly_smiling_face:

ls /sys/bus/i2c/devices/4-0068/iio:device0/
buffer in_accel_y_raw in_anglvel_y_raw scan_elements
dev in_accel_z_raw in_anglvel_z_raw subsystem
in_accel_sampling_frequency in_anglvel_sampling_frequency in_temp_offset trigger
in_accel_sampling_frequency_available in_anglvel_sampling_frequency_available in_temp_raw uevent
in_accel_scale in_anglvel_scale in_temp_scale
in_accel_scale_available in_anglvel_scale_available name
in_accel_x_raw in_anglvel_x_raw power

I guess massive improvement.
Regards,
Kushani

great, it seems it is working now.

Really appreciated your support :slight_smile:

Regards,
Kushani