Este é o comando mdbus2 que pode ser executado no provedor de hospedagem gratuita OnWorks usando uma de nossas várias estações de trabalho online gratuitas, como Ubuntu Online, Fedora Online, emulador Windows online ou emulador MAC OS online
PROGRAMA:
NOME
mdbus2 - introspecção DBus interativa, interação e monitoramento
SINOPSE
mdbus2 [OPÇÕES ...] [ me sirva [ caminho do objeto [ método [ params ... ]]]]
mdbus2 -Sim
mdbus2 -sl
DESCRIÇÃO
A mdbus2 comando é usado para explorar e interagir com os serviços DBus em seu . ônibus
e Sessão ônibus. O barramento de mensagens de todo o sistema existe apenas uma vez e é instalado em muitos
sistemas como o serviço "messagebus". O barramento de mensagens da sessão é por login do usuário (iniciado
cada vez que um usuário se loga) e geralmente vinculado à sua sessão X11.
Na forma mais simples, mdbus2 mostra os serviços disponíveis no barramento selecionado. Dado um
serviço nome, vai mostrar o disponível objetos exportado pelo serviço. Dado um serviço
nome e um objeto caminho, vai mostrar o exposto métodos, sinais e Propriedades por essa
objeto.
Fornecendo um método nome (E parâmetros), você pode chamar métodos no objeto e obter o
retorno valor(S).
No escuta modo, você pode observar os sinais enviados no barramento selecionado.
Também está incluído um interativo concha com preenchimento de tabulação e histórico de comandos.
OPÇÕES
--show-anônimo, -a
Também mostrar único serviços (anônimos) no ônibus.
--sistema, -s
Use o barramento do sistema em vez do barramento de sessão (padrão).
-show-pids, -p
Mostrar IDs de processo do UNIX.
--ouço, -l
Inicie o modo ouvinte, no qual você pode observar os sinais no ônibus.
--interativo, -i
Inicie um shell interativo.
--annotate-types, -t
Anote os tipos de DBus.
USO
Para invocar um método em um objeto implementado por um serviço, você precisa especificar o
seguintes valores:
1 serviço nome, por exemplo org.freesmartphone.ogsmd - O nome do serviço identifica
o processo servindo a uma série de objetos. Cada processo que se liga ao
ônibus recebe pelo menos um nome de serviço não exclusivo (anônimo) atribuído, como
: 1.0. Nomes únicos, como org.freesmartphone.ogsmd, geralmente são dados em
notação de nome de domínio reverso em letras minúsculas.
2 objeto caminho, por exemplo / org / freesmartphone / GSM / Dispositivo - O caminho do objeto
identifica um objeto concreto servido pelo processo. Caminhos de objetos geralmente
parecem caminhos do sistema de arquivos.
3 método, por exemplo org.freesmartphone.GSM.Call.Initiate - O nome do método
identifica uma operação que faz parte da interface (métodos e sinais)
de um objeto. Os nomes dos métodos estão usando CamelCase com notação de ponto.
4 parâmetros, por exemplo +49123456 voz ». (Para be descrito avançar).
EXEMPLOS
Descubra quais nomes de barramento estão atualmente registrados no barramento do sistema:
root @ om-gta02: ~ # mdbus -s
: 1.0
: 1.1
: 1.2
: 1.42
: 1.47
: 1.60
: 1.61
org.bluez
org.freedesktop.Avahi
org.freedesktop.DBus
org.freesmartphone.frameworkd
org.freesmartphone.ogsmd
org.pyneo.muxer
Descubra quais objetos são servidos por um determinado serviço:
root @ om-gta02: ~ # mdbus -s org.freesmartphone.frameworkd
/
/ org
/ org / freesmartphone
/ org / freesmartphone / Framework
/ org / freesmartphone / GSM
/ org / freesmartphone / GSM / Dispositivo
/ org / freesmartphone / GSM / Servidor
Descubra a interface de um determinado objeto:
root @ om-gta02: ~ # mdbus -s org.freesmartphone.ogsmd / org / freesmartphone / GSM / Device
[MÉTODO] org.freesmartphone.GSM.Call.Activate (i: index)
[MÉTODO] org.freesmartphone.GSM.Call.ActivateConference (i: index)
[MÉTODO] org.freesmartphone.GSM.Call.HoldActive ()
[MÉTODO] org.freesmartphone.GSM.Call.Initiate (s: número, s: tipo_)
[MÉTODO] org.freesmartphone.GSM.Call.Release (i: index)
[MÉTODO] org.freesmartphone.GSM.Call.ReleaseAll ()
[MÉTODO] org.freesmartphone.GSM.Call.ReleaseHeld ()
[SINAL] org.freesmartphone.GSM.Call.CallStatus (i: índice, s: status, a {sv}: propriedades)
[MÉTODO] org.freedesktop.DBus.Introspectable.Introspect ()
[MÉTODO] org.freesmartphone.GSM.Device.CancelCommand ()
[MÉTODO] org.freesmartphone.GSM.Device.GetAntennaPower ()
[MÉTODO] org.freesmartphone.GSM.Device.GetFeatures ()
[MÉTODO] org.freesmartphone.GSM.Device.GetInfo ()
[MÉTODO] org.freesmartphone.GSM.Device.PrepareForSuspend ()
[MÉTODO] org.freesmartphone.GSM.Device.RecoverFromSuspend ()
[MÉTODO] org.freesmartphone.GSM.Device.SetAntennaPower (b: power)
[MÉTODO] org.freesmartphone.GSM.SIM.ChangeAuthCode (s: old_pin, s: new_pin)
[MÉTODO] org.freesmartphone.GSM.SIM.DeleteEntry (i: índice)
[MÉTODO] org.freesmartphone.GSM.SIM.DeleteMessage (i: índice)
[MÉTODO] org.freesmartphone.GSM.SIM.GetAuthStatus ()
[MÉTODO] org.freesmartphone.GSM.SIM.GetImsi ()
[MÉTODO] org.freesmartphone.GSM.SIM.GetMessagebookInfo ()
[MÉTODO] org.freesmartphone.GSM.SIM.GetPhonebookInfo ()
[MÉTODO] org.freesmartphone.GSM.SIM.GetServiceCenterNumber ()
[MÉTODO] org.freesmartphone.GSM.SIM.GetSimCountryCode ()
[MÉTODO] org.freesmartphone.GSM.SIM.GetSubscriberNumbers ()
[MÉTODO] org.freesmartphone.GSM.SIM.RetrieveEntry (i: índice)
[MÉTODO] org.freesmartphone.GSM.SIM.RetrieveMessage (i: índice)
[MÉTODO] org.freesmartphone.GSM.SIM.RetrieveMessagebook (s: categoria)
[MÉTODO] org.freesmartphone.GSM.SIM.RetrievePhonebook ()
[MÉTODO] org.freesmartphone.GSM.SIM.SendAuthCode (s: código)
[MÉTODO] org.freesmartphone.GSM.SIM.SetServiceCenterNumber (s: número)
[MÉTODO] org.freesmartphone.GSM.SIM.StoreEntry (i: índice, s: nome, s: número)
[MÉTODO] org.freesmartphone.GSM.SIM.StoreMessage (s: número, s: conteúdo)
[MÉTODO] org.freesmartphone.GSM.SIM.Unlock (s: puk, s: new_pin)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus (s: status)
[SIGNAL] org.freesmartphone.GSM.SIM.NewMessage (i: index)
[MÉTODO] org.freesmartphone.GSM.Network.DisableCallForwarding (s: motivo, s: classe_)
[MÉTODO] org.freesmartphone.GSM.Network.EnableCallForwarding (s: motivo, s: classe_, s: número, i: tempo limite)
[MÉTODO] org.freesmartphone.GSM.Network.GetCallForwarding (s: motivo)
[MÉTODO] org.freesmartphone.GSM.Network.GetCallingIdentification ()
[MÉTODO] org.freesmartphone.GSM.Network.GetNetworkCountryCode ()
[MÉTODO] org.freesmartphone.GSM.Network.GetSignalStrength ()
[MÉTODO] org.freesmartphone.GSM.Network.GetStatus ()
[MÉTODO] org.freesmartphone.GSM.Network.ListProviders ()
[MÉTODO] org.freesmartphone.GSM.Network.Register ()
[MÉTODO] org.freesmartphone.GSM.Network.RegisterWithProvider (i: operator_code)
[MÉTODO] org.freesmartphone.GSM.Network.SetCallingIdentification (s: status)
[MÉTODO] org.freesmartphone.GSM.Network.Unregister ()
[SIGNAL] org.freesmartphone.GSM.Network.SignalStrength (i: força)
[SIGNAL] org.freesmartphone.GSM.Network.Status (a {sv}: status)
[MÉTODO] org.freesmartphone.GSM.PDP.ActivateContext (s: apn, s: usuário, s: senha)
[MÉTODO] org.freesmartphone.GSM.PDP.DeactivateContext ()
[MÉTODO] org.freesmartphone.GSM.PDP.GetCurrentGprsClass ()
[MÉTODO] org.freesmartphone.GSM.PDP.ListAvailableGprsClasses ()
[MÉTODO] org.freesmartphone.GSM.PDP.SetCurrentGprsClass (s: class_)
[SINAL] org.freesmartphone.GSM.PDP.ContextStatus (i: índice, s: status, a {sv}: propriedades)
[MÉTODO] org.freesmartphone.GSM.Test.Command (s: comando)
[MÉTODO] org.freesmartphone.GSM.Test.Echo (s: eco)
Chame um método em uma interface:
root @ om-gta02 ~ $ mdbus -s org.freesmartphone.ogsmd / org / freesmartphone / GSM / Device org.freesmartphone.GSM.Device.GetInfo
{'imei': '354651011234567',
'fabricante': 'FIC / OpenMoko',
'modelo': '"Modem GSM integrado Neo1973 GTA02"',
'revisão': '"HW: GTA02BV5, GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko8"'}
Use-o no modo de escuta:
root @ om-gta02: / local / pkg / fso / framework / framework # mdbus -s -l
ouvindo sinais no SystemBus do serviço 'todos', objeto 'todos' ...
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.pyneo.muxer '), dbus.String (u': 1.6 '), dbus.String (u' '))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.6'), dbus.String (u ': 1.6'), dbus.String (u ''))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.28'), dbus.String (u ''), dbus.String (u ': 1.28'))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.freesmartphone.frameworkd '), dbus.String (u' '), dbus.String (u': 1.28 '))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.freesmartphone.ogsmd '), dbus.String (u' '), dbus.String (u': 1.28 '))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.29'), dbus.String (u ''), dbus.String (u ': 1.29'))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u'org.pyneo.muxer '), dbus.String (u' '), dbus.String (u': 1.29 '))
[SIGNAL] org.freedesktop.DBus.NameOwnerChanged de org.freedesktop.DBus / org / freedesktop / DBus
(dbus.String (u ': 1.30'), dbus.String (u ''), dbus.String (u ': 1.30'))
[SIGNAL] org.freesmartphone.GSM.SIM.ReadyStatus de: 1.28 / org / freesmartphone / GSM / Device
(dbus.Boolean (False),)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus de: 1.28 / org / freesmartphone / GSM / Device
(dbus.String (u'SIM PIN '),)
[SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus de: 1.28 / org / freesmartphone / GSM / Device
(dbus.String (u'READY '),)
[SIGNAL] org.freesmartphone.GSM.SIM.ReadyStatus de: 1.28 / org / freesmartphone / GSM / Device
(dbus.Boolean (True),)
Use mdbus2 online usando serviços onworks.net