How to properly call PushMessage bluez/obex method for sending SMS via bluetooth











up vote
0
down vote

favorite












I have a problem with sending an SMS message using bluez / obex.



I'm trying to implement all methods from Message Access Profile and I succeeded to implement all but one.



I can't make method "object, dict PushMessage(string sourcefile, string folder, dict args)" to work.



Content of sourcefile (/tmp/msgzaGehyhi.bmf) is:



BEGIN:BMSG
VERSION:1.0
STATUS:UNREAD
TYPE:SMS_GSM
FOLDER:TELECOM/MSG/OUTBOX
BEGIN:BENV
BEGIN:VCARD
VERSION:2.1
N:John Smith
TEL:+385917512224
END:VCARD
BEGIN:BBODY
CHARSET:UTF-8
LENGTH:28
BEGIN:MSG
Fgghhh
END:MSG
END:BBODY
END:BENV
END:BMSG


Parameter folder is set to "outbox", but I also tried "telecom/msg/outbox".



Parameter args is an empty dictionary.



Before calling PushMessage method, I did a successfull call to method SetFolder("/telecom/msg") which works with calls like ListMessages("inbox", ).



After call to PushMessage method, I receive object transfer object which should upload sourcefile, and it's initial status is queued.



After few moments only thing I receive from bluez is error without any code or error text.



Output of dbus-monitor during PushMessage method code is



method call time=1541681140.634297 sender=:1.8 -> destination=org.bluez.obex serial=95 path=/org/bluez/obex/client/session5; interface=org.bluez.obex.MessageAccess1; member=PushMessage
string "/tmp/msgALrukMqt.bmf"
string "outbox"
array [
]
signal time=1541681140.637403 sender=:1.3 -> destination=(null destination) serial=414 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded
object path "/org/bluez/obex/client/session5/transfer49"
array [
dict entry(
string "org.freedesktop.DBus.Introspectable"
array [
]
)
dict entry(
string "org.bluez.obex.Transfer1"
array [
dict entry(
string "Status"
variant string "queued"
)
dict entry(
string "Name"
variant string "outbox"
)
dict entry(
string "Size"
variant uint64 223
)
dict entry(
string "Filename"
variant string "/tmp/msgALrukMqt.bmf"
)
dict entry(
string "Session"
variant object path "/org/bluez/obex/client/session5"
)
]
)
dict entry(
string "org.freedesktop.DBus.Properties"
array [
]
)
]
method return time=1541681140.639362 sender=:1.3 -> destination=:1.8 serial=415 reply_serial=95
object path "/org/bluez/obex/client/session5/transfer49"
array [
dict entry(
string "Status"
variant string "queued"
)
dict entry(
string "Name"
variant string "outbox"
)
dict entry(
string "Size"
variant uint64 223
)
dict entry(
string "Filename"
variant string "/tmp/msgALrukMqt.bmf"
)
dict entry(
string "Session"
variant object path "/org/bluez/obex/client/session5"
)
]
method call time=1541681140.643590 sender=:1.8 -> destination=org.freedesktop.DBus serial=96 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
method call time=1541681140.645212 sender=:1.8 -> destination=org.freedesktop.DBus serial=97 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
signal time=1541681141.520368 sender=:1.3 -> destination=(null destination) serial=416 path=/org/bluez/obex/client/session5/transfer49; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.bluez.obex.Transfer1"
array [
dict entry(
string "Status"
variant string "error"
)
]
array [
]
signal time=1541681141.521765 sender=:1.3 -> destination=(null destination) serial=417 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesRemoved
object path "/org/bluez/obex/client/session5/transfer49"
array [
string "org.freedesktop.DBus.Properties"
string "org.freedesktop.DBus.Introspectable"
string "org.bluez.obex.Transfer1"
]
signal time=1541681166.502012 sender=org.freedesktop.DBus -> destination=:1.8 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.8"


Can someone help me make it work, or at least give me a sample source file and parameters which work on their machine.



Thanks for the help










share|improve this question




























    up vote
    0
    down vote

    favorite












    I have a problem with sending an SMS message using bluez / obex.



    I'm trying to implement all methods from Message Access Profile and I succeeded to implement all but one.



    I can't make method "object, dict PushMessage(string sourcefile, string folder, dict args)" to work.



    Content of sourcefile (/tmp/msgzaGehyhi.bmf) is:



    BEGIN:BMSG
    VERSION:1.0
    STATUS:UNREAD
    TYPE:SMS_GSM
    FOLDER:TELECOM/MSG/OUTBOX
    BEGIN:BENV
    BEGIN:VCARD
    VERSION:2.1
    N:John Smith
    TEL:+385917512224
    END:VCARD
    BEGIN:BBODY
    CHARSET:UTF-8
    LENGTH:28
    BEGIN:MSG
    Fgghhh
    END:MSG
    END:BBODY
    END:BENV
    END:BMSG


    Parameter folder is set to "outbox", but I also tried "telecom/msg/outbox".



    Parameter args is an empty dictionary.



    Before calling PushMessage method, I did a successfull call to method SetFolder("/telecom/msg") which works with calls like ListMessages("inbox", ).



    After call to PushMessage method, I receive object transfer object which should upload sourcefile, and it's initial status is queued.



    After few moments only thing I receive from bluez is error without any code or error text.



    Output of dbus-monitor during PushMessage method code is



    method call time=1541681140.634297 sender=:1.8 -> destination=org.bluez.obex serial=95 path=/org/bluez/obex/client/session5; interface=org.bluez.obex.MessageAccess1; member=PushMessage
    string "/tmp/msgALrukMqt.bmf"
    string "outbox"
    array [
    ]
    signal time=1541681140.637403 sender=:1.3 -> destination=(null destination) serial=414 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded
    object path "/org/bluez/obex/client/session5/transfer49"
    array [
    dict entry(
    string "org.freedesktop.DBus.Introspectable"
    array [
    ]
    )
    dict entry(
    string "org.bluez.obex.Transfer1"
    array [
    dict entry(
    string "Status"
    variant string "queued"
    )
    dict entry(
    string "Name"
    variant string "outbox"
    )
    dict entry(
    string "Size"
    variant uint64 223
    )
    dict entry(
    string "Filename"
    variant string "/tmp/msgALrukMqt.bmf"
    )
    dict entry(
    string "Session"
    variant object path "/org/bluez/obex/client/session5"
    )
    ]
    )
    dict entry(
    string "org.freedesktop.DBus.Properties"
    array [
    ]
    )
    ]
    method return time=1541681140.639362 sender=:1.3 -> destination=:1.8 serial=415 reply_serial=95
    object path "/org/bluez/obex/client/session5/transfer49"
    array [
    dict entry(
    string "Status"
    variant string "queued"
    )
    dict entry(
    string "Name"
    variant string "outbox"
    )
    dict entry(
    string "Size"
    variant uint64 223
    )
    dict entry(
    string "Filename"
    variant string "/tmp/msgALrukMqt.bmf"
    )
    dict entry(
    string "Session"
    variant object path "/org/bluez/obex/client/session5"
    )
    ]
    method call time=1541681140.643590 sender=:1.8 -> destination=org.freedesktop.DBus serial=96 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
    string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
    method call time=1541681140.645212 sender=:1.8 -> destination=org.freedesktop.DBus serial=97 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
    string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
    signal time=1541681141.520368 sender=:1.3 -> destination=(null destination) serial=416 path=/org/bluez/obex/client/session5/transfer49; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
    string "org.bluez.obex.Transfer1"
    array [
    dict entry(
    string "Status"
    variant string "error"
    )
    ]
    array [
    ]
    signal time=1541681141.521765 sender=:1.3 -> destination=(null destination) serial=417 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesRemoved
    object path "/org/bluez/obex/client/session5/transfer49"
    array [
    string "org.freedesktop.DBus.Properties"
    string "org.freedesktop.DBus.Introspectable"
    string "org.bluez.obex.Transfer1"
    ]
    signal time=1541681166.502012 sender=org.freedesktop.DBus -> destination=:1.8 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
    string ":1.8"


    Can someone help me make it work, or at least give me a sample source file and parameters which work on their machine.



    Thanks for the help










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I have a problem with sending an SMS message using bluez / obex.



      I'm trying to implement all methods from Message Access Profile and I succeeded to implement all but one.



      I can't make method "object, dict PushMessage(string sourcefile, string folder, dict args)" to work.



      Content of sourcefile (/tmp/msgzaGehyhi.bmf) is:



      BEGIN:BMSG
      VERSION:1.0
      STATUS:UNREAD
      TYPE:SMS_GSM
      FOLDER:TELECOM/MSG/OUTBOX
      BEGIN:BENV
      BEGIN:VCARD
      VERSION:2.1
      N:John Smith
      TEL:+385917512224
      END:VCARD
      BEGIN:BBODY
      CHARSET:UTF-8
      LENGTH:28
      BEGIN:MSG
      Fgghhh
      END:MSG
      END:BBODY
      END:BENV
      END:BMSG


      Parameter folder is set to "outbox", but I also tried "telecom/msg/outbox".



      Parameter args is an empty dictionary.



      Before calling PushMessage method, I did a successfull call to method SetFolder("/telecom/msg") which works with calls like ListMessages("inbox", ).



      After call to PushMessage method, I receive object transfer object which should upload sourcefile, and it's initial status is queued.



      After few moments only thing I receive from bluez is error without any code or error text.



      Output of dbus-monitor during PushMessage method code is



      method call time=1541681140.634297 sender=:1.8 -> destination=org.bluez.obex serial=95 path=/org/bluez/obex/client/session5; interface=org.bluez.obex.MessageAccess1; member=PushMessage
      string "/tmp/msgALrukMqt.bmf"
      string "outbox"
      array [
      ]
      signal time=1541681140.637403 sender=:1.3 -> destination=(null destination) serial=414 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded
      object path "/org/bluez/obex/client/session5/transfer49"
      array [
      dict entry(
      string "org.freedesktop.DBus.Introspectable"
      array [
      ]
      )
      dict entry(
      string "org.bluez.obex.Transfer1"
      array [
      dict entry(
      string "Status"
      variant string "queued"
      )
      dict entry(
      string "Name"
      variant string "outbox"
      )
      dict entry(
      string "Size"
      variant uint64 223
      )
      dict entry(
      string "Filename"
      variant string "/tmp/msgALrukMqt.bmf"
      )
      dict entry(
      string "Session"
      variant object path "/org/bluez/obex/client/session5"
      )
      ]
      )
      dict entry(
      string "org.freedesktop.DBus.Properties"
      array [
      ]
      )
      ]
      method return time=1541681140.639362 sender=:1.3 -> destination=:1.8 serial=415 reply_serial=95
      object path "/org/bluez/obex/client/session5/transfer49"
      array [
      dict entry(
      string "Status"
      variant string "queued"
      )
      dict entry(
      string "Name"
      variant string "outbox"
      )
      dict entry(
      string "Size"
      variant uint64 223
      )
      dict entry(
      string "Filename"
      variant string "/tmp/msgALrukMqt.bmf"
      )
      dict entry(
      string "Session"
      variant object path "/org/bluez/obex/client/session5"
      )
      ]
      method call time=1541681140.643590 sender=:1.8 -> destination=org.freedesktop.DBus serial=96 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
      string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
      method call time=1541681140.645212 sender=:1.8 -> destination=org.freedesktop.DBus serial=97 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
      string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
      signal time=1541681141.520368 sender=:1.3 -> destination=(null destination) serial=416 path=/org/bluez/obex/client/session5/transfer49; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
      string "org.bluez.obex.Transfer1"
      array [
      dict entry(
      string "Status"
      variant string "error"
      )
      ]
      array [
      ]
      signal time=1541681141.521765 sender=:1.3 -> destination=(null destination) serial=417 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesRemoved
      object path "/org/bluez/obex/client/session5/transfer49"
      array [
      string "org.freedesktop.DBus.Properties"
      string "org.freedesktop.DBus.Introspectable"
      string "org.bluez.obex.Transfer1"
      ]
      signal time=1541681166.502012 sender=org.freedesktop.DBus -> destination=:1.8 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
      string ":1.8"


      Can someone help me make it work, or at least give me a sample source file and parameters which work on their machine.



      Thanks for the help










      share|improve this question















      I have a problem with sending an SMS message using bluez / obex.



      I'm trying to implement all methods from Message Access Profile and I succeeded to implement all but one.



      I can't make method "object, dict PushMessage(string sourcefile, string folder, dict args)" to work.



      Content of sourcefile (/tmp/msgzaGehyhi.bmf) is:



      BEGIN:BMSG
      VERSION:1.0
      STATUS:UNREAD
      TYPE:SMS_GSM
      FOLDER:TELECOM/MSG/OUTBOX
      BEGIN:BENV
      BEGIN:VCARD
      VERSION:2.1
      N:John Smith
      TEL:+385917512224
      END:VCARD
      BEGIN:BBODY
      CHARSET:UTF-8
      LENGTH:28
      BEGIN:MSG
      Fgghhh
      END:MSG
      END:BBODY
      END:BENV
      END:BMSG


      Parameter folder is set to "outbox", but I also tried "telecom/msg/outbox".



      Parameter args is an empty dictionary.



      Before calling PushMessage method, I did a successfull call to method SetFolder("/telecom/msg") which works with calls like ListMessages("inbox", ).



      After call to PushMessage method, I receive object transfer object which should upload sourcefile, and it's initial status is queued.



      After few moments only thing I receive from bluez is error without any code or error text.



      Output of dbus-monitor during PushMessage method code is



      method call time=1541681140.634297 sender=:1.8 -> destination=org.bluez.obex serial=95 path=/org/bluez/obex/client/session5; interface=org.bluez.obex.MessageAccess1; member=PushMessage
      string "/tmp/msgALrukMqt.bmf"
      string "outbox"
      array [
      ]
      signal time=1541681140.637403 sender=:1.3 -> destination=(null destination) serial=414 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded
      object path "/org/bluez/obex/client/session5/transfer49"
      array [
      dict entry(
      string "org.freedesktop.DBus.Introspectable"
      array [
      ]
      )
      dict entry(
      string "org.bluez.obex.Transfer1"
      array [
      dict entry(
      string "Status"
      variant string "queued"
      )
      dict entry(
      string "Name"
      variant string "outbox"
      )
      dict entry(
      string "Size"
      variant uint64 223
      )
      dict entry(
      string "Filename"
      variant string "/tmp/msgALrukMqt.bmf"
      )
      dict entry(
      string "Session"
      variant object path "/org/bluez/obex/client/session5"
      )
      ]
      )
      dict entry(
      string "org.freedesktop.DBus.Properties"
      array [
      ]
      )
      ]
      method return time=1541681140.639362 sender=:1.3 -> destination=:1.8 serial=415 reply_serial=95
      object path "/org/bluez/obex/client/session5/transfer49"
      array [
      dict entry(
      string "Status"
      variant string "queued"
      )
      dict entry(
      string "Name"
      variant string "outbox"
      )
      dict entry(
      string "Size"
      variant uint64 223
      )
      dict entry(
      string "Filename"
      variant string "/tmp/msgALrukMqt.bmf"
      )
      dict entry(
      string "Session"
      variant object path "/org/bluez/obex/client/session5"
      )
      ]
      method call time=1541681140.643590 sender=:1.8 -> destination=org.freedesktop.DBus serial=96 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
      string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
      method call time=1541681140.645212 sender=:1.8 -> destination=org.freedesktop.DBus serial=97 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
      string "type='signal',sender='org.bluez.obex',path='/org/bluez/obex/client/session5/transfer49',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged'"
      signal time=1541681141.520368 sender=:1.3 -> destination=(null destination) serial=416 path=/org/bluez/obex/client/session5/transfer49; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
      string "org.bluez.obex.Transfer1"
      array [
      dict entry(
      string "Status"
      variant string "error"
      )
      ]
      array [
      ]
      signal time=1541681141.521765 sender=:1.3 -> destination=(null destination) serial=417 path=/; interface=org.freedesktop.DBus.ObjectManager; member=InterfacesRemoved
      object path "/org/bluez/obex/client/session5/transfer49"
      array [
      string "org.freedesktop.DBus.Properties"
      string "org.freedesktop.DBus.Introspectable"
      string "org.bluez.obex.Transfer1"
      ]
      signal time=1541681166.502012 sender=org.freedesktop.DBus -> destination=:1.8 serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
      string ":1.8"


      Can someone help me make it work, or at least give me a sample source file and parameters which work on their machine.



      Thanks for the help







      bluetooth sms bluez obex






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 9 at 9:10

























      asked Nov 9 at 7:53









      Lisur

      6117




      6117





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53221745%2fhow-to-properly-call-pushmessage-bluez-obex-method-for-sending-sms-via-bluetooth%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53221745%2fhow-to-properly-call-pushmessage-bluez-obex-method-for-sending-sms-via-bluetooth%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Schultheiß

          Liste der Kulturdenkmale in Wilsdruff

          Android Play Services Check