窗10蓝牙广告API [英] Windows 10 Bluetooth Advertisement API
本文介绍了窗10蓝牙广告API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能使用AdvertisementPublisher发送信标行事时一个主要的和次要的ID,是不是也可以使用一个AdvertisementWatcher发送和接收的ID?
Is it possible to use an AdvertisementPublisher to send a major and minor ID when acting as a beacon, and is it also possible to use an AdvertisementWatcher to send and receive the ID?
干杯
推荐答案
是的,这做派:
var manufacturerData = new BluetoothLEManufacturerData();
manufacturerData.CompanyId = 0x004c;
byte[] dataArray = new byte[] {
// last 2 bytes of Apple's iBeacon
0x02, 0x15,
// Proximity UUID
0x44, 0x50, 0x3f, 0x1b,
0xc0, 0x9c, 0x4a, 0xee,
0x97, 0x2f, 0x75, 0x0e,
0x9d, 0x34, 0x67, 0x84,
// Major
0x00, 0x01,
// Minor
0x00, 0x10,
// TX power
0xc5
};
// using System.Runtime.InteropServices.WindowsRuntime;
manufacturerData.Data = dataArray.AsBuffer();
BluetoothLEAdvertisementPublisher publisher =
new BluetoothLEAdvertisementPublisher();
publisher.Advertisement.ManufacturerData.Add(manufacturerData);
publisher.Start();
要接受,转到<一个href=\"http://stackoverflow.com/questions/31505227/can-i-read-an-iphone-beacon-with-windows-devices-bluetooth-advertisement-bluetoo\">this问题。
这篇关于窗10蓝牙广告API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文