Serial

Contents

This plugin provides functions for working with Serial connections

https://github.com/xseignard/cordovarduino

Stuck on a Cordova issue?

Installation

Community Enterprise
ionic cordova plugin add cordovarduino npm install @ionic-native/serial
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic activate-native-ee --key=YOURPRODUCTKEY ionic integrations add @ionic-native/serial

Supported Platforms

  • Android
  • Ubuntu

Usage

import { Serial } from '@ionic-native/serial/ngx';

constructor(private serial: Serial) { }

...

this.serial.requestPermission().then(() => {
  this.serial.open({
    baudRate: 9800,
    dataBits: 4,
    stopBits: 1,
    parity: 0,
    dtr: true,
    rts: true,
    sleepOnPause: false
  }).then(() => {
    console.log('Serial connection opened');
  });
}).catch((error: any) => console.log(error));