Why frameworkd starts automatically playing ringtone, aka. how to debug frameworkd?

Sebastian Krzyszkowiak seba.dos1 at gmail.com
Mon Sep 7 16:06:49 CEST 2009


On 9/7/09, Laszlo KREKACS <laszlo.krekacs.list at gmail.com> wrote:
> Hi!
>
> It looks like frameworkd plays the ringtone file by itself.
> I requested before it in the program, but always got AlreadyPlaying
> exception.
>
> I checked the rules.yaml file, but there is no rule for playing ringtone.
> I also observed the dbus line using mdbus -l -s, but it does not
> print out from where the signal arrived (it only indicates, that a
> service received the signal).
>
> I checked ophonekitd too, and there is also automatic ringtone
> playing, and looks like it is not ophonekits who requested it.
>
> Im a bit lost at this stage, I dont know how to debug further.
> Could somebody shred a bit of light?
>
> Best regards,
>  Laszlo
>
>
> mdbus:
>
> [SIGNAL]    org.freesmartphone.Phone.CallCreated    from :1.18
> /org/freesmartphone/Phone
> (op'/org/freesmartphone/Phone/GSM/13',)
>  [SIGNAL]    org.freesmartphone.GSM.Call.CallStatus    from :1.11
> /org/freesmartphone/GSM/Device
> (   1,
>     'incoming',
>     {   'direction': 'incoming',
>         'line': 0,
>         'mode': 'voice',
>         'peer': '+362xxxxxxxx',
>         'status': 'incoming'})
>  [SIGNAL]    org.freesmartphone.Device.Audio.SoundStatus    from :1.19
> /org/freesmartphone/Device/Audio
> ('/usr/share/sounds/ringtone_ringnroll.wav', 'playing', {   })
>  [SIGNAL]    org.freesmartphone.Usage.ResourceChanged    from :1.20
> /org/freesmartphone/Usage
> ('Display', True, {   'policy': 0, 'refcount': 1})
>  [SIGNAL]    org.freesmartphone.Usage.ResourceChanged    from :1.20
> /org/freesmartphone/Usage
> ('Display', True, {   'policy': 0, 'refcount': 1})
>  [SIGNAL]    org.freesmartphone.GSM.Network.SignalStrength    from
> :1.11 /org/freesmartphone/GSM/Device
> (75,)
>  [SIGNAL]    org.freesmartphone.Device.PowerSupply.Capacity    from
> :1.19 /org/freesmartphone/Device/PowerSupply/battery
> (94,)
>  [SIGNAL]    org.freesmartphone.GSM.Call.CallStatus    from :1.11
> /org/freesmartphone/GSM/Device
> (1, 'release', {   'status': 'release'})
>  [SIGNAL]    org.freesmartphone.PIM.Calls.NewCall    from :1.13
> /org/freesmartphone/PIM/Calls
> ('/org/freesmartphone/PIM/Calls/58',)
>  [SIGNAL]    org.freesmartphone.PIM.Calls.NewMissedCalls    from :1.13
> /org/freesmartphone/PIM/Calls
> (22,)
>  [SIGNAL]    org.freesmartphone.PIM.Calls.MissedCall    from :1.13
> /org/freesmartphone/PIM/Calls
> ('/org/freesmartphone/PIM/Calls/58',)
>  [SIGNAL]    org.freesmartphone.Phone.CallReleased    from :1.18
> /org/freesmartphone/Phone
> (op'/org/freesmartphone/Phone/GSM/13',)
>  [SIGNAL]    org.freesmartphone.Phone.Call.Released    from :1.18
> /org/freesmartphone/Phone/GSM/13
> ()
>  [SIGNAL]    org.freesmartphone.Device.Audio.SoundStatus    from :1.19
> /org/freesmartphone/Device/Audio
> ('/usr/share/sounds/ringtone_ringnroll.wav', 'stopped', {   })
>  [SIGNAL]    org.freesmartphone.Usage.ResourceChanged    from :1.20
> /org/freesmartphone/Usage
> ('Display', False, {   'policy': 0, 'refcount': 0})
>  [SIGNAL]    org.freesmartphone.GSM.Network.SignalStrength    from
> :1.11 /org/freesmartphone/GSM/Device
>
> rules.yaml:
> root at om-gta02 ~ $ cat /etc/freesmartphone/oevents/rules.yaml
>
> # This file is in YAML format (http://www.yaml.org/)
> # We define a list of rules that will be automatically loaded
> # When we start the oevents module of the framework daemon
> #
> # The attributes of a rule are :
> # - trigger     : trigger object
> # - filters     : filters object or list of filters objects
> # - actions     : action object or list of actions objects
> #
> # We define the following functions :
> # - CallStatus()            : create a trigger object activated on a
> call status event
> # - PowerStatus()           : create a trigger object activated on a
> power status event
> # - HasAttr(name, value)    : create a filter that accept signal with
> a given attribute
> # - Not(filter)             : create a neg filter
> # - PlaySound(file)         : Action that starts to play an audio file
> # - StopSound(file)         : Action that stop an audio file
> # - SetScenario(name)       : Action that sets an audio scenario
> # - StartVibration
> # - StopVibration
> # - RingTone(cmd)           : cmd can be 'start' or 'stop'
> # - Time(hour, min)         : create a trigger activated at the given time
> # - Debug(msg)              : Action that prints a debug message (only
> for debuging)
> -
>     #
>     # Call -> Audio Scenario Handling
>     #
>     trigger: IncomingMessage()
>     actions: MessageTone(play)
>
> -
>     while: CallListContains("incoming")
>     filters: Not(CallListContains("active"))
>     actions:
>              - RingTone()
>              - Command('xset -display localhost:0 s reset')
>              - SetLed("gta02_aux_red", "blink")
>              - OccupyResource(Display)
> -
> #    while: CallStatus()
> #    filters: Or(HasAttr(status, "outgoing"), HasAttr(status, "active"))
> #    actions:
> #            - OccupyResource(CPU)
> #-
> #    while: CallStatus()
> #    filters:
> #            - Or(Or(HasAttr(status, "outgoing"), HasAttr(status,
> "active")), And(HasAttr(status, "incoming"),
> CallListContains("active")))
> #            - Not(BTHeadsetIsConnected())
> #    actions:
> #            - SetScenario(gsmhandset)
> #-
>     while: CallStatus()
>     filters:
>             - Or(Or(HasAttr(status, "outgoing"), HasAttr(status,
> "active")), And(HasAttr(status, "incoming"),
> CallListContains("active")))
>             - BTHeadsetIsConnected()
>     actions:
>             - SetScenario(gsmbluetooth)
>             - BTHeadsetPlaying()
> -
>     while: PowerStatus()
>     filters: HasAttr(status, "charging")
>     actions: SetLed("gta02_power_orange", "light")
>
> -
>     while: PowerStatus()
>     filters: Not(HasAttr(status, "discharging"))
>     actions: OccupyResource(CPU)
>
> -
>     while: PowerStatus()
>     filters: HasAttr(status, "critical")
>     actions: SetLed("gta02_power_orange", "blink")
> -
>     while: PowerStatus()
>     filters: HasAttr(status, "full")
>     actions: SetLed("gta02_power_blue", "light")
> -
>     trigger: PowerStatus()
>     filters: HasAttr(status, "empty")
>     actions: Command('poweroff')
>
>     #
>     # Headset Audio Scenario Support. There is still work to be done.
>     #
> -
>     trigger: InputEvent()
>     filters:
>              - HasAttr(switch, "HEADSET")
>              - HasAttr(event, "pressed")
>     actions: Command('amixer -d sset "Amp Spk" mute')
> -
>     trigger: InputEvent()
>     filters:
>              - HasAttr(switch, "HEADSET")
>              - HasAttr(event, "released")
>     actions: Command('amixer -d sset "Amp Spk" unmute')
>
>
>     #
>     # Idleness Brightness Handling
>     # (activating the user's screen saver from a central daemon is quite
> hacky
>     #  we really want some user's application to listen for the right
> signals)
> -
>     trigger: IdleState()
>     filters: HasAttr(status, "busy")
>     actions: Command('xset -display localhost:0 s reset')
> -
>     trigger: IdleState()
>     filters: HasAttr(status, "idle_dim")
>     actions:
>              - Command('xset -display localhost:0 s blank')
>              - Command('xset -display localhost:0 s activate')
> root at om-gta02 ~ $
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>

    while: CallListContains("incoming")
    filters: Not(CallListContains("active"))
    actions:
             - RingTone()

I think that's the part of rules.yaml you want to see ;)

-- 
Sebastian Krzyszkowiak
dos



More information about the community mailing list