View Single Post
Posts: 149 | Thanked: 134 times | Joined on Jul 2007 @ Florida
#1
I've been trying to figure this out for a while now.
Yes, I've searched... for a while now. Googling "+(maemo OR n900) +dbus open close +(camera OR lense) +(cover or shutter)" doesn't return anything useful.

The problem is, according to "dbus-monitor --system", the same two signals are sent whether the camera cover is opening or closing.

Shutter opening:
Code:
signal sender=:1.13 -> dest=(null destination) serial=9631 path=/org/freedesktop/Hal/devices/platform_cam_shutter; interface=org.freedesktop.Hal.Device; member=PropertyModified
   int32 1
   array [
      struct {
         string "button.state.value"
         boolean false
         boolean false
      }
   ]
signal sender=:1.13 -> dest=(null destination) serial=9632 path=/org/freedesktop/Hal/devices/platform_cam_shutter; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "cover"
Shutter closing:
Code:
signal sender=:1.13 -> dest=(null destination) serial=9636 path=/org/freedesktop/Hal/devices/platform_cam_shutter; interface=org.freedesktop.Hal.Device; member=PropertyModified
   int32 1
   array [
      struct {
         string "button.state.value"
         boolean false
         boolean false
      }
   ]
signal sender=:1.13 -> dest=(null destination) serial=9637 path=/org/freedesktop/Hal/devices/platform_cam_shutter; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "cover"
This makes no sense to me at all.
One thing I noticed is dmesg does show the difference:
Code:
Nokia-N900:~# dmesg| grep shutter| tail -2 
[13739.665222] cam_shutter (GPIO 110) is now open
[13741.516632] cam_shutter (GPIO 110) is now closed
Unfortunately, that's not useful for triggering without being really kludgey.

Does anyone know what line I can use with dbus-scripts to distinguish camera cover opening from closing?
 

The Following User Says Thank You to glabifrons For This Useful Post: