{"_id":"@ansgomez/node-beacon-scanner","_rev":"3-d3a44edab8cee198a9d24d04fe69f175","name":"@ansgomez/node-beacon-scanner","dist-tags":{"latest":"0.2.5"},"versions":{"0.2.3":{"name":"@ansgomez/node-beacon-scanner","version":"0.2.3","description":"The node-beacon-scanner is a Node.js module which allows you to scan BLE beacon packets and parse the packet data. This module supports MiroCards, iBeacon, Eddystone, and Estimote.","main":"./lib/scanner.js","directories":{"lib":"lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["MiroCard","Eddystone","iBeacon","Estimote","BLE","Bluetooth Low Energy","Bluetooth smart","Bluetooth","IoT","Internet of Things"],"homepage":"https://github.com/ansgomez","author":{"name":"Andres Gomez","email":"andres@mirocard.swiss","url":"https://github.com/ansgomez"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ansgomez/node-beacon-scanner.git"},"dependencies":{"@abandonware/noble":">=1.9.2-5"},"bugs":{"url":"https://github.com/ansgomez/node-beacon-scanner/issues"},"gitHead":"b9eab7bd2ab309d747a666245b1a42df668efc8a","_id":"@ansgomez/node-beacon-scanner@0.2.3","_nodeVersion":"15.7.0","_npmVersion":"7.4.3","dist":{"integrity":"sha512-AA7SK787cxuCrjH6ZnShRD35Pl8cGM6SPLb/H3CTJDli3TKWDRX5b9TP+pIY2zp8viqOfobHMc7u4SzXASy/RQ==","shasum":"8cf2ff1fed1bd7cb939f016e038e8ea1b717e130","tarball":"https://registry.npmjs.org/@ansgomez/node-beacon-scanner/-/node-beacon-scanner-0.2.3.tgz","fileCount":9,"unpackedSize":45826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWPy2CRA9TVsSAnZWagAAIM4P/AmxT5P795K7fEw+8e28\nCF8nTDZJ4YA2o6wjx8pYc1hVZ48UAr2iiorE4WK0JBe+y/DgU+VjsHdBCOuZ\nKlL2Py4kCxteNR4WC+TqR0ZU2bD+9uFNSs77RbLaZvvTNr7zkrebNMvVzekv\nTSij1tUq6sA9T5jFApCkvBkWUZV7eAdg9s5Qz+ABpT6W6r92CPRPlEVkPp3B\n2LK0FCxWKbHeGpwYHjY9XwxIqla7tSQYUhCGOkCMIYabK/+SKwno2Jr6PnzD\n0znrI1GCVWS8pbAaaofGdP5GV4eEGrucq0cIpMYcows8CQTringYTH5hme2P\nFZB3Ww2wmYXbEy3Yxlhy2Km8pppQmoBPEtonBBRMpT+k+IxZvYmuzMpMafEQ\n+24DRtrSNdUxEq0UFkHOCrlfWX6v848ZKYiV/e86BoS3BlKKsQ8otrpZfOnz\nJmMwXPDW0UFi/mKCdwX3GwOw/7KAlaQ5p7GHW//dStoWaAdJ7D+86zjQdTmc\njKWfB5pqaOLSOpGndedhrgsNCRh1S9Pd0r1aAKjBPWOP49E3ZkoW+OnN4AZ0\ngdtuNGDoFVkbczt4DY2oV49I2KGM/SmxZgi/icGWFRezsvhJq3+pYatK1ozm\ngCqOGH3Jerdq5RNM/OvYd6ua9pJNSwwgrKW0/oDNnQtCrr6L+Nrh1D6mvcBI\nwZD8\r\n=HBU+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvcLAWOlSLDL5HPgvN1io1akIyFxy0HFeujwg9otRc6gIgSJbb2Sr457QHC2mhQ8gjeBY+lZdOrnBZ9+dQDDYy6H0="}]},"_npmUser":{"name":"ansgomez","email":"ans.gomez@gmail.com"},"maintainers":[{"name":"ansgomez","email":"ans.gomez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-beacon-scanner_0.2.3_1616444597516_0.682154018634026"},"_hasShrinkwrap":false},"0.2.4":{"name":"@ansgomez/node-beacon-scanner","version":"0.2.4","description":"The node-beacon-scanner is a Node.js module which allows you to scan BLE beacon packets and parse the packet data. This module supports MiroCards, iBeacon, Eddystone, and Estimote.","main":"./lib/scanner.js","directories":{"lib":"./lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["MiroCard","Eddystone","iBeacon","Estimote","BLE","Bluetooth Low Energy","Bluetooth smart","Bluetooth","IoT","Internet of Things"],"homepage":"https://github.com/ansgomez","author":{"name":"Andres Gomez","email":"andres@mirocard.swiss","url":"https://github.com/ansgomez"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ansgomez/node-beacon-scanner.git"},"dependencies":{"@abandonware/noble":">=1.9.2-5"},"bugs":{"url":"https://github.com/ansgomez/node-beacon-scanner/issues"},"gitHead":"455e3c90872a46bd75676147c1e389bb336c39fb","_id":"@ansgomez/node-beacon-scanner@0.2.4","_nodeVersion":"15.7.0","_npmVersion":"7.4.3","dist":{"integrity":"sha512-69GU4hqRGSQTv+2XlsWPiM11E2tFFcNq8pqvrBJGQJj6bZlzT4OKBkGGVy4Cuz3Xp5BYnBRZUEV6iVYy75NZLA==","shasum":"a01db202c9aac200e1006bf6076914b82f6a1464","tarball":"https://registry.npmjs.org/@ansgomez/node-beacon-scanner/-/node-beacon-scanner-0.2.4.tgz","fileCount":9,"unpackedSize":47196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWbODCRA9TVsSAnZWagAAlgcP/RbV5SlimxdN2rveG9XL\nk/YtwuR1bV5Qm5hDS6XiRxjDfMavEQnmIb1SE1qwNVyz/fij9SMiObm6/UXe\nZiVrKvFN7NTceK+vkOAmqy/ECh+Jmc4gx9p4UkY2co9BqHYa/WGvoo0RL0rG\ncnxwgzBdWtqmoLctMMKPF5W6fUwDFHxoeebva653tOiotd+5ePCTVY7UZqnD\nVdDazPGKATDw9SJzZeW0OyRogo7UzMepic8J8ACUHbvVYOt552lfsfSbXS5s\n4VWlGNCbHXwD/Ve1ivkYgtd3hCOImOCy/X69tVaM0dxiGN0PttxWvrIGk8JT\nIynZSGnd6PlQ7P23o2KMuTyCVmD5Qp8fXylydZ5gVAZKo6dbX13v+2NhPsyk\nzvjDo/XYhM82AeILjYl57lMP/qLvvIBmIuG7INeflRfverAPPGL9Tlj7p8fc\nHmcsFQ2WdjHcQ8cIPfoNo86Dtkymgt0iteDcYcqHtV0fadaYHLx81cDQDJ9k\nbvyUjZK8vZxxU4xkXTKPH4aw4JOHlXqBMQoz0VQT3rBaw2FfPLlBfwlm0rPB\nNbbjvWX0aqfAUE6JWFMNvTZHLGuTBNHWU1Y+rXcHiFBwa12pyytg0Y0Rb4vP\nNx7WoYJ6uzxgHnyvzZZKsmDVItPVdRg5eW/RqCgy/voCfCIcx9BufZAk+7Tt\njOZ8\r\n=Kw04\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCj1UYVlF5LD2HUgDEjfudkKorxks3SanOu3pal9t8CAIhAK4fSO3ukv2CaEgB1iC7/npgp+jRPrvS9xEYhJLx9L5O"}]},"_npmUser":{"name":"ansgomez","email":"ans.gomez@gmail.com"},"maintainers":[{"name":"ansgomez","email":"ans.gomez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-beacon-scanner_0.2.4_1616491394881_0.5229021282910971"},"_hasShrinkwrap":false},"0.2.5":{"name":"@ansgomez/node-beacon-scanner","version":"0.2.5","description":"The node-beacon-scanner is a Node.js module which allows you to scan BLE beacon packets and parse the packet data. This module supports MiroCards, iBeacon, Eddystone, and Estimote.","main":"./lib/scanner.js","directories":{"lib":"./lib"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["MiroCard","Eddystone","iBeacon","Estimote","BLE","Bluetooth Low Energy","Bluetooth smart","Bluetooth","IoT","Internet of Things"],"homepage":"https://github.com/ansgomez","author":{"name":"Andres Gomez","email":"andres@mirocard.swiss","url":"https://github.com/ansgomez"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/ansgomez/node-beacon-scanner.git"},"dependencies":{"@abandonware/noble":">=1.9.2-5"},"bugs":{"url":"https://github.com/ansgomez/node-beacon-scanner/issues"},"gitHead":"63220d3132f60efd2a8fe57a53cfaca288e4cf2a","_id":"@ansgomez/node-beacon-scanner@0.2.5","_nodeVersion":"15.7.0","_npmVersion":"7.4.3","dist":{"integrity":"sha512-7qky7oCXeiN3ci19pX0/r/x7CZrV7xqs5a7W7iD6+cszC4eEWYlW9m/Lxmc8wngBw/3G1X5HFpZtPBu5UdPc6w==","shasum":"e76990a938bea25bf1f5b4abb84363dc9c42c941","tarball":"https://registry.npmjs.org/@ansgomez/node-beacon-scanner/-/node-beacon-scanner-0.2.5.tgz","fileCount":9,"unpackedSize":47199,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWkWgCRA9TVsSAnZWagAAQw8P/2/JZK5rXLw1OgxlwxSV\ngZaZJBCQqY143PFbkpjy/tsvY4KwtJ05Qf+DMjDA0TmeBfEKqdka6XUL4hfG\nDaB0SNI4pqlbyzJWtgNNTErsA+JY1s/8gedwZc07fu2dmJ49KQ9gGAa06dco\nrvTyqK0zh9TmfZ16fhF9WcCXidCpBhpYyUkIA24fzCFf4voc3/E75SLoh/XS\nR9a7E8fgi2iuIc9GrbwlS7nliQ6IXtnWyo2QLeNi2nu6kurRFzlJxkK8qhIH\nbhzhrVHA42XOcCVIGreDhGLxZ/YJdOtpE/XFQWp4iBvtt+jZuAXb9EbO0yqs\nriAmvsrNDeaOkYHBj7nFe/G07IC8eqMJwqOPmPVQp12c9yE8WhvCdsgFnCXp\n7HB4dPtrGrrdA2kBugQcdy0GzpFaeUgUyxFvFJDr4SMAT6nuPThfB15te9cZ\nBpVEt/FuXolD+SkV6/pGNrT469Ia5b9Fi2EuhRZ+6lHXGvMYw4qE3UXkXrpf\ng5znZK2C6JEIZjz7k7WbI+GElLFQrljySVOMOZIhJgPlpR5unbTPTxc7kTFL\nvmUwaM8mASZNndxh0BmlNt9VnAO9QnVUNsGF0LTEoKUy26JWBaF3peFPVtlc\n5sMmZwM/D9cppQONleLnG6IyUQpO8xJ0MkqgUcfrRWH2hemKuXf7RW8VQR1o\n6ul2\r\n=fDzP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFOdieJN3imeZFl4hARNJnVXj4fBXDDg8YFt6mbHQPpNAiBz2yHNIZz5RDdnWCmxlnCnzPPXzYdRhFdqgM/hj8V2hg=="}]},"_npmUser":{"name":"ansgomez","email":"ans.gomez@gmail.com"},"maintainers":[{"name":"ansgomez","email":"ans.gomez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-beacon-scanner_0.2.5_1616528799701_0.11302470604443648"},"_hasShrinkwrap":false}},"time":{"created":"2021-03-22T20:23:17.407Z","0.2.3":"2021-03-22T20:23:17.665Z","modified":"2022-04-04T14:19:39.886Z","0.2.4":"2021-03-23T09:23:15.045Z","0.2.5":"2021-03-23T19:46:39.845Z"},"maintainers":[{"name":"ansgomez","email":"ans.gomez@gmail.com"}],"description":"The node-beacon-scanner is a Node.js module which allows you to scan BLE beacon packets and parse the packet data. This module supports MiroCards, iBeacon, Eddystone, and Estimote.","homepage":"https://github.com/ansgomez","keywords":["MiroCard","Eddystone","iBeacon","Estimote","BLE","Bluetooth Low Energy","Bluetooth smart","Bluetooth","IoT","Internet of Things"],"repository":{"type":"git","url":"git+https://github.com/ansgomez/node-beacon-scanner.git"},"author":{"name":"Andres Gomez","email":"andres@mirocard.swiss","url":"https://github.com/ansgomez"},"bugs":{"url":"https://github.com/ansgomez/node-beacon-scanner/issues"},"license":"MIT","readme":"node-beacon-scanner\n===============\n\nThe node-beacon-scanner is a Node.js module which allows you to scan BLE beacon packets and parse the packet data. This module supports MiroCard, iBeacon, Eddystone, and Estimote.\n\nThe supported beacon data formats are as follows:\n\n* MiroCard\n* iBeacon\n* Eddystone-UID\n* Eddystone-URL\n* Eddystone-TLM (Unencrypted)\n* Eddystone-EID\n* Estimote-Telemetry\n* Estimote-Nearable\n\n## Dependencies\n\n* [Node.js](https://nodejs.org/en/) 6 +\n* [@abandonware/noble](https://github.com/abandonware/noble)\n\nSee the document of the [@abandonware/noble](https://github.com/abandonware/noble) for details on installing the [@abandonware/noble](https://github.com/abandonware/noble).\n\nNote that the noble has to be run as root on most of Linux environments. See the the document of the [@abandonware/noble](https://github.com/abandonware/noble) for details.\n\nThe early versions of this module depended on [noble](https://github.com/sandeepmistry/noble) for BLE handling. But the [noble](https://github.com/sandeepmistry/noble) seems not to support Node v10 or later versions. Now, this module is employing [@abandonware/noble](https://github.com/abandonware/noble), which was forked from [noble](https://github.com/sandeepmistry/noble). For the purouse of the backward compatibility, this module works with [noble](https://github.com/sandeepmistry/noble) on Node v8 or earlier versions.\n\n\n## Installation\n\n```\n$ mkdir -p ~/mirocard-scanner\n$ cd ~/mirocard-scanner\n$ npm install @abandonware/noble\n$ npm install @ansgomez/node-beacon-scanner\n```\n\n---------------------------------------\n## Table of Contents\n\n* [Quick Start](#Quick-Start)\n* [`BeaconScanner` object](#BeaconScanner-object)\n  * [scartScan() method](#BeaconScanner-startScan-method)\n  * [stopScan() method](#BeaconScanner-stopScan-method)\n  * [`onadvertisement` event handler](#BeaconScanner-onadvertisement-event-handler)\n* [`BeaconScannerAdvertisement` object](#BeaconScannerAdvertisement-object)\n* [Release Note](#Release-Note)\n* [References](#References)\n* [License](#License)\n\n---------------------------------------\n## <a id=\"Quick-Start\">Quick Start</a>\n\nCreate a new file inside the `mirocard-scanner` folder and paste the following code.\nThis sample code shows how to start scanning and how to get parsed packets.\n\n```JavaScript\nconst BeaconScanner = require('@ansgomez/node-beacon-scanner');\nconst scanner = new BeaconScanner();\n\n// Set an Event handler for becons\nscanner.onadvertisement = (ad) => {\n  // Print full payload\n  // console.log(JSON.stringify(ad, null, '  '));\n  // console.log(ad.mirocard.ad.manufacturerData);\n\n  // Print MiroCard Sensor Data\n  console.log(\"MAC: \"+ad.address);\n  console.log(\"Temperature: \"+ad.mirocard.temp);\n  console.log(\"Humidity: \"+ad.mirocard.rh + \"\\n\");\n};\n\n// Start scanning\nscanner.startScan().then(() => {\n  console.log('Started to scan.')  ;\n}).catch((error) => {\n  console.error(error);\n});\n```\n\nThe sample code above will output the result as follows:\n\n```\nStarted to scan.\nMAC: 60:77:71:57:17:83\nTemperature: 23.85\nHumidity: 25.60\n...\n```\n\n---------------------------------------\n## <a id=\"BeaconScanner-object\">`BeaconScanner` object</a>\n\nIn order to use the node-beacon-scanner, you have to load the node-beacon-scanner module as follows:\n\n```JavaScript\nconst BeaconScanner = require('node-beacon-scanner');\n```\n\nYou can get an `BeaconScanner` constructor from the code above. Then you have to create an `BeaconScanner` object from the `BeaconScanner` constructor as follows:\n\n```JavaScript\nconst scanner = new BeaconScanner();\n```\n\nThe `BeaconScanner` constructor takes an argument optionally. It must be a hash object containing the properties as follows:\n\nProperty | Type   | Required | Description\n:--------|:-------|:---------|:-----------\n`noble`  | Noble  | option   | a Noble object of the [`noble`](https://www.npmjs.com/package/noble) module\n\nThe node-beacon-scanner module uses the [`noble`](https://www.npmjs.com/package/noble) module in order to scan the beacons coming from the BLE beacon device(s). If you want to interact other BLE devices using the noble module, you can create an `Noble` object by yourself, then pass it to this module. If you don't specify a `Noble` object to the `noble` property, this module automatically create a `Noble` object internally.\n\nThe sample code below shows how to pass a `Nobel` object to the `Linking` constructor.\n\n```JavaScript\n// Create a Noble object\nconst noble = require('noble');\n\n// Create a Linking object\nconst BeaconScanner = require('node-beacon-scanner');\nconst scanner = new BeaconScanner({'noble': noble});\n```\n\nIn the code snippet above, the variable `scanner` is a `BeaconScanner` object. The `BeaconScanner` object has methods as described in sections below.\n\n### <a id=\"BeaconScanner-startScan-method\">scartScan() method</a>\n\nThe `startScan()` method starts to scan advertising packets from BLE beacon devices. This method returns a `Promise` object.\n\nWhenever a packet is received, the callback function set to the [`onadvertisement`](#BeaconScanner-onadvertisement-event-handler) property of the `BeaconScanner` object will be called. When a packet is received, an [`BeaconScannerAdvertisement`](#BeaconScannerAdvertisement-object) object will be passed to the callback function.\n\n```JavaScript\n// Set an Event handler for becons\nscanner.onadvertisement = (ad) => {\n  console.log(JSON.stringify(ad, null, '  '));\n};\n\n// Start scanning\nscanner.startScan().then(() => {\n  console.log('Started to scan.')  ;\n}).catch((error) => {\n  console.error(error);\n});\n```\n\n### <a id=\"BeaconScanner-stopScan-method\">stopScan() method</a>\n\nThe `stopScan()` method stops to scan advertising packets from BLE beacon devices. See the section \"[`startScan()` method](#BeaconScanner-startScan-method)\" for details.\n\n### <a id=\"BeaconScanner-onadvertisement-event-handler\">`onadvertisement` event handler</a>\n\nIf a callback function is set to the `onadvertisement` property, the callback function will be called whenever an advertising packet is received from a BLE beacon device during the scan is active (from the moment when the `startScan()` method is called, to the moment when the `stopScan()` method is called).\n\nSee the section \"[`startScan()` method](#BeaconScanner-startScan-method)\" for details.\n\n---------------------------------------\n## <a id=\"BeaconScannerAdvertisement-object\">`BeaconScannerAdvertisement` object</a>\n\nThe `BeaconScannerAdvertisement` object represents an advertising data coming from the BLE beacon device. This object is just a hash object containing properties as follows. Note that the structure varies depending on the format of the beacon. You can know the format of the beacon from the value of the `beaconType` property.\n\n### iBeacon\n\n```JavaScript\n{\n  \"id\": \"c7dfbfd9f64a\",\n  \"address\": \"c7:df:bf:d9:f6:4a\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"iBeacon\",\n  \"iBeacon\": {\n    \"uuid\": \"B9407F30-F5F8-466E-AFF9-25556B57FE6D\",\n    \"major\": 21983,\n    \"minor\": 57807,\n    \"txPower\": 180\n  }\n}\n```\n\nThe value of the `iBeacon` property contains the properties as follows:\n\nProperty  |Type    |Description\n:---------|:-------|:----------\n`uuid`    | String | Proximity UUID\n`major`   | Number | Major\n`minor`   | Number | Minor\n`txPower` | Number | Measured Power (dBm)\n\n### <a id=\"BeaconScannerAdvertisement-object-eddystone\">Eddystone-UID</a>\n\n```JavaScript\n{\n  \"id\": \"c6debed8f549\",\n  \"address\": \"c6:de:be:d8:f5:49\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"eddystoneUid\",\n  \"eddystoneUid\": {\n    \"txPower\": -35,\n    \"namespace\": \"EDD1EBEAC04E5DEFA017\",\n    \"instance\": \"2D3EA3203B6B\"\n  }\n}\n```\n\nThe value of the `eddystoneUid` property contains the properties as follows:\n\nProperty     |Type    |Description\n:------------|:-------|:----------\n`namespace`  | String | Namespace ID\n`instance`   | String | Instance ID\n`txPower`    | Number | Calibrated Tx power (dBm)\n\n\n### Eddystone-URL\n\n```JavaScript\n{\n  \"id\": \"c6debed8f549\",\n  \"address\": \"c6:de:be:d8:f5:49\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"eddystoneUrl\",\n  \"eddystoneUrl\": {\n    \"txPower\": -35,\n    \"url\": \"http://go.esti.be/\"\n  }\n}\n```\n\nThe value of the `eddystoneUrl` property contains the properties as follows:\n\nProperty  |Type    |Description\n:---------|:-------|:----------\n`url`     | String | Decoded URL\n`txPower` | Number | Calibrated Tx power (dBm)\n\n### Eddystone-TLM (Unencrypted)\n\n```JavaScript\n{\n  \"id\": \"c6debed8f549\",\n  \"address\": \"c6:de:be:d8:f5:49\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"eddystoneTlm\",\n  \"eddystoneTlm\": {\n    \"batteryVoltage\": 6059,\n    \"temperature\": 28.59765625,\n    \"advCnt\": 83,\n    \"secCnt\": 361299\n  }\n}\n```\n\nThe value of the `eddystoneTlm` property contains the properties as follows:\n\nProperty         |Type    |Description\n:----------------|:-------|:----------\n`batteryVoltage` | Number | Battery voltage (mV)\n`temperature`    | Number | Beacon temperature (°C)\n`advCnt`         | Number | Advertising PDU count\n`secCnt`         | Number | Time since power-on or reboot\n\n### Eddystone-EID\n\n```JavaScript\n{\n  \"id\": \"d9d9fe86fb61\",\n  \"address\": \"d9:d9:fe:86:fb:61\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"eddystoneEid\",\n  \"eddystoneEid\": {\n    \"txPower\": -35,\n    \"eid\": \"79c58b83f198ddbe\"\n  }\n}\n```\n\nThe value of the `eddystoneEid` property contains the properties as follows:\n\nProperty  |Type    |Description\n:---------|:-------|:----------\n`eid`     | String | Ephemeral Identifier\n`txPower` | Number | Calibrated Tx power (dBm)\n\n### Estimote-Telemetry\n\nThere are two types in the Estimote Telemetry beacon data: `Type A` and `Type B`. The types can be obtained checking the value of the `subFrameType` property. If the type is `A`, the value is `0`. If the type is `B`, the value is `1`.\n\n*Type A*\n\n```JavaScript\n{\n  \"id\": \"c9e1c1dbf84c\",\n  \"address\": \"c9:e1:c1:db:f8:4c\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"estimoteTelemetry\",\n  \"estimoteTelemetry\": {\n    \"frameType\": 2,\n    \"subFrameType\": 0,\n    \"protocolVersion\": 2,\n    \"shortIdentifier\": \"2d3ea3203b6b2446\",\n    \"acceleration\": {\n      \"x\": -0.015748031496062992,\n      \"y\": -0.07874015748031496,\n      \"z\": 0.9921259842519685\n    },\n    \"moving\": false,\n    \"gpio\": {\n      \"pin0\": \"low\",\n      \"pin1\": \"low\",\n      \"pin2\": \"high\",\n      \"pin3\": \"high\"\n    },\n    \"errors\": {\n      \"firmware\": false,\n      \"clock\": false\n    },\n    \"pressure\": 100304.9765625\n  }\n}\n```\n\n*Type B*\n\n```JavaScript\n{\n  \"id\": \"c9e1c1dbf84c\",\n  \"address\": \"c9:e1:c1:db:f8:4c\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"estimoteTelemetry\",\n  \"estimoteTelemetry\": {\n    \"frameType\": 2,\n    \"subFrameType\": 1,\n    \"protocolVersion\": 2,\n    \"shortIdentifier\": \"2d3ea3203b6b2446\",\n    \"magneticField\": {\n      \"x\": 0,\n      \"y\": 0,\n      \"z\": 0\n    },\n    \"light\": 80.64,\n    \"uptime\": {\n      \"unitCode\": 1,\n      \"unitDesc\": \"minutes\",\n      \"value\": 596\n    },\n    \"temperature\": 28.75,\n    \"batteryVoltage\": 6059,\n    \"batteryLevel\": 95\n  }\n}\n```\n\n\n\n### Estimote-Nearable\n\n```JavaScript\n{\n  \"id\": \"f8d3c05e8001\",\n  \"address\": \"f8:d3:c0:5e:80:01\",\n  \"localName\": null,\n  \"txPowerLevel\": null,\n  \"rssi\": -59,\n  \"beaconType\": \"estimoteNearable\",\n  \"estimoteNearable\": {\n    \"nearableId\": \"bd20de5cd074de8d\",\n    \"temperature\": 25.75,\n    \"moving\": false,\n    \"acceleration\": {\n      \"x\": -15.625,\n      \"y\": -78.125,\n      \"z\": -1031.25\n    }\n  }\n}\n```\n\nThe value of the `estimoteNearable` property contains the properties as follows:\n\nProperty       |     |Type     |Description\n:--------------|:----|:--------|:----------\n`nearableId`   |     | String  | Nearable identifier\n`temperature`  |     | Number  | Temperature (°C)\n`moving`       |     | Boolean | Moving state (true: moving)\n`acceleration` |     | Object  | Acceleration\n--             | `x` | Number  | Acceleration on the X axis (milli G)\n--             | `y` | Number  | Acceleration on the Y axis (milli G)\n--             | `z` | Number  | Acceleration on the Z axis (milli G)\n\n---------------------------------------\n## <a id=\"Release-Note\">Release Note</a>\n\n* v0.2.3 (2021-03-22)\n  * Added new MiroCard payload parser\n* v0.2.2 (2019-11-24)\n  * Fixed a bug that the `txPower` of iBeacon was wrong. ([Thanks to @girtgirt](https://github.com/futomi/node-beacon-scanner/pull/12))\n  * Fixed a bug that an exception was thrown whenever it received an advertisement packet without service data. ([Thanks to @charlesread](https://github.com/futomi/node-beacon-scanner/issues/11))\n* v0.2.1 (2019-11-02)\n  * Fixed a typo of a property name in the [`BeaconScannerAdvertisement` object for Eddystone](#BeaconScannerAdvertisement-object-eddystone) (`namespece` -> `namespace`). ([Thanks to @natcl](https://github.com/futomi/node-beacon-scanner/pull/10))\n* v0.2.0 (2019-10-25)\n  * Supported Node v10 or later versions thanks to [@abandonware/noble](https://github.com/abandonware/noble)\n* v0.1.1 (2018-12-27)\n  * Fixed the bug that Eddystone beacons were not discovered if iBeacons were present as well. ([Thanks to @Tiggu](https://github.com/futomi/node-beacon-scanner/pull/8))\n* v0.1.0 (2018-07-14)\n  * Supported the Eddystone-UID of [Kontakt](https://kontakt.io/). The [spec of the Eddystone-UID](https://github.com/google/eddystone/tree/master/eddystone-uid) defines that the packet size is 20 bytes (the last 2 bytes are RFU). But the size of the packet form Kontakt device is 18 bytes. ([Thanks to @EwaRvr](https://github.com/futomi/node-beacon-scanner/issues/3))\n* v0.0.3 (2018-06-24)\n  * Fixed a bug that an exception was thrown when an unknown packet came.\n* v0.0.2 (2017-09-15)\n  * Fixed a bug that an exception was thrown when an unknown packet came.\n* v0.0.1 (2017-09-06)\n  * First public release\n\n---------------------------------------\n## <a id=\"References\">References</a>\n\n* [Eddystone Protocol Specification](https://github.com/google/eddystone/blob/master/protocol-specification.md)\n  * [Eddystone-UID](https://github.com/google/eddystone/tree/master/eddystone-uid)\n  * [Eddystone-URL](https://github.com/google/eddystone/tree/master/eddystone-url)\n  * [Eddystone-TLM](https://github.com/google/eddystone/tree/master/eddystone-tlm)\n  * [Eddystone-EID](https://github.com/google/eddystone/tree/master/eddystone-eid)\n* [iBeacon - Apple Developer](https://developer.apple.com/ibeacon/)\n* [Estimote packet specs](https://github.com/estimote/estimote-specs)\n\n---------------------------------------\n## <a id=\"License\">License</a>\n\nThe MIT License (MIT)\n\nCopyright (c) 2017-2019 Futomi Hatano\nCopyright (c) 2021 Andres Gomez\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","readmeFilename":"README.md"}