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
bluetooth sms bluez obex
add a comment |
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
bluetooth sms bluez obex
add a comment |
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
bluetooth sms bluez obex
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
bluetooth sms bluez obex
edited Nov 9 at 9:10
asked Nov 9 at 7:53
Lisur
6117
6117
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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