-From 8d2cfdbf129728ac3209d4ca09c58f18f73ce257 Mon Sep 17 00:00:00 2001
+From f2e1d8d745afa4f3a7974e22d9b31fb4b18921cf Mon Sep 17 00:00:00 2001
 From: Ben Turner <bent@silklabs.com>
 Date: Thu, 16 Jun 2016 14:29:54 -0700
 Subject: [PATCH] Android Bluedroid bindings
 
 ---
  Android.mk                              |   7 +
- lib/android/bindings.js                 | 859 ++++++++++++++++++++++++++++++++
+ lib/android/bindings.js                 | 864 ++++++++++++++++++++++++++++++++
  lib/android/ccc-descriptor.js           | 196 ++++++++
  lib/android/descriptor-event-emitter.js |  89 ++++
  lib/bleno.js                            |  20 +-
  lib/characteristic.js                   |   2 +
  package.json                            |   6 +-
- 7 files changed, 1168 insertions(+), 11 deletions(-)
+ 7 files changed, 1173 insertions(+), 11 deletions(-)
  create mode 100644 Android.mk
  create mode 100644 lib/android/bindings.js
  create mode 100644 lib/android/ccc-descriptor.js

+    log.warn('Unknown central \'%s\', ignoring write request', address);
+    assert(!this._centralMap.has(connectionId),
+           'Have another entry for connectionId ' + connectionId);
+    return;
+  }
+
+  const attribute = this._attributeMap.get(handle);
+  if (!attribute) {
+    log.warn('Unknown attribute handle %d, ignoring write request', handle);
+    return;
+  }
+
+  if (isPreparedWrite) {
+    log.warn('Prepared writes not yet supported');
+    return;
+  }
+
+  const callback = function(result) {
+    log.debug('_onWriteAttribute.callback', result, address);
+    if (needResponse) {
+      this._bledroid.command('attributeResponse ' +
+                            connectionId + ' ' +
+                            transactionId + ' ' +
+                            handle + ' ' +
+                            result);
+    }
+  }.bind(this);
+
+  attribute.emit('writeRequest',
+                 data,

+include $(BUILD_NODE_MODULE)
diff --git a/lib/android/bindings.js b/lib/android/bindings.js
new file mode 100644
index 0000000..e3e24f5
--- /dev/null
+++ b/lib/android/bindings.js
@@ -0,0 +1,864 @@
+'use strict';
+
+const assert = require('assert');
