Comparing version 0.0.4 to 0.0.5
@@ -33,3 +33,3 @@ var companyNames = { | ||
"001e": "Inventel", | ||
"001f": "AVM Berlin ", | ||
"001f": "AVM Berlin", | ||
"0020": "BandSpeed, Inc.", | ||
@@ -39,3 +39,3 @@ "0021": "Mansella Ltd", | ||
"0023": "WavePlus Technology Co., Ltd.", | ||
"0024": "Alcatel ", | ||
"0024": "Alcatel", | ||
"0025": "NXP Semiconductors (formerly Philips Semiconductors)", | ||
@@ -88,34 +88,34 @@ "0026": "C Technologies", | ||
"0053": "Free2move AB", | ||
"0054": "3DiJoy Corporation ", | ||
"0055": "Plantronics, Inc. ", | ||
"0056": "Sony Ericsson Mobile Communications ", | ||
"0057": "Harman International Industries, Inc. ", | ||
"0058": "Vizio, Inc. ", | ||
"0059": "Nordic Semiconductor ASA ", | ||
"005a": "EM Microelectronic-Marin SA ", | ||
"005b": "Ralink Technology Corporation ", | ||
"005c": "Belkin International, Inc. ", | ||
"005d": "Realtek Semiconductor Corporation ", | ||
"005e": "Stonestreet One, LLC ", | ||
"005f": "Wicentric, Inc. ", | ||
"0060": "RivieraWaves S.A.S ", | ||
"0061": "RDA Microelectronics ", | ||
"0062": "Gibson Guitars ", | ||
"0063": "MiCommand Inc. ", | ||
"0064": "Band XI International, LLC ", | ||
"0065": "Hewlett-Packard Company ", | ||
"0066": "9Solutions Oy ", | ||
"0067": "GN Netcom A/S ", | ||
"0068": "General Motors ", | ||
"0069": "A&D Engineering, Inc. ", | ||
"006a": "MindTree Ltd. ", | ||
"006b": "Polar Electro OY ", | ||
"0054": "3DiJoy Corporation", | ||
"0055": "Plantronics, Inc.", | ||
"0056": "Sony Ericsson Mobile Communications", | ||
"0057": "Harman International Industries, Inc.", | ||
"0058": "Vizio, Inc.", | ||
"0059": "Nordic Semiconductor ASA", | ||
"005a": "EM Microelectronic-Marin SA", | ||
"005b": "Ralink Technology Corporation", | ||
"005c": "Belkin International, Inc.", | ||
"005d": "Realtek Semiconductor Corporation", | ||
"005e": "Stonestreet One, LLC", | ||
"005f": "Wicentric, Inc.", | ||
"0060": "RivieraWaves S.A.S", | ||
"0061": "RDA Microelectronics", | ||
"0062": "Gibson Guitars", | ||
"0063": "MiCommand Inc.", | ||
"0064": "Band XI International, LLC", | ||
"0065": "Hewlett-Packard Company", | ||
"0066": "9Solutions Oy", | ||
"0067": "GN Netcom A/S", | ||
"0068": "General Motors", | ||
"0069": "A&D Engineering, Inc.", | ||
"006a": "MindTree Ltd.", | ||
"006b": "Polar Electro OY", | ||
"006c": "Beautiful Enterprise Co., Ltd.", | ||
"006d": "BriarTek, Inc. ", | ||
"006e": "Summit Data Communications, Inc. ", | ||
"006f": "Sound ID ", | ||
"0070": "Monster, LLC ", | ||
"0071": "connectBlue AB ", | ||
"0072": "ShangHai Super Smart Electronics Co. Ltd. ", | ||
"0073": "Group Sense Ltd. ", | ||
"006d": "BriarTek, Inc.", | ||
"006e": "Summit Data Communications, Inc.", | ||
"006f": "Sound ID", | ||
"0070": "Monster, LLC", | ||
"0071": "connectBlue AB", | ||
"0072": "ShangHai Super Smart Electronics Co. Ltd.", | ||
"0073": "Group Sense Ltd.", | ||
"0074": "Zomm, LLC ", | ||
@@ -125,44 +125,44 @@ "0075": "Samsung Electronics Co. Ltd.", | ||
"0077": "Laird Technologies ", | ||
"0078": "Nike, Inc. ", | ||
"0079": "lesswire AG ", | ||
"007a": "MStar Semiconductor, Inc. ", | ||
"007b": "Hanlynn Technologies ", | ||
"007c": "A & R Cambridge ", | ||
"007d": "Seers Technology Co. Ltd ", | ||
"007e": "Sports Tracking Technologies Ltd. ", | ||
"007f": "Autonet Mobile ", | ||
"0080": "DeLorme Publishing Company, Inc. ", | ||
"0081": "WuXi Vimicro ", | ||
"0082": "Sennheiser Communications A/S ", | ||
"0083": "TimeKeeping Systems, Inc. ", | ||
"0084": "Ludus Helsinki Ltd. ", | ||
"0085": "BlueRadios, Inc. ", | ||
"0086": "equinox AG ", | ||
"0087": "Garmin International, Inc. ", | ||
"0088": "Ecotest ", | ||
"0089": "GN ReSound A/S ", | ||
"008a": "Jawbone ", | ||
"008b": "Topcorn Positioning Systems, LLC ", | ||
"0078": "Nike, Inc.", | ||
"0079": "lesswire AG", | ||
"007a": "MStar Semiconductor, Inc.", | ||
"007b": "Hanlynn Technologies", | ||
"007c": "A & R Cambridge", | ||
"007d": "Seers Technology Co. Ltd", | ||
"007e": "Sports Tracking Technologies Ltd.", | ||
"007f": "Autonet Mobile", | ||
"0080": "DeLorme Publishing Company, Inc.", | ||
"0081": "WuXi Vimicro", | ||
"0082": "Sennheiser Communications A/S", | ||
"0083": "TimeKeeping Systems, Inc.", | ||
"0084": "Ludus Helsinki Ltd.", | ||
"0085": "BlueRadios, Inc.", | ||
"0086": "equinox AG", | ||
"0087": "Garmin International, Inc.", | ||
"0088": "Ecotest", | ||
"0089": "GN ReSound A/S", | ||
"008a": "Jawbone", | ||
"008b": "Topcorn Positioning Systems, LLC", | ||
"008c": "Gimbal Inc. (formerly Qualcomm Labs, Inc. and Qualcomm Retail Solutions, Inc.)", | ||
"008d": "Zscan Software ", | ||
"008e": "Quintic Corp. ", | ||
"008f": "Stollman E+V GmbH ", | ||
"0090": "Funai Electric Co., Ltd. ", | ||
"0091": "Advanced PANMOBIL Systems GmbH & Co. KG ", | ||
"0092": "ThinkOptics, Inc. ", | ||
"0093": "Universal Electronics, Inc. ", | ||
"0094": "Airoha Technology Corp. ", | ||
"0095": "NEC Lighting, Ltd. ", | ||
"0096": "ODM Technology, Inc. ", | ||
"008d": "Zscan Software", | ||
"008e": "Quintic Corp.", | ||
"008f": "Stollman E+V GmbH", | ||
"0090": "Funai Electric Co., Ltd.", | ||
"0091": "Advanced PANMOBIL Systems GmbH & Co. KG", | ||
"0092": "ThinkOptics, Inc.", | ||
"0093": "Universal Electronics, Inc.", | ||
"0094": "Airoha Technology Corp.", | ||
"0095": "NEC Lighting, Ltd.", | ||
"0096": "ODM Technology, Inc.", | ||
"0097": "ConnecteDevice Ltd.", | ||
"0098": "zer01.tv GmbH ", | ||
"0099": "i.Tech Dynamic Global Distribution Ltd. ", | ||
"009a": "Alpwise ", | ||
"009b": "Jiangsu Toppower Automotive Electronics Co., Ltd. ", | ||
"009c": "Colorfy, Inc. ", | ||
"009d": "Geoforce Inc. ", | ||
"009e": "Bose Corporation ", | ||
"009f": "Suunto Oy ", | ||
"00a0": "Kensington Computer Products Group ", | ||
"00a1": "SR-Medizinelektronik ", | ||
"0098": "zer01.tv GmbH", | ||
"0099": "i.Tech Dynamic Global Distribution Ltd.", | ||
"009a": "Alpwise", | ||
"009b": "Jiangsu Toppower Automotive Electronics Co., Ltd.", | ||
"009c": "Colorfy, Inc.", | ||
"009d": "Geoforce Inc.", | ||
"009e": "Bose Corporation", | ||
"009f": "Suunto Oy", | ||
"00a0": "Kensington Computer Products Group", | ||
"00a1": "SR-Medizinelektronik", | ||
"00a2": "Vertu Corporation Limited", | ||
@@ -173,66 +173,66 @@ "00a3": "Meta Watch Ltd.", | ||
"00a6": "Panda Ocean Inc.", | ||
"00a7": " Visteon Corporation", | ||
"00a7": "Visteon Corporation", | ||
"00a8": "ARP Devices Limited", | ||
"00a9": "Magneti Marelli S.p.A", | ||
"00aa": "CAEN RFID srl ", | ||
"00aa": "CAEN RFID srl", | ||
"00ab": "Ingenieur-Systemgruppe Zahn GmbH", | ||
"00ac": "Green Throttle Games ", | ||
"00ac": "Green Throttle Games", | ||
"00ad": "Peter Systemtechnik GmbH", | ||
"00ae": "Omegawave Oy", | ||
"00af": "Cinetix", | ||
"00b0": "Passif Semiconductor Corp ", | ||
"00b1": "Saris Cycling Group, Inc ", | ||
"00b0": "Passif Semiconductor Corp", | ||
"00b1": "Saris Cycling Group, Inc", | ||
"00b2": "Bekey A/S", | ||
"00b3": " Clarinox Technologies Pty. Ltd. ", | ||
"00b4": " BDE Technology Co., Ltd. ", | ||
"00b5": " Swirl Networks ", | ||
"00b6": " Meso international", | ||
"00b7": " TreLab Ltd ", | ||
"00b8": " Qualcomm Innovation Center, Inc. (QuIC) ", | ||
"00b9": " Johnson Controls, Inc.", | ||
"00bA": " Starkey Laboratories Inc.", | ||
"00bb": " S-Power Electronics Limited", | ||
"00bc": " Ace Sensor Inc", | ||
"00bd": " Aplix Corporation", | ||
"00be": " AAMP of America", | ||
"00bf": " Stalmart Technology Limited", | ||
"00c0": " AMICCOM Electronics Corporation", | ||
"00c1": " Shenzhen Excelsecu Data Technology Co.,Ltd", | ||
"00c2": " Geneq Inc.", | ||
"00c3": " adidas AG", | ||
"00c4": " LG Electronics", | ||
"00c5": " Onset Computer Corporation", | ||
"00c6": " Selfly BV", | ||
"00c7": " Quuppa Oy.", | ||
"00c8": " GeLo Inc", | ||
"00c9": " Evluma", | ||
"00ca": " MC10", | ||
"00cb": " Binauric SE", | ||
"00cc": " Beats Electronics", | ||
"00cd": " Microchip Technology Inc.", | ||
"00ce": " Elgato Systems GmbH ", | ||
"00cf": " ARCHOS SA ", | ||
"00d0": " Dexcom, Inc. ", | ||
"00d1": " Polar Electro Europe B.V.", | ||
"00d2": " Dialog Semiconductor B.V.", | ||
"00d3": " Taixingbang Technology (HK) Co,. LTD.", | ||
"00d4": " Kawantech", | ||
"00d5": " Austco Communication Systems ", | ||
"00d6": " Timex Group USA, Inc. ", | ||
"00d7": " Qualcomm Technologies, Inc. ", | ||
"00d8": " Qualcomm Connected Experiences, Inc. ", | ||
"00d9": " Voyetra Turtle Beach", | ||
"00da": " txtr GmbH", | ||
"00db": " Biosentronics ", | ||
"00dc": " Procter & Gamble", | ||
"00dd": " Hosiden Corporation ", | ||
"00de": " Muzik LLC ", | ||
"00df": " Misfit Wearables Corp", | ||
"00e0": " Google", | ||
"00e1": " Danlers Ltd", | ||
"00e2": " Semilink Inc", | ||
"00e3": " inMusic Brands, Inc", | ||
"00e4": " L.S. Research Inc. ", | ||
"00e5": " Eden Software Consultants Ltd. ", | ||
"00e6": " Freshtemp ", | ||
"00b3": "Clarinox Technologies Pty. Ltd.", | ||
"00b4": "BDE Technology Co., Ltd.", | ||
"00b5": "Swirl Networks", | ||
"00b6": "Meso international", | ||
"00b7": "TreLab Ltd", | ||
"00b8": "Qualcomm Innovation Center, Inc. (QuIC)", | ||
"00b9": "Johnson Controls, Inc.", | ||
"00bA": "Starkey Laboratories Inc.", | ||
"00bb": "S-Power Electronics Limited", | ||
"00bc": "Ace Sensor Inc", | ||
"00bd": "Aplix Corporation", | ||
"00be": "AAMP of America", | ||
"00bf": "Stalmart Technology Limited", | ||
"00c0": "AMICCOM Electronics Corporation", | ||
"00c1": "Shenzhen Excelsecu Data Technology Co.,Ltd", | ||
"00c2": "Geneq Inc.", | ||
"00c3": "adidas AG", | ||
"00c4": "LG Electronics", | ||
"00c5": "Onset Computer Corporation", | ||
"00c6": "Selfly BV", | ||
"00c7": "Quuppa Oy.", | ||
"00c8": "GeLo Inc", | ||
"00c9": "Evluma", | ||
"00ca": "MC10", | ||
"00cb": "Binauric SE", | ||
"00cc": "Beats Electronics", | ||
"00cd": "Microchip Technology Inc.", | ||
"00ce": "Elgato Systems GmbH", | ||
"00cf": "ARCHOS SA", | ||
"00d0": "Dexcom, Inc.", | ||
"00d1": "Polar Electro Europe B.V.", | ||
"00d2": "Dialog Semiconductor B.V.", | ||
"00d3": "Taixingbang Technology (HK) Co,. LTD.", | ||
"00d4": "Kawantech", | ||
"00d5": "Austco Communication Systems", | ||
"00d6": "Timex Group USA, Inc.", | ||
"00d7": "Qualcomm Technologies, Inc.", | ||
"00d8": "Qualcomm Connected Experiences, Inc.", | ||
"00d9": "Voyetra Turtle Beach", | ||
"00da": "txtr GmbH", | ||
"00db": "Biosentronics", | ||
"00dc": "Procter & Gamble", | ||
"00dd": "Hosiden Corporation", | ||
"00de": "Muzik LLC", | ||
"00df": "Misfit Wearables Corp", | ||
"00e0": "Google", | ||
"00e1": "Danlers Ltd", | ||
"00e2": "Semilink Inc", | ||
"00e3": "inMusic Brands, Inc", | ||
"00e4": "L.S. Research Inc.", | ||
"00e5": "Eden Software Consultants Ltd.", | ||
"00e6": "Freshtemp", | ||
"00e7": "KS Technologies", | ||
@@ -259,3 +259,3 @@ "00e8": "ACTS Technologies", | ||
"00fb": "KOUKAAM a.s.", | ||
"00fc": " Delphi Corporation", | ||
"00fc": "Delphi Corporation", | ||
"00fd": "ValenceTech Limited", | ||
@@ -324,3 +324,3 @@ "00fe": "Reserved", | ||
"013b": "Allegion", | ||
"013c": "Murata Manufacuring Co., Ltd. ", | ||
"013c": "Murata Manufacuring Co., Ltd.", | ||
"013e": "Nod, Inc.", | ||
@@ -503,3 +503,3 @@ "013f": "B&B Manufacturing Company", | ||
"01ee": "Valeo Service", | ||
"01ef": "Fullpower Technologies, Inc. ", | ||
"01ef": "Fullpower Technologies, Inc.", | ||
"01f0": "KloudNation", | ||
@@ -514,4 +514,4 @@ "01f1": "Zebra Technologies Corporation", | ||
"01f8": "Anyka (Guangzhou) Microelectronics Technology Co, LTD", | ||
"01f9": "Medtronic, Inc. ", | ||
"01fa": "Gozio, Inc. ", | ||
"01f9": "Medtronic, Inc.", | ||
"01fa": "Gozio, Inc.", | ||
"01fb": "Form Lifting, LLC", | ||
@@ -521,3 +521,3 @@ "01fc": "Wahoo Fitness, LLC", | ||
"01fe": "Radio System Corporation", | ||
"01ff": "Freescale Semiconductor, Inc. ", | ||
"01ff": "Freescale Semiconductor, Inc.", | ||
"0200": "Verifone Systems PTe Ltd. Taiwan Branch", | ||
@@ -533,3 +533,3 @@ "0201": "AR Timing", | ||
"0209": "InvisionHeart Inc.", | ||
"020a": "Macnica Inc. ", | ||
"020a": "Macnica Inc.", | ||
"020b": "Jaguar Land Rover Limited", | ||
@@ -574,8 +574,8 @@ "020c": "CoroWare Technologies, Inc", | ||
"0231": "ETA SA", | ||
"0232": " x-Senso Solutions Kft", | ||
"0233": " Shenzhen SuLong Communication Ltd", | ||
"0234": " FengFan (BeiJing) Technology Co, Ltd", | ||
"0235": " Qrio Inc", | ||
"0236": " Pitpatpet Ltd", | ||
"0237": " MSHeli s.r.l.", | ||
"0232": "x-Senso Solutions Kft", | ||
"0233": "Shenzhen SuLong Communication Ltd", | ||
"0234": "FengFan (BeiJing) Technology Co, Ltd", | ||
"0235": "Qrio Inc", | ||
"0236": "Pitpatpet Ltd", | ||
"0237": "MSHeli s.r.l.", | ||
"0238": "Trakm8 Ltd", | ||
@@ -582,0 +582,0 @@ "0239": "JIN CO, Ltd", |
@@ -21,3 +21,3 @@ var companyNames = { | ||
"feed": "Tile, Inc.", | ||
"feec": "Tile, Inc. ", | ||
"feec": "Tile, Inc.", | ||
"feeb": "Swirl Networks, Inc.", | ||
@@ -39,3 +39,3 @@ "feea": "Swirl Networks, Inc.", | ||
"fee1": "Anhui Huami Information Technology Co.", | ||
"fee0": "Anhui Huami Information Technology Co. ", | ||
"fee0": "Anhui Huami Information Technology Co.", | ||
"fedf": "Design SHIFT", | ||
@@ -65,10 +65,10 @@ "fede": "Coin, Inc.", | ||
"fec4": "PLUS Location Systems", | ||
"fec3": "360fly, Inc. ", | ||
"fec2": "Blue Spark Technologies, Inc. ", | ||
"fec3": "360fly, Inc.", | ||
"fec2": "Blue Spark Technologies, Inc.", | ||
"fec1": "KDDI Corporation", | ||
"fec0": "KDDI Corporation", | ||
"febf": "Nod, Inc. ", | ||
"febf": "Nod, Inc.", | ||
"febe": "Bose Corporation", | ||
"febd": "Clover Network, Inc. ", | ||
"febc": "Dexcom, Inc. ", | ||
"febd": "Clover Network, Inc.", | ||
"febc": "Dexcom, Inc.", | ||
"febb": "adafruit industries", | ||
@@ -75,0 +75,0 @@ "feba": "Tencent Holdings Limited", |
@@ -44,3 +44,3 @@ /** | ||
// All other GATT Services | ||
// Standard Services | ||
else { | ||
@@ -50,3 +50,98 @@ | ||
switch(uuid) { | ||
// TODO: cases | ||
case('1800'): | ||
genericaccess.process(advertiserData); | ||
break; | ||
case('1801'): | ||
genericattribute.process(advertiserData); | ||
break; | ||
case('1802'): | ||
immediatealert.process(advertiserData); | ||
break; | ||
case('1803'): | ||
linkloss.process(advertiserData); | ||
break; | ||
case('1804'): | ||
txpower.process(advertiserData); | ||
break; | ||
case('1805'): | ||
currenttimeservice.process(advertiserData); | ||
break; | ||
case('1806'): | ||
referencetimeupdateservice.process(advertiserData); | ||
break; | ||
case('1807'): | ||
nextdstchangeservice.process(advertiserData); | ||
break; | ||
case('1808'): | ||
glucose.process(advertiserData); | ||
break; | ||
case('1809'): | ||
healththermometer.process(advertiserData); | ||
break; | ||
case('180a'): | ||
deviceinformation.process(advertiserData); | ||
break; | ||
case('180d'): | ||
heartrate.process(advertiserData); | ||
break; | ||
case('180e'): | ||
phonealertstatusservice.process(advertiserData); | ||
break; | ||
case('180f'): | ||
batteryservice.process(advertiserData); | ||
break; | ||
case('1810'): | ||
bloodpressure.process(advertiserData); | ||
break; | ||
case('1811'): | ||
alertnotificationservice.process(advertiserData); | ||
break; | ||
case('1812'): | ||
humaninterfacedevice.process(advertiserData); | ||
break; | ||
case('1813'): | ||
scanparameters.process(advertiserData); | ||
break; | ||
case('1814'): | ||
runningspeedandcadence.process(advertiserData); | ||
break; | ||
case('1815'): | ||
automationio.process(advertiserData); | ||
break; | ||
case('1816'): | ||
cyclingspeedandcadence.process(advertiserData); | ||
break; | ||
case('1818'): | ||
cyclingpower.process(advertiserData); | ||
break; | ||
case('1819'): | ||
locationandnavigation.process(advertiserData); | ||
break; | ||
case('181a'): | ||
environmentalsensing.process(advertiserData); | ||
break; | ||
case('181b'): | ||
bodycomposition.process(advertiserData); | ||
break; | ||
case('181c'): | ||
userdata.process(advertiserData); | ||
break; | ||
case('181d'): | ||
weightscale.process(advertiserData); | ||
break; | ||
case('181e'): | ||
bondmanagement.process(advertiserData); | ||
break; | ||
case('181f'): | ||
continousglucosemonitoring.process(advertiserData); | ||
break; | ||
case('1820'): | ||
internetprotocolsupport.process(advertiserData); | ||
break; | ||
case('1821'): | ||
indoorpositioning.process(advertiserData); | ||
break; | ||
case('1822'): | ||
pulseoximeter.process(advertiserData); | ||
break; | ||
default: | ||
@@ -53,0 +148,0 @@ } |
@@ -76,3 +76,3 @@ /** | ||
case '10': | ||
eddystone.type = 'URI'; | ||
eddystone.type = 'URL'; | ||
eddystone.txPower = pdu.convertTxPower(data.substr(2,2)); | ||
@@ -87,6 +87,11 @@ eddystone.url = parseSchemePrefix(data.substr(4,2)); | ||
eddystone.version = data.substr(2,2); | ||
eddystone.batteryVoltage = data.substr(4,4); | ||
eddystone.temperature = data.substr(8,4); | ||
eddystone.advertisingCount = data.substr(12,8); | ||
eddystone.uptime = data.substr(20,8); | ||
eddystone.batteryVoltage = parseInt(data.substr(4,4),16) + 'mV'; | ||
// TODO: export 8:8 fixed point representation interpreter to pdu | ||
eddystone.temperature = parseInt(data.substr(8,4),16); | ||
if(eddystone.temperature > 0x7fff) { | ||
eddystone.temperature = 0x7fff - eddystone.temperature; | ||
} | ||
eddystone.temperature = (eddystone.temperature / 256) + 'C'; | ||
eddystone.advertisingCount = parseInt(data.substr(12,8),16); | ||
eddystone.uptime = (parseInt(data.substr(20,8),16) / 10) + 's'; | ||
break; | ||
@@ -93,0 +98,0 @@ } |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"engines": { | ||
@@ -16,0 +16,0 @@ "node": "^0.10.0" |
213
README.md
@@ -8,3 +8,5 @@ advlib | ||
For a live, interactive version of advlib visit [reelyactive.github.io/advlib](http://reelyactive.github.io/advlib/). | ||
Installation | ||
@@ -57,3 +59,3 @@ ------------ | ||
* [Address](#address) | ||
* [Data](#data-generic-access-profile) | ||
* [Data (GAP)](#data-generic-access-profile) | ||
* [Flags](#flags) | ||
@@ -68,3 +70,3 @@ * [UUID](#uuid) | ||
* [Generic Data](#generic-data) | ||
* [Data](#data-generic-attribute-profile) | ||
* [Data (GATT)](#data-generic-attribute-profile) | ||
* [Member Services](#member-services) | ||
@@ -377,7 +379,3 @@ * [Standard Services](#standard-services) | ||
manufacturerSpecificData: { | ||
iBeacon: { | ||
txPower: "127dBm" | ||
} | ||
} | ||
txPower: "127dBm" | ||
@@ -458,10 +456,15 @@ | ||
Which would add the following property to advData: | ||
Which would add the following properties to advData: | ||
serviceData: { | ||
uuid : "180a", | ||
data : "1204eb150000" | ||
data : "1204eb150000", | ||
specificationName: "Device Information" | ||
} | ||
In this case, the service UUID represents one of the GATT [Standard Services](#standard-services) and is processed as such. | ||
Additional examples for service UUIDs among the GATT [Member Services](#member-services) are given in that section below. | ||
### Data (Generic Attribute Profile) | ||
@@ -482,3 +485,3 @@ | ||
Based on the UUID, the serviceData will be parsed as either a member service or a standard service, as applicable. Note that not all services are yet implemented. | ||
Based on the UUID, the serviceData will be parsed as either a [member service](#member-services) or a [standard service](#standard-services), as applicable. Note that not all services are yet implemented. | ||
@@ -498,9 +501,195 @@ | ||
Supports Eddystone and the UriBeacon of the Physical Web. More documentation to come... | ||
Supports Eddystone ([UID](#eddystone-uid), [URL](#eddystone-url) & [TLM](#eddystone-tlm)) and the [UriBeacon](#uribeacon) of the Physical Web. | ||
###### UriBeacon | ||
Process UriBeacon data (UUID = 0xfed8). | ||
advlib.ble.data.gatt.services.members.process(advData); | ||
This is best illustrated with an example using the following input: | ||
advData: { | ||
serviceData: { | ||
uuid: "fed8", | ||
data: "00f2027265656c7961637469766507" | ||
} | ||
} | ||
For reference, the example serviceData.data is interpreted as follows, based on the [UriBeacon Advertising Packet Specification](https://github.com/google/uribeacon/blob/uribeacon-final/specification/AdvertisingMode.md): | ||
| Byte(s) | Hex String | Description | | ||
|--------:|:-------------------------|:------------------------------| | ||
| 0 | 00 | UriBeacon flags | | ||
| 1 | f2 | UriBeacon TxPower level | | ||
| 3 | 02 | Uri Scheme Prefix (http://) | | ||
| 4-15 | 7265656c7961637469766507 | Encoded Uri (reelyactive.com) | | ||
Which would add the following properties to advData: | ||
serviceData: { | ||
uuid: "fed8", | ||
data: "00f2027265656c7961637469766507", | ||
companyName: "Google", | ||
uriBeacon: { | ||
invisibleHint: false, | ||
txPower: "-14dBm", | ||
url: "http://reelyactive.com" | ||
} | ||
} | ||
###### Eddystone-UID | ||
Process Eddystone-UID data (UUID = 0xfeaa). | ||
advlib.ble.data.gatt.services.members.process(advData); | ||
This is best illustrated with an example using the following input: | ||
advData: { | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "00128b0ca750095477cb3e770011223344550000" | ||
} | ||
} | ||
For reference, the example serviceData.data is interpreted as follows, based on the [Eddystone-UID specification](https://github.com/google/eddystone/tree/master/eddystone-uid): | ||
| Byte(s) | Hex String | Description | | ||
|--------:|:---------------------|:------------------------------| | ||
| 0 | 00 | Eddystone-UID Frame Type | | ||
| 1 | 12 | Calibrated TxPower at 0m | | ||
| 2-11 | 8b0ca750095477cb3e77 | 10-byte ID Namespace | | ||
| 12-17 | 001122334455 | 6-byte ID Instance | | ||
| 18-19 | 0000 | Reserved for Future Use | | ||
Which would add the following properties to advData: | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "00128b0ca750095477cb3e770011223344550000", | ||
eddystone: { | ||
type: "UID", | ||
txPower: "18dBm", | ||
uid: { | ||
namespace: "8b0ca750095477cb3e77", | ||
instance: "001122334455" | ||
} | ||
} | ||
} | ||
###### Eddystone-URL | ||
Process Eddystone-URL data (UUID = 0xfeaa). | ||
advlib.ble.data.gatt.services.members.process(advData); | ||
This is best illustrated with an example using the following input: | ||
advData: { | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "1012027265656c7961637469766507" | ||
} | ||
} | ||
For reference, the example serviceData.data is interpreted as follows, based on the [Eddystone-URL specification](https://github.com/google/eddystone/tree/master/eddystone-url): | ||
| Byte(s) | Hex String | Description | | ||
|--------:|:-------------------------|:------------------------------| | ||
| 0 | 10 | Eddystone-URL Frame Type | | ||
| 1 | 12 | Calibrated TxPower at 0m | | ||
| 2 | 02 | URL Scheme (http://) | | ||
| 3-14 | 7265656c7961637469766507 | Encoded URL (reelyactive.com) | | ||
Which would add the following properties to advData: | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "1012027265656c7961637469766507", | ||
eddystone: { | ||
type: "URL", | ||
txPower: "18dBm", | ||
url: "http://reelyactive.com" | ||
} | ||
} | ||
###### Eddystone-TLM | ||
Process Eddystone-TLM data (UUID = 0xfeaa). | ||
advlib.ble.data.gatt.services.members.process(advData); | ||
This is best illustrated with an example using the following input: | ||
advData: { | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "20000bb81800000000010000000a" | ||
} | ||
} | ||
For reference, the example serviceData.data is interpreted as follows, based on the [Eddystone-TLM specification](https://github.com/google/eddystone/tree/master/eddystone-tlm): | ||
| Byte(s) | Hex String | Description | | ||
|--------:|:-------------------------|:------------------------------| | ||
| 0 | 20 | Eddystone-TLM Frame Type | | ||
| 1 | 00 | TLM Version | | ||
| 2-3 | 0bb8 | Battery Voltage (mV) | | ||
| 4-5 | 1800 | Temperature (8:8 fixed point) | | ||
| 6-9 | 00000001 | Advertising PDU Count | | ||
| 10-13 | 0000000a | Uptime (0.1s resolution) | | ||
Which would add the following properties to advData: | ||
serviceData: { | ||
uuid: 'feaa', | ||
data: '20000bb81800000000010000000a', | ||
eddystone: { | ||
type: "TLM", | ||
version: "00", | ||
batteryVoltage: "3000mV", | ||
temperature: "24C", | ||
advertisingCount: 1, | ||
uptime: "1s" | ||
} | ||
} | ||
#### Standard Services | ||
Soon to be implemented... | ||
The following GATT Services, assigned in the [GATT Specification](https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx) are identified but not parsed: | ||
- Alert Notification Service | ||
- Automation IO | ||
- Battery Service | ||
- Blood Pressure | ||
- Body Composition | ||
- Bond Management | ||
- Continous Glucose Monitoring | ||
- Current Time Service | ||
- Cycling Power | ||
- Cycling Speed and Cadence | ||
- Device Information | ||
- Environmental Sensing | ||
- Generic Access | ||
- Generic Attribute | ||
- Glucose | ||
- Health Thermometer | ||
- Heart Rate | ||
- Human Interface Device | ||
- Immediate Alert | ||
- Indoor Positioning | ||
- Internet Protocol Support | ||
- Link Loss | ||
- Location and Navigation | ||
- Next DST Change Service | ||
- Phone Alert Status Service | ||
- Pulse Oximeter | ||
- Reference Time Update Service | ||
- Running Speed and Cadence | ||
- Scan Parameters | ||
- TX Power | ||
- User Data | ||
- Weight Scale | ||
@@ -507,0 +696,0 @@ reelyActive RFID Library |
@@ -1,2 +0,1 @@ | ||
/** | ||
@@ -10,2 +9,3 @@ * Copyright reelyActive 2015 | ||
// Constants for the scenario | ||
@@ -16,3 +16,3 @@ var CURSOR = 0; | ||
// Inputs for the scenario | ||
var INPUT_DATA = '09160a181204eb150000'; | ||
var INPUT_DATA = '09164c001204eb150000'; | ||
var INPUT_DATA_COMPANY_NAME = '1216d8fe00f2027265656c7961637469766507'; | ||
@@ -22,11 +22,21 @@ | ||
var EXPECTED_DATA = { | ||
uuid: "180a", | ||
data: "1204eb150000", | ||
serviceData: { | ||
uuid: "004c", | ||
data: "1204eb150000" | ||
} | ||
}; | ||
var EXPECTED_DATA_COMPANY_NAME = { | ||
uuid: "fed8", | ||
data: "00f2027265656c7961637469766507", | ||
companyName: "Google" | ||
} | ||
serviceData: { | ||
uuid: "fed8", | ||
data: "00f2027265656c7961637469766507", | ||
companyName: "Google", | ||
uriBeacon: { | ||
invisibleHint: false, | ||
txPower: "-14dBm", | ||
url: "http://reelyactive.com" | ||
} | ||
} | ||
}; | ||
describe('ble data servicedata', function() { | ||
@@ -36,9 +46,12 @@ | ||
it('should parse BLE advertiser data service data', function() { | ||
servicedata.process(INPUT_DATA, CURSOR, ADVERTISER_DATA); | ||
assert.deepEqual(ADVERTISER_DATA.serviceData, EXPECTED_DATA); | ||
var advertiserData = {}; | ||
servicedata.process(INPUT_DATA, CURSOR, advertiserData); | ||
assert.deepEqual(advertiserData, EXPECTED_DATA); | ||
}); | ||
it('should parse BLE advertiser data service data with companyName', function() { | ||
servicedata.process(INPUT_DATA, CURSOR, ADVERTISER_DATA); | ||
assert.deepEqual(ADVERTISER_DATA.serviceData, EXPECTED_DATA); | ||
it('should parse BLE advertiser data service data with companyName', | ||
function() { | ||
var advertiserData = {}; | ||
servicedata.process(INPUT_DATA_COMPANY_NAME, CURSOR, advertiserData); | ||
assert.deepEqual(advertiserData, EXPECTED_DATA_COMPANY_NAME); | ||
}); | ||
}); |
@@ -14,16 +14,24 @@ /** | ||
var INPUT_DATA_URIBEACON = { | ||
serviceData: { uuid: "fed8", | ||
data: "00f2027265656c7961637469766507" } | ||
serviceData: { | ||
uuid: "fed8", | ||
data: "00f2027265656c7961637469766507" | ||
} | ||
}; | ||
var INPUT_DATA_EDDYSTONE_UID = { | ||
serviceData: { uuid: "feaa", | ||
data: "00128b0ca750095477cb3e77001122334455" } | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "00128b0ca750095477cb3e770011223344550000" | ||
} | ||
}; | ||
var INPUT_DATA_EDDYSTONE_URL = { | ||
serviceData: { uuid: "feaa", | ||
data: "1012027265656c7961637469766507" } | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "1012027265656c7961637469766507" | ||
} | ||
}; | ||
var INPUT_DATA_EDDYSTONE_TLM = { | ||
serviceData: { uuid: "feaa", | ||
data: "2000000080000000000000000000" } | ||
serviceData: { | ||
uuid: "feaa", | ||
data: "20000bb81800000000010000000a" | ||
} | ||
}; | ||
@@ -46,3 +54,3 @@ | ||
uuid: "feaa", | ||
data: "00128b0ca750095477cb3e77001122334455", | ||
data: "00128b0ca750095477cb3e770011223344550000", | ||
eddystone: { | ||
@@ -63,3 +71,3 @@ type: "UID", | ||
eddystone: { | ||
type: "URI", | ||
type: "URL", | ||
txPower: "18dBm", | ||
@@ -73,10 +81,10 @@ url: "http://reelyactive.com" | ||
uuid: 'feaa', | ||
data: '2000000080000000000000000000', | ||
data: '20000bb81800000000010000000a', | ||
eddystone: { | ||
type: "TLM", | ||
version: "00", | ||
batteryVoltage: "0000", | ||
temperature: "8000", | ||
advertisingCount: "00000000", | ||
uptime: "00000000" | ||
batteryVoltage: "3000mV", | ||
temperature: "24C", | ||
advertisingCount: 1, | ||
uptime: "1s" | ||
} | ||
@@ -83,0 +91,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
207597
121
3779
721
32