Windows 10 PC可以充当iBeacon吗?

问题描述 投票:0回答:1

我正在编写一个可在附近检测iBeacon的应用。我目前没有要测试的信标,只有一部手机可以运行该应用程序。一种想法是使用我的笔记本电脑作为信标。

我的笔记本电脑具有蓝牙功能。Windows 10专业版

enter image description here

我该怎么做?

android windows bluetooth ibeacon
1个回答
0
投票

您可以使用免费的开放源代码Windows Beacon Library在Windows 10上传输iBeacon。这是使用该库执行此操作的C#代码:

using Altbeacon;
using Altbeacon.Beacon;

BeaconTransmitter = new BeaconTransmitter(new 
BeaconParser().SetBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));
Beacon beacon = new Beacon.Builder()
    .SetTxPower(-59)
    .SetManufacturer(0x004c)
    .SetId1("2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6" /* proximity uuid */)
    .SetId2("1" /* major */)
    .SetId3("1" /* minor */).Build();
BeaconTransmitter.StartAdvertising(beacon);
© www.soinside.com 2019 - 2024. All rights reserved.