Problem writing to ttyO1

Hello all;

I seem to be having a problem writing to ttyO1.

Here is the really simple code and the result on the console:


var data

var serialPort, sp;

var serialPort = require(“serialport”).SerialPort;

var sp = new serialPort("/dev/ttyO1", { baudrate: 9600 });


console.log(“Hello World the Comm Port is Open”);


function sp_write(data){

sp.write(data,function(err, results) {

console.log('err ’ + err + ’ What happened? ’ + results);




function togglepin(){

// High and low parts of the frame length (not counting checksum)

sp_write("Hello Again):




And here is the console Output:

Error: Serialport not open. What happened? undefined

Hello World the Comm Port is Open

Anyone got any ideas ??


“No one could make a greater mistake than he who did nothing because he could do only a little.”

“All that is necessary for the triumph of evil is that good men do nothing” Edmond Burke (1729 - 1797)