我一直在寻找所有这三个操作平台所需的蓝牙连接参数.我正在使用此项目的HOGP(Bluetooth over HID GATT)配置文件.
我的项目是一个由我自己编写的带有BLE模块的嵌入式系统,我可以控制以下连接参数.
我要连接的目标设备将满足Android> = 4.3,iOS7和> = Win 8.1的连接.
Apple非常友好地在下面的链接中提供了第22页上带有相应参数的文档.我无法找到有关Android和Win 8的任何信息.
https://developer.apple.com/hardwaredrivers/bluetoothdesignguidelines.pdf
我目前的iOS7工作设置完全测试与免费软件lightBlue的双向通信如下.我的iOS7嵌入式代码和主机软件可以使用.
我从另一个堆栈溢出页面发现,据称android可以通过以下链接在7.5ms连接间隔上工作.
不幸的是苹果iOS规范的第二个要求是"IntervalMin≥20ms".
我不理解这些范围或如何解释它们?如果我将Interval min设置为7.5ms for Android不会使苹果要求无效吗?如果可能,我如何满足两个系统和Win8?
我的理解是从设备在最小值和最大值之间提供建议设置,并且主设备(智能手机)警告用户该范围内的实际选定值.
我对这个问题的任何帮助表示感谢,并希望这篇文章能够让其他人考虑到BLE相当新的和不完整的知识基础.
提前致谢!
android bluetooth bluetooth-lowenergy android-bluetooth ios7
我一直在尝试将函数指针数组传递给函数.一旦进入该函数,我需要一个指向该函数指针数组的指针,但我一直收到错误.当它不是函数参数时,我能够做到这一点.
void (*(*PointerToFuncPtrArray)[2])(unsigned char data[], unsigned char length);
void (*FuncPtr[2])(unsigned char data[], unsigned char length) = {
func1,
func2,
}
void NotArguement(void) // attempt to point to without passing as parameter
{
PointerToFuncPtrArray = &FuncP; // this works
}
// attempt to pass as argument
void AsArguement((void (*ptr[])(unsigned char data[], unsigned char length))
{
PointerToFuncPtrArray = &ptr; // This throws error
}
Run Code Online (Sandbox Code Playgroud)
这引发了......
Error 1 error C2440: '=' : cannot convert from 'void (__cdecl **[])(unsigned char [],unsigned char)' to 'void …Run Code Online (Sandbox Code Playgroud) 我有一个表示USB设备终端的表单,它给了我一些错误.在调试了没有已知源的奇怪错误半天之后,我以某种方式发现终端在实例化但未显示时不起作用.当我更改代码并添加usbTerminal.Show();时,它可以正常工作.
USBTerminal usbTouchTerminal;
public MainForm()
{
InitializeComponent();
USBSettings usbTouchSettings = new USBSettings();
usbTouchTerminal = new USBTerminal(usbTouchSettings); //Create Terminal with settings
usbTouchTerminal.StartUSB();
usbTouchTerminal.Show(); //works ONLY when show is here
}
Run Code Online (Sandbox Code Playgroud)
这怎么可能,为什么?我做了大量的搜索,我的代码都不依赖于我的终端或主窗体上的.Visible属性?
我完全不知道为什么某些表格如果没有显示就行不通.MSDN或谷歌也不是真正的帮助.我确信它在实例化时会正常运行但未显示.
PS.我补充道
usbTerminal.Show();
usbTerminal.Hide();
Run Code Online (Sandbox Code Playgroud)
并且终端功能正常.
感谢您的任何帮助!
编辑:
我还应该注意,这个usbTerminal使用WndProc覆盖.我不是那方面的专家,但我觉得它可能与它有关.
我应该注意这是LibUSBdotnet
public class USBSettings
{
/// <summary>
/// This is the Vender ID Number. (0x0B6A)
/// </summary>
public ushort VID { get; set; }
/// <summary>
/// This is the Product ID Number. (0x5346)
/// </summary>
public ushort PID { get; set; …Run Code Online (Sandbox Code Playgroud)