Tag: bluetooth

Windows Phone 8.1中的信标 – 没有可能吗?

首先,是的,我已经阅读了所有其他类似的问题。 其次,我正在开发app(WP 8.1 WinRT),它必须使用Beacons。 我读了很多关于它的信息,我知道,如果没有先配对它,通常无法与BLE设备连接。 但希望终于死了,所以我想询问我的任何可能性。 可以在代码中配对设备(根据我读过的文章 – 不是,但也许有人知道的方式)? 或者只是获取附近的Beacons Id或Name,或者有关它们的任何信息? 我发现的所有post都已过时(从去年开始,也许MS或某人发布了一些更新/ api?)我搜索任何类型的解决方案,api或只是想法如何避免配对问题。 手动配对不起作用 – 1.不确定是否可以配对信标,2。它太多了(我需要的信标)我无论如何都要寻找通信甚至获取信标。 我会很感激任何选择或想法

获取蓝牙设备的地址

我正在尝试编写一个应用程序来获取范围内的任何蓝牙设备的地址,没有配对或任何传输,只需要所有地址。 有什么建议从哪里开始? 非常感谢 ..

以编程方式获取传入/传出COM蓝牙端口。如何在C#中的Windows Mobile 6 App中执行此操作?

我想通过蓝牙打印机从Windows移动应用程序打印。我正在做的是硬编码COM端口如下… SerialPort comPort1 = new SerialPort(“COM5”, 57600, Parity.None, 8, StopBits.One); comPort1.Open(); //Some thing to pint //comPort1.WriteLine(“PRINT”); System.Threading.Thread.Sleep(500); comPort1.Close(); 它不是正确的方式,我想搜索应用程序可用的蓝牙打印机并与之连接。另外显示正确的错误消息[“找不到蓝牙设备/所选设备不是打印机”]。 请帮我发现这个,任何人都可以指导我这样做吗?

FromBluetoothAddressAsync IAsyncOperation不包含“GetAwaiter”错误的定义

我正在研究一个简单的流行语。 我一直在提到这段代码 我在视觉工作室2017工作。 我的核心代码如下: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Windows.Threading; using Windows.Devices.Bluetooth.Advertisement; using Windows.Devices.Bluetooth; using Windows.Devices; using Windows.Foundation; using Windows; namespace WindowsFormsApp2 { public partial class Form1 : Form { private BluetoothLEAdvertisementWatcher watcher; public Form1() { InitializeComponent(); watcher = new BluetoothLEAdvertisementWatcher(); […]

通过蓝牙从winRT发送文件到android / WP设备

我正在开发一个Windows商店应用程序,并试图通过蓝牙发送文件到Android(和Windows Phone)设备。 根据MSDN的一个例子,我编写了以下代码: public async static void SendAsync(StorageFile file) { var id = RfcommDeviceService.GetDeviceSelector(RfcommServiceId.ObexObjectPush); var devices = await DeviceInformation.FindAllAsync(id); // -> Returns one windows phone and two android devices if (devices.Count > 0) { // Use the 3th device (android tablet) var service = await RfcommDeviceService.FromIdAsync(devices[2].Id); // Create a socket and connect to the target […]

Symbol.WPAN.Bluetooth传输数据的示例

我正在尝试使用符号设备的EMDK附带的Symbol.WPAN.Bluetooth。 有没有人碰巧有一个传输数据的工作示例? Symbol的示例只是将设备配对。 (他们显然认为在个人区域网络示例中并不真正需要传输数据。) 无论如何,我知道这是一个很长的镜头,但如果有人让这个工作,我很乐意看到一些代码。 这就是我的尝试。 我有一个设备按下按钮1和另一个设备按下按钮2。 读取值始终为零长度字节数组。 using System.Text; using System.Windows.Forms; using Symbol.WPAN; using Symbol.WPAN.Bluetooth; namespace SmartDeviceProject1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Bluetooth bluetooth = new Bluetooth(); if (bluetooth.IsEnabled != true) { bluetooth.Enable(); bluetooth.RadioMode = BTH_RADIO_MODE.BTH_DISCOVERABLE_AND_CONNECTABLE; } RemoteDevice connectedDevice […]

确定串行端口是正常的COM还是SPP

我正在寻找一种方法来确定COM是标准COM还是SPP COM,也称为COM设备的电缆替换蓝牙适配器。 我有一个可以在USB(COM – > USB)和蓝牙中工作的设备,蓝牙接口可以与SPP配合使用。 我目前正在使用System.IO.Ports.SerialPort.GetPortNames()来获取COM。 有没有办法确定它是否与蓝牙或USB连接? 解: System.Management.ManagementObjectSearcher Searcher = new System.Management.ManagementObjectSearcher(“Select * from WIN32_SerialPort”); foreach (System.Management.ManagementObject Port in Searcher.Get()) { foreach (System.Management.PropertyData Property in Port.Properties) { Console.WriteLine(Property.Name + ” ” + (Property.Value == null ? null : Property.Value.ToString())); } } 输出类似于: Availability 2 Binary True Capabilities CapabilityDescriptions Caption Standard Serial over Bluetooth […]

从bluetoothdevice获取错误的串口名称(c#)

要从系统中获取所有可用的串行端口,请使用以下命令。 SerialPort.GetPortNames 它适用于主板串口,但使用蓝牙设备我得到了错误的端口名。 例如:有时COM70或COM7ö代替COM7。 它总是1个字母。 任何建议? PS:我在Windows 7 PPS中使用最新的Visual Studio Express:切断最后一个字母的脏黑客不起作用,因为我不知道哪一个是蓝牙串口(有各种蓝牙键或设备,它改变了数量尝试各种棍子后,我到达COM10,ergo COM100或COM10f 编辑:我正在使用的代码。 阅读regestry,但仍然是同样的问题。 RegistryKey myRegistry = Registry.LocalMachine.OpenSubKey(“Hardware\\DeviceMap\\SerialComm”); foreach (string valuename in myRegistry.GetValueNames()) { if (myRegistry.GetValue(valuename) is String) { if (valuename.Contains(“BthModem”)) { richTextBox1.AppendText(“>” + myRegistry.GetValue(valuename) + “<" + Environment.NewLine); } } } 通常,第二个或第三个请求正在使用类似的结果 COM11ᯋ<COM10S <COM11 <COM10 <COM11 <COM10 < 怎么可能?

通过c#中的设备名称获取蓝牙设备的COM端口

我在C#中编写了一些代码来获取COM端口,其中映射了具有特定名称的蓝牙设备。 我尝试了几个与此处列出的解决方案类似的解决方案,但是没有一个解决方案我可以访问蓝牙设置窗口中的名称,如下图所示: 如果它在那个窗口,我肯定有办法找到它。 有帮助吗? 非常感谢

C#控制台应用程序通过蓝牙与Arduino交谈

除了这个不起作用之外,在这里说的不多,我不知道为什么。 Arduino上的串行输出什么都没有。 C#代码的输出结果是等待响应然后什么都没有。 当我启动C#程序时,Arduino上的蓝牙卡LED变为绿色,因此正在建立连接。 别无其他。 Arduino代码 #include //Software Serial Port #define RxD 8 // This is the pin that the Bluetooth (BT_TX) will transmit to the Arduino (RxD) #define TxD 7 // This is the pin that the Bluetooth (BT_RX) will receive from the Arduino (TxD) SoftwareSerial blueToothSerial(RxD,TxD); boolean light = false; void setup(){ Serial.begin(9600); […]