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

Devices that require password pairing cannot be paired successfully. #14

Open
tenutos opened this issue Aug 18, 2019 · 1 comment
Open

Comments

@tenutos
Copy link

tenutos commented Aug 18, 2019

I can successfully pair with the correct password 0000 in the Bluetooth settings of Android.
But it cannot be paired with rx_ble.
Except for this, other ble devices can be paired normally.

@yiguozhen0510
Copy link

可以尝试一下这种方式:

//发现服务
Future discoverChars() async {
final value = await RxBle.discoverChars(deviceId);
if (!mounted) return null;
setState(() {
chars = value;
});
//发现服务之后,设置连接密码
// RxBle.observeChar(deviceId, '0783b03e-8535-b5a0-7140-a304d2495cb8');

RxBle.writeChar(deviceId, '0783b03e-8535-b5a0-7140-a304d2495cba', RxBle.stringToChar('AB12'));
RxBle.observeChar(deviceId, '0783b03e-8535-b5a0-7140-a304d2495cb8')
print('发现服务之后,设置连接密码');

return JsonEncoder.withIndent(" " * 2).convert(chars);
}

@tenutos tenutos changed the title 需要密码配对的设备无法配对成功。 Devices that require password pairing cannot be paired successfully. Mar 5, 2021
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