Advertise Manufaturer Data On IOS Devices

问题点: IOS设备对BLE peripheral端发送广播的支持,似乎不允许进行Manufaturer定制广播(central端接受是可以的)。如何在IOS设备上进行Manufaturer Data的广播?

1.  官网对cbperipheral.startAdvertising(_:)描述:

An optional dictionary containing the data you want to advertise. The possible keys of anadvertisementDatadictionary are detailed inCBCentralManagerDelegate. That said, only two of the keys are supported for peripheral manager objects:CBAdvertisementDataLocalNameKeyandCBAdvertisementDataServiceUUIDsKey.

是不可以指定CBAdvertisementDataManufacturerDataKey关键字的。

2. central设备discover扫描到的数据:

centralManager didDiscover

name: nil

UUID: EC2FB599-DCBC-4954-89CB-D579D8DB762A

advertisementData: ["kCBAdvDataIsConnectable": 1, "kCBAdvDataManufacturerData": <0000c0ff 08b31500 0016aba2 699500bf 55343483 60>]

RSSI: -83

central可以扫描出peripheral广播的Manfacturer Data

3. IOS提供的iBeacon是以Manafacturer Data形式向外广播信息

kCBAdvDataAppleBeaconKey =<........>;

用peripheral.strartAdvertising广播CLBeaconRegion应该可以实现广播Manufacturer Data


DataFormat:

1A # AD Structure の長さ(bytes)

FF # AD type

4C 00 # Company identifier code (0x004C は Apple を示す)

02 # Byte 0 of iBeacon advertisement indicator

15 # Byte 1 of iBeacon advertisement indicator

XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX # iBeacon の proximity uuid

XX XX # major

XX XX # minor

XX # Tx Power

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 在写这个博客之前,空余时间抽看了近一个月的文档和Demo,系统给的解释很详细,接口也比较实用,唯独有一点,对于设备...
    木易林1阅读 3,433评论 3 4
  • 本文转自:http://blog.csdn.net/swibyn/article/details/52096646...
    idiot_lin阅读 7,541评论 14 22
  • 上篇文章发出后,有姑娘在微信留言希望我详细写一写良好沟通的方式。在这里,就分享下我过去踩过的坑和吸收到的不错意见。...
    Jane何简单阅读 938评论 0 3
  • 1.偶阵雨。 周六送女儿上钢琴课时下起雨来,五分钟后就停了。 白色车身被点缀上斑点狗一样的斑驳痕迹,像一朵顽皮走丢...
    高小花0218阅读 203评论 0 1
  • 今天,膝盖头儿有点痒痒,点水姑娘穿了条破破洞洞的牛仔裤,顺着膝盖儿的破洞洞,我将手伸了进去,用力的挠...
    点水姑娘阅读 425评论 0 1