All of lore.kernel.org
 help / color / mirror / Atom feed
* obexd MAP/MNS
@ 2016-10-28  4:09 Jason Gauthier
  2016-10-28  8:55 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Gauthier @ 2016-10-28  4:09 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

   In Python, I've been successful interfacing with PBAP, and recently
MAP.  Ultimately, though, my goal is to receive new message
notifications using MNS part of MAP.

I've read the Bluetooth document on MAP (section 6), and I've seen a
few requests around, but I am not sure how to implement this.

Does anyone have any python examples, or documentation, on how this is
implemented?

Thanks!

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: obexd MAP/MNS
  2016-10-28  4:09 obexd MAP/MNS Jason Gauthier
@ 2016-10-28  8:55 ` Luiz Augusto von Dentz
  2016-10-31 19:57   ` Jason Gauthier
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-10-28  8:55 UTC (permalink / raw)
  To: Jason Gauthier; +Cc: linux-bluetooth

Hi Jason,

On Fri, Oct 28, 2016 at 7:09 AM, Jason Gauthier <jagauthier@gmail.com> wrote:
> Hello,
>
>    In Python, I've been successful interfacing with PBAP, and recently
> MAP.  Ultimately, though, my goal is to receive new message
> notifications using MNS part of MAP.
>
> I've read the Bluetooth document on MAP (section 6), and I've seen a
> few requests around, but I am not sure how to implement this.
>
> Does anyone have any python examples, or documentation, on how this is
> implemented?

Check obexctl under tools, when a notification arrive it will create
an object implementing interface org.bluez.obex.Message1 which you can
subscribe with InterfacesAdded signal from ObjectManager.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: obexd MAP/MNS
  2016-10-28  8:55 ` Luiz Augusto von Dentz
@ 2016-10-31 19:57   ` Jason Gauthier
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Gauthier @ 2016-10-31 19:57 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

On Fri, Oct 28, 2016 at 4:55 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Hi Jason,
>
> On Fri, Oct 28, 2016 at 7:09 AM, Jason Gauthier <jagauthier@gmail.com> wrote:
>> Hello,
>>
>>    In Python, I've been successful interfacing with PBAP, and recently
>> MAP.  Ultimately, though, my goal is to receive new message
>> notifications using MNS part of MAP.
>>
>> I've read the Bluetooth document on MAP (section 6), and I've seen a
>> few requests around, but I am not sure how to implement this.
>>
>> Does anyone have any python examples, or documentation, on how this is
>> implemented?
>
> Check obexctl under tools, when a notification arrive it will create
> an object implementing interface org.bluez.obex.Message1 which you can
> subscribe with InterfacesAdded signal from ObjectManager.
>

Luiz,

 Thanks.  I've never used obexctl before. Thanks for pointing it out
to me.  I've been experimenting with this a bit.  Maybe I'm on the
wrong track.  It seems to me that  org.bluez.obex.Message1 is an
interface for a specific message. These messages do not exist until
after I do a .Get() function or one is received to the device.  Once
they do exist the only signal that exists on the interface appears to
be PropertiesChanged.

I do see new messages arrive within obexctl:
[NEW] Message /org/bluez/obex/client/session10/message288230376151721061

Which would be the interface you are mentioning.  But I can't seem to
capture this message within my existing code.
I've attached to the session ( /org/bluez/obex/client/session10/), and
I am using the one and only signal at this level:
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString
interface, QVariantMap changed_properties, QStringList
invalidated_properties)

BUS_NAME='org.bluez.obex'
SESSION_INTERFACE = 'org.bluez.obex.Session1'
MESSAGE_ACCESS_INTERFACE = 'org.bluez.obex.MessageAccess1'

       bus = dbus.SessionBus()
       obj = bus.get_object(BUS_NAME, session_path)
       self.session = dbus.Interface(obj, SESSION_INTERFACE)
       self.map = dbus.Interface(obj, MESSAGE_ACCESS_INTERFACE)

        bus.add_signal_receiver(self.properties_changed,
            dbus_interface="org.freedesktop.DBus.Properties",
            signal_name="PropertiesChanged",
            path_keyword="path")

But when the new message comes the signal is not activated.   This is
the only way I can think of to achieve access to the new message.

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-31 19:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28  4:09 obexd MAP/MNS Jason Gauthier
2016-10-28  8:55 ` Luiz Augusto von Dentz
2016-10-31 19:57   ` Jason Gauthier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.