sandeepmistry / node-bleacon

A Node.js library for creating, discovering, and configuring iBeacons
MIT License
498 stars 88 forks source link

Manufacturer data may be larger #21

Closed Scapal closed 9 years ago

Scapal commented 9 years ago

Manufacturer data may contain additional info like battery level. Size should be at least 25, not strictly 25. easiBeacon for example does this:

04 3E 2B 02 01 03 01 CE 11 AD 42 85 F7 1F 02 01 04 1B FF 4C 00 02 15 A7 AE 2E B7 1F 00 41 68 B9 9B A7 49 BA C1 CA 64 00 01 00 01 BB 4E B9

sandeepmistry commented 9 years ago

@Scapal can you clarify the advertisement data for the easiBeacon?

I'm unclear on the break down:

04 3E 2B 02 01 03 01 CE 11 AD 42 85 F7 1F - ???

02 
01 - flags
04 

1B 
FF - manufacturer data
  4C 00 - company id
  02 - iBeacon type
  15 - iBeacon data length
  A7 AE 2E B7 1F 00 41 68 B9 9B A7 49 BA C1 CA 64 - uuid
  00 01 - major
  00 01 - minor
  BB - measuredRSSI @ 1m
  4E  - battery level ???

B9 -???

Pull requests looks good otherwise.

Scapal commented 9 years ago
1B - manufacturer data size ( mostly 1A but here 1B)
FF - manufacturer data
  4C 00 - company id
  02 - iBeacon type
  15 - iBeacon data length
      A7 AE 2E B7 1F 00 41 68 B9 9B A7 49 BA C1 CA 64 - uuid
      00 01 - major
      00 01 - minor
      BB - measuredRSSI @ 1m
  4E  - battery level
B9 - CRC