1

我正在使用这个库在我的 iOS 和 Andriod 的本机应用程序中实现两个功能

特征

  1. 我试图在 react native 中使用 react-native-ble-plx 库查找/扫描三星 Galaxy Watch 和 Apple Watch。我能够使用我的 react native 应用程序检测到附近的其他 BLE 外围设备,但无法发现 Apple Watch 和三星 Galaxy 手表。是否可以通过使用 ble 的本机应用程序扫描三星 Galaxy 手表和 Apple Watch?

  2. 我还在通过开发一个 Tizen Watch 应用程序来开发其他解决方案,该应用程序将安装在 Galaxy 手表中,并开始使用 Tizen 中的 BLE GATT 配置文件从手表发送一些值,其中包含自定义服务和特性 UUID。是否可以在不知道其 UUID 的情况下通过 react-native-ble-plx 库在 react-native 中连接到三星手表?

我能够使用一些名为 BLE Scanner 、 nRF Connect 的应用程序检测到我的 Apple Watch,但不能从我使用 react-native-ble-plx 库的反应原生应用程序中检测到。可能是什么原因?

任何帮助是极大的赞赏。

谢谢。

编辑:使用扫描码更新:

 scanAndConnect() {
   console.log('Scanning Started');
   this.manager.startDeviceScan(null, null, (error, device) => {
     if (error) {
       Alert.alert(i18next.t('ble_alert_title'), error.message);
       return;
      }
     console.log(
       'Detected Device Details:',
       device?.id,
       device?.name,
       device?.localName,
  );
 }
4

0 回答 0