am using Ionic 3 (Angular) and I want to achieve serial communication with my android device and computer. For that, I am using @ionic-native/serial and cordovarduino. I followed the step which is mentioned in there documentation and github page. I am getting an error like “device not found” and “plugin_not_installed” in the console while it is not throwing any error in the terminal.
I am using OTG wire and two port USB port wire for mobile and computer connection. Here is the list of questions which I need help for.
-
Why am I facing device not found and plugin_not_installed error though I have installed plugin and dependencies?
-
Why am I not able to establish a serial connection between the computer and an android device. Is it mandatory to use serial adapter wire for connectivity?
-
Please help me with steps and approaches we can use. Somewhere I might be wrong.
Expectation: To achieve serial connectivity between computer and android device.
Code:
abc() {
/* serial connect */
this.serial.requestPermission({
vid: '0bb4',
pid: '0005',
driver: 'CdcAcmSerialDriver' // or any other
}).then((data) => {
console.log(data);
}).catch((error) => {
console.log(error); // error --> device not found / sometimes error --> plugin_not_installed
})
}
ngOnInit() {
this.abc();
}
Ionic Info:
Ionic:
Ionic CLI : 5.4.5
Ionic Framework : ionic-angular 3.3.0
@ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 6.3.0
Cordova Plugins : no whitelisted plugins (24 plugins total)
Utility:
cordova-res : not installed
native-run : 0.2.9
System:
NodeJS : v8.16.2
npm : 6.4.1
The app is working fine but the only issue is I am not able to established serial connection. Please help. Thank You