I have installed serialport module for node.js using npm.(npm install serialport
).
Now I would like to send some messages from my android phone
Why, yes, it's certainly doable. There's a plenty of examples listed at the serialport package homepage itself.
Your node.js application will start with...
var SerialPort = require("serialport").SerialPort
var serialPort = new SerialPort("/dev/tty-usbserial1");
serialPort.on('data', function(data) { /* processing data */ });