Not sure if its 100% would work, because I have not tried it, but you can try with ionic native serial
In the section where it says
console.log('Serial connection opened');
You can then type
this.serial.write('whatever');
I have not tried it, but do let me know the results.