Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: MacApp程序第一次扫描到设备并且正常工作后,程序关闭后下次再打开可以不经过扫描直接连接设备吗? #234

Open
fy-create opened this issue May 11, 2021 · 1 comment

Comments

@fy-create
Copy link

Question:

MacApp程序第一次扫描到设备并且正常工作后,程序关闭后下次再打开可以不经过扫描直接连接设备吗?
直连需要有CBPeripheral * ,不经过扫描如何能得到这个对象呢?

Thanks

@Bluce-Zhang
Copy link

Bluce-Zhang commented Mar 17, 2022

可以连接 可以使用设备id创建蓝牙对象,然后连接 bleAddress就是设备的identifier

 CBPeripheral *peripheral = [babyBluetooth retrievePeripheralWithUUIDString:bleAddress];
        if (peripheral) {
            self.currPeripheral = peripheral;
        }
        //连接的方法
        babyBluetooth.having(self.currPeripheral).connectToPeripherals().begin();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants