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

cannot connect with the device. #6

Open
ahoirg opened this issue May 4, 2021 · 1 comment
Open

cannot connect with the device. #6

ahoirg opened this issue May 4, 2021 · 1 comment

Comments

@ahoirg
Copy link

ahoirg commented May 4, 2021

The reader and the mobile device are connected by Bluetooth. It cannot be paired with the device and application on rfid.init() . There is no pairing sound from the device. I can see the logs in the console. I did not get an error.

export default class RfidScan extends Component {
  rfid = new RFIDScanner();

  onRfidResult = (tags) => {
    console.info(' TAGS: ' + JSON.stringify(tags));
  };

  componentDidMount() {

    console.info("componentDidMountBeforeInit");
    
    this.rfid.init();

    console.info("componentDidMountAfterInit");
 
    this.rfid.on(RFIDScannerEvent.TAGS, this.onRfidResult);

    console.info("componentDidMountAfterOn");

  }

  componentWillUnmount(){
    console.info("BeforeShutDown");
    this.rfid.shutdown();
    console.info("AfterShutDown");
  }

  render() {return(<View style={{flex:1}}></View>); }
}
@viliammojsky
Copy link

The reader and the mobile device are connected by Bluetooth. It cannot be paired with the device and application on rfid.init() . There is no pairing sound from the device. I can see the logs in the console. I did not get an error.

export default class RfidScan extends Component {
  rfid = new RFIDScanner();

  onRfidResult = (tags) => {
    console.info(' TAGS: ' + JSON.stringify(tags));
  };

  componentDidMount() {

    console.info("componentDidMountBeforeInit");
    
    this.rfid.init();

    console.info("componentDidMountAfterInit");
 
    this.rfid.on(RFIDScannerEvent.TAGS, this.onRfidResult);

    console.info("componentDidMountAfterOn");

  }

  componentWillUnmount(){
    console.info("BeforeShutDown");
    this.rfid.shutdown();
    console.info("AfterShutDown");
  }

  render() {return(<View style={{flex:1}}></View>); }
}

Hi, have you found any solution to this?

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