The problem is: I want to establish communication between my desktop and my android smart device.
I’m trying a simple step but I get “device not found” as return
this is where I base my coding: https://ionicframework.com/docs/native/serial/
this is the code:
import { Component, OnInit } from ‘@angular/core’; import { NavController } from ‘ionic-angular’; import {Serial} from ‘@ionic-native/serial’;
@Component({ selector: ‘page-home’, templateUrl: ‘home.html’ }) export class HomePage implements OnInit { public status:string;
constructor(public navCtrl: NavController, public serial:Serial) {}
ngOnInit(){
this.serial.requestPermission({vid:“04e8”,pid:“6860”,driver:“FtdiSerialDriver”})//I already have tried to omit the request options but got the same error .then(()=>{ this.status = “Permission requested”; //this would be the successfully result }).catch(error=>{ this.status = error.toString(); // it’s returning “device not found” }); } }
there are few content about this feature on web.