Read serial com port

Hey,

First of all I want to apologize for my basic knowledge. I’m a begginer.
I want to create an app for a professional device that runs under Android. This device has a barcode reader incorporated which I suppose is using an internal com port. Using an APK that I have found in internet (Android-Serial-Port API) I have detected that uses /dev/ttyMT1 (mtk-uart) port.
Could you help me how I can read the input data of this port?

Thanks in advance

1 Like

Were you able to get this working?

I think the Ionic forum is not realy the place-to-go to find answers for custom serial communication implementaions.
Anyways, I think you are looking in the wrong direction…

I’ve never done this particular application, but on a RaspPi I do these things sometimes.

If you would do a google search on “javascript access hardware” you will find

So node.js. is our go-to tool.
http://thinkingonthinking.com/serial-communication-with-nodejs/

You would need to have full control of the device though, to install node.js on your android.
http://www.goland.org/nodejsonandroid/

Try this approach and see if you can get it going…
Good luck

Not OP, but was also looking to implement serial communication on the Ionic Framework. I ended up using an existing Cordova Plugin, Cordovarduino.

1 Like

I didn’t know about it’s existence…
Great though, it may make my life easier to include ionic on my IoT devices.

Thanks for sharing!!

I have some problem. I want to read /dev/ttyMT1 (mtk-uart) port. In android device to serial port brodcast barcode data and another.

Thanks