小编Mat*_*att的帖子

iOS Central with BlueZ Peripheral disconnect due to insufficient auth

In our system, we have a BLE Peripheral (in this example, running on RPi4) using BlueZ 5.50.

We have an iOS app that connects to this Peripheral as a Central.

This connection can be seen in btmon, all looks ok:

> HCI Event: LE Meta Event (0x3e) plen 31                                                                                                                                                                             #189 [hci0] 1157.975252
      LE Enhanced Connection Complete (0x0a)
        Status: Success (0x00)
        Handle: 1
        Role: Slave (0x01)
        Peer address type: Random (0x01)
        Peer address: 51:A3:4E:3C:B5:D6 (Resolvable)
        Local resolvable private address: 00:00:00:00:00:00 …
Run Code Online (Sandbox Code Playgroud)

ios bluetooth-lowenergy bluez

6
推荐指数
1
解决办法
1686
查看次数

C#:需要我的一个类来触发另一个类中的事件来更新文本框

总共n00b到C#和事件虽然我已经编程了一段时间.

我有一个包含文本框的类.此类创建从串行端口接收帧的通信管理器类的实例.我这一切都很好.

每次接收到一个帧并提取其数据时,我想要一个方法在我的类中使用文本框运行,以便将此帧数据附加到文本框中.

所以,没有发布我的所有代码,我有我的表单类...

public partial class Form1 : Form
{
    CommManager comm;

    public Form1()
    {
        InitializeComponent();
        comm = new CommManager();

    }

    private void updateTextBox()
    {
        //get new values and update textbox
    }
    .
    .
    .
Run Code Online (Sandbox Code Playgroud)

我有我的CommManager课程

class CommManager 
{
     //here we manage the comms, recieve the data and parse the frame
}
Run Code Online (Sandbox Code Playgroud)

所以......基本上,当我解析那个框架时,我需要从表单类中运行updateTextBox方法.我猜这是可能的事件,但我似乎无法让它工作.

我在创建CommManager实例后尝试在表单类中添加一个事件处理程序,如下所示...

 comm = new CommManager();
 comm.framePopulated += new EventHandler(updateTextBox);
Run Code Online (Sandbox Code Playgroud)

...但我必须做错了,因为编译器不喜欢它...

有任何想法吗?!

c# events event-handling

5
推荐指数
1
解决办法
1万
查看次数

Qt应用程序挂起100%CPU

我有一个在Windows XP上运行的简单Qt程序 - 它只是一个数据记录程序.它读取在串行端口上发送给它的任何数据,然后将其推送到GUI并将其记录到文本文件中.

问题是,如果我运行程序一小时(大致,有时更多)它会挂断我.GUI锁定,程序停止记录.在我的任务管理器的性能选项卡上的CPU监视器上,当发生此崩溃时,我的一个核心始终直接达到100%并保持在那里直到我关闭挂起的应用程序.

我几乎没有诊断这样的问题的经验 - 有没有人有任何关于从哪里开始的提示?

c++ qt

2
推荐指数
1
解决办法
946
查看次数

标签 统计

bluetooth-lowenergy ×1

bluez ×1

c# ×1

c++ ×1

event-handling ×1

events ×1

ios ×1

qt ×1