Serial communication Linux - microcontroller


I try to get the Arduion side to comunicate with the linux side via serial.
I tried IdeinoIO and firmata, but it's not really what, all I need is to send some messages from one side to the other, not set pins and such.

So, now i try to keep it as simple as possible.

See code below.

Sending data to arduino is simple, but the problem is when i try to send something back.

The problem is that when i try to send something back to linux side, it will trigger the linux console.

Is there any way to disable the linux console on the serial port?


I found the answer right after I posted this, but I can't delete the post anymore.

commenting the ttyATH0::askfirst:/bin/ash --login line from /etc/inittab seems to do the job.

on the linux side

var serialport = require('serialport');
var portName = '/dev/ttyATH0';
var sp = new serialport.SerialPort(portName, {
    baudRate: 115200
                return console.log('error opening port :<', err.message);

        setInterval(function() { sp.write('hello?');


and on the arduino the multi serial example

void setup() {
  // initialize both serial ports:

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte =;

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte =;