title: bMessage format for bluetooth type SMS_GSM using org.bluez.obex IF
body: <p>I am trying to use org.bluez.obex interfaces to send sms messages via a Bluetooth connected phone. To do this I used the following piece of code:</p>
  
  <pre><code>import dbus
  BUS_NAME='org.bluez.obex'
  MESSAGE_ACCESS_INTERFACE = 'org.bluez.obex.MessageAccess1'
  
  print("Creating Session")
  session_path = client.CreateSession('DC:EE:06:FF:43:D6', { "Target": "map" })
  #get the SessionBus instance
  bus = dbus.SessionBus()
  obj = bus.get_object(BUS_NAME, session_path)
  #get MessageAccessInterface
  map = dbus.Interface(obj, MESSAGE_ACCESS_INTERFACE)
  
  if map:
      map.PushMessage(&lt;filename&gt;, 'telecom/msg/outbox', dict(), 
  reply_handler=reply, error_handler=errors)
  
  def errors(err):
      print (err)
  
  def reply(path, properties):
      print (path)
      print (peoperties)
  </code></pre>
  
  <p>The &lt;<strong>filename</strong>>, according to the very little specs docs I found has bMessage format(<a href="https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/obex-api.txt?h=5.50" rel="nofollow noreferrer">doc</a>), but I did not find any example of how to create this bMessage.
  <br> I found a template <a href="https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=429120" rel="nofollow noreferrer">here</a> on page 19, but did not help, it's too abstract.
  <br>Does anybody worked with this and knows how to create a bMessage?</p>