Home IOS Development React native IOS – situation with bluetooth transmission on newer iphones

React native IOS – situation with bluetooth transmission on newer iphones

0
React native IOS – situation with bluetooth transmission on newer iphones

[ad_1]

I am creating ios react-native software which assist bluetooth. I exploit it to ship some instructions through react-native-ble-manager to exterior reader. Then reader draw one thing on display primarily based on despatched knowledge. Thus far I examined it with Iphone 6, IOS 14 and every part labored flawless. Sadly it isn’t a case for Iphone XR IOS 17.1.1. When it’s easy quick knowledge it really works alright however when it’s extra complicated command then knowledge despatched from Iphone XR then reader picture is distorted. Why?

My code for dealing with write:

doTransmitSequence(peripheral, commandSequence) {
    this.setState({ transferring: true });

    BleManager.retrieveServices(peripheral.id).then(() => {
      var service="xxxx-xxxx-xxxx-xxxx-xxxx";
      var attribute="xxxx-xxxx-xxxx-xxxx-xxxx";

      for (let i = 0; i < commandSequence.size; i++) {
        BleManager.write(peripheral.id, service, attribute, commandSequence[i], 247)
          .then(() => {
            this.setState({ transferring: false });
          })
          .catch(perform (error) {
            this.setState({ transferring: false });
            console.log('There was an issue together with your write operation: ' + error);
          });
      }
    });
  } 

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here