31 | "readme": "#Bluetooth Low Energy\n\n##Under Development\n\nThe BLE Library is still under heavy development and most functionality isn't available but the functions outlined below work. __You will need to update your firmware to our [January 3 release](https://github.com/tessel/firmware/releases/tag/2014-01-03) (or later) in order to use this library__. That's because this is a relatively bulky code package and our old USB driver code didn't allocate enough memory.\n\nYou can add more functionality if you want to look at the [BlueGiga BLE113 Datasheet](http://www.bluegiga.com/en-US/products/bluetooth-4.0-modules/ble113-bluetooth--smart-module/documentation/). You'll have to make an account on their website.\n\n###Installation\n```\nnpm install ble-ble113\n```\n\nIf you are using Tessel V1 (should say TM-00-00 on the back), you should wire the module to the GPIO port because UART isn't routed to the module ports in that hardware revision. GPIO 3, 2, and 1 on GPIO port goes to GPIO 3, 2, and 1 on module, respectively. \n\nIf you have Tessel V2, you can use module port a, b, or d.\n\n###Example\n```\nvar tessel = require('tessel');\n\n// Pick one of the two lines based on which version Tessel you have:\n// Tessel V1 (should say TM-00-00 on back) must use GPIO port\nvar hardware = tessel.port('gpio');\n\n// Tessel V2 (should say TM-00-02 on back) can use any port but C\nvar hardware = tessel.port('a')\n\nvar ble = require('../');\n\nvar bleController = ble.connect(hardware, function(err) {\n\tif (err) return console.log(err);\n\n\t// Use the device as a peripheral\n\t// bleController.startAdvertising();\n\n\t// Use the device as a master\n\t// bleController.scanForPeripherals()\n});\n\nbleController.on('discoveredPeripheral', function(peripheral) {\n console.log(\"Discovered a Peripheral!\");\n console.log(\"RSSI: \", peripheral.rssi);\n console.log(\"Sender: \", peripheral.sender);\n});\n```\n\n##Events\n\n* \"discoveredPeripheral\"\n* \"connectedPeripheral\"\n* \"disconnectedPeripheral\"\n* \"connectionStatus\" for when you connect to a peripheral or a master connects to you\n* \"completedProcedure\" should be called after searching for peripheral handles \n* \"readValue\" should be called after reading the value of a handle\n* \"foundInformation\" called when information about characteristics is found\n* \"booted\"\n\n##API\n```\nscanForPeripherals(callback);\nstopScanning(callback);\nstartAdvertising(callback);\nwriteValue(value, callback); // Write the value to be read by a master (only 1 value available now, will increase to 64 soon)\nconnectToPeripheral(address, address_type, conn_interval_min, conn_interval_max, timeout, latency, next);\ndisconnectFromPeripheral(connection_handle, next);\nfindInformation(connection_handle, start_handle, end_handle, next); // Used to find services/characteristics used by peripheral\nreadRemoteHandle(connection_handle, attHandle, next); // Used to read a remote value being advertised by slave.\n```\n\nWhen used in Master mode, typically, you connect to a peripheral, call `findInformation` to get a list of available characteristics to read, then call `readRemoteHandle` with the handle returned from the foundInformation event.\n\n\nEmail jon@technical.io with any questions/concerns\n",
|