How do I find the proximity sensor status

L.S.,

I may have a proximity sensor issue, but do not know how to find its status from the CLI.

On a Maemo it would be a matter of:

cat /sys/devices/platform/gpio-switch/proximity/state

But this is not a Maemo, but SailFish OS on a Xperia 10-II

It looks like it should be someplace under /sys/devices/platform/soc/soc:tlmm_gpio_100_reg/subsystem/ but that is quite the rabbit hole and I cannot find it.

Go into settings, on the ‘system’ tab and scroll down to ‘About Product’. Go into this page and look for ‘Build’. Tap on this 5 times and the CSD tool will load.

Go into ‘Individual Tests’ and select ‘Proximity Sensor’.

2 Likes

Thanks, that worked.

It turns out that the proximity sensor is not working, but the light sensor is. Aren’t they the same device?

Might be easier to just run csd in terminal.

On my Xperia10iii this works, and gives a bunch of dbus methods you can call:

 busctl introspect com.nokia.SensorService /SensorManager/proximitysensor
 busctl introspect com.nokia.SensorService /SensorManager/alssensor

For example:

busctl call com.nokia.SensorService /SensorManager/proximitysensor local.ProximitySensor proximity
(tu) 544885858605 0