All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tõnis Tiganik" <ttiganik@high-mobility.com>
To: linux-bluetooth@vger.kernel.org
Subject: Write response for GATT WriteValue() method
Date: Wed, 3 Feb 2016 13:07:08 +0200	[thread overview]
Message-ID: <5F431791-D0DC-4BC2-8233-5EB4B464EC0A@high-mobility.com> (raw)

Hello, 
we are currently implementing communication between two BLE devices. We are sending chunks of data so we need to know when the other device is ready for the next chunks.

We have impemented the writing of the data with DBUS API. It looks like this:

message_var = g_variant_new_fixed_array(G_VARIANT_TYPE_BYTE, data, length, sizeof(char));
g_dbus_proxy_call_sync(write_characteristic, "WriteValue”, g_variant_new_tuple(&message_var, 1), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);

The write succeeds, the other device receives the data. However, it is not clear for us how to detect that the other device actually read the data(Write response).

So the first question is: How do we detect the GattCharacteristic1.WriteValue() response?


This is the blocking issue for us currently but I have some other questions about the problems that I image could arise in the future:

How do we send a notification about a successful read on a characteristic value? (the writing of the chunks goes both ways)
Do we get a notification of some sort when a Device goes out of range?

Thanks,
Tõnis



             reply	other threads:[~2016-02-03 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 11:07 Tõnis Tiganik [this message]
2016-02-03 15:38 ` Write response for GATT WriteValue() method Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5F431791-D0DC-4BC2-8233-5EB4B464EC0A@high-mobility.com \
    --to=ttiganik@high-mobility.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.