Writing to the serial port by creating a symlink

Hi

I am disabling serial port of BBXM once my booting is over. By commenting the line

#S:2345:respawn:/sbin/getty 115200 ttyO2

Now I have a script for writing onto the serial port. I have kept this script in /etc/init.d and created a symlink in rc5.d and rc3.d.

The content of the script file is:

#!/bin/bash

while true
do
echo “Writing to Serial port” > /dev/ttyO2
done

But once my booting is over, my minicom is not receiving anything from the board.

Whats the problem in this procedure??

Thanks!

Hi

I am disabling serial port of BBXM once my booting is over. By commenting
the line

#S:2345:respawn:/sbin/getty 115200 ttyO2

Now I have a script for writing onto the serial port. I have kept this
script in /etc/init.d and created a symlink in rc5.d and rc3.d.

The content of the script file is:

#!/bin/bash

while true
do
echo "Writing to Serial port" > /dev/ttyO2
done

But once my booting is over, my minicom is not receiving anything from the
board.

Whats the problem in this procedure??

Not sure, but you might want to run 'stty' to make sure your serial
port is in the desired mode.

I tried adding this line before I write to the serial port.

stty -f /dev/ttyO2 115200

Still not receiving anything in minicom.

Is the symbolic link creation right? I am doing the following for creating a symlink:

  1. Saved the shellscript writeserial.sh in /etc/init.d

  2. For creating a symlink, I created a S75writeserial.sh using

ln -s /etc/init.d/writeserial.sh S75writeserial.sh

Also I tried creating in rc3.d too.

Hi I did the same procedure again. But this time instead of taking the SD card out and putting it to pc. I directly went to my vi editor disabled the serial port, then made an initscript in /etc/init.d and created a symlink in rc5.d and now it is working fine.

I couldnt understand why it was not working before.

Anyways thank you Jason