How to test sensors in redmangoH

When I start app redSensorToCloud, all sensors don’t send the value to the Cloud.

So, I would like to verify sensors in Red mango such as pressure, light sensor one by one to make sure that the sensor is still working.

Any ideas?

are you using WP76?

You can have a look on this thread:

It is WP8548.
Some sensor can transmit sometimes. Really have no idea

have you compared the logread to debug?

This is what I got from logread -f

Oct 8 14:08:04 swi-mdm9x15 user.err Legato: =ERR= | redSensor[1080]/position T=main | position.c Sample() 50 | Failed to read sensor (LE_OUT_OF_RANGE).
Oct 8 21:08:04 swi-mdm9x15 user.err kernel: [ 860.181443] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:187
Oct 8 21:08:04 swi-mdm9x15 user.err kernel: [ 860.187089] qup_i2c qup_i2c.0: I2C slave addr:0x3a not connected
Oct 8 21:08:04 swi-mdm9x15 user.info kernel: [ 860.197192] gpio_check_and_wake: wake-n_gpio77 STATE=WAKEUP
Oct 8 21:08:04 swi-mdm9x15 user.info kernel: [ 860.215901] gpio_check_and_wake: wake-n_gpio77 STATE=SLEEP

You can try to see the value of the following and see if the sensor is working fine.

/sys/bus/i2c/devices/0-0068/iio:device0/in_accel_x_raw

-sh: /sys/bus/i2c/devices/0-0068/iio:device0/in_accel_x_raw: Permission denied

You should use “cat /sys/bus/i2c/devices/0-0068/iio:device0/in_accel_x_raw”

it replies in some values. however, do you know the address for light sensor, pressure sensor…?

root@swi-mdm9x15:~# ls /sys/bus/i2c/devices/0-0068/iio:device0

buffer in_anglvel_sampling_frequency in_temp_scale
dev in_anglvel_sampling_frequency_available name
in_accel_sampling_frequency in_anglvel_scale power
in_accel_sampling_frequency_available in_anglvel_scale_available scan_elements
in_accel_scale in_anglvel_x_raw subsystem
in_accel_scale_available in_anglvel_y_raw trigger
in_accel_x_raw in_anglvel_z_raw uevent
in_accel_y_raw in_temp_offset
in_accel_z_raw in_temp_raw

where is the light senser

This is for pressure sensor

/sys/bus/i2c/devices/0-0076/iio:device1/in_pressure_input

1 Like

Light sensor is using ADC to read

1 Like