Hi guys,
I'm currently working with a dedicated CentOS machine commanded/connected through the serial port to another Linux machine.
My scope is to develop a script in order to run sequentially some commands but I found some problem
Basically, to grab the data from the serial port, I developed a bash script that is, more or less (now I don't have the source code), like this:
Code:
#!/bin/sh
stty -f /dev/ttyS0 9600
while read ligne
do
echo $ligne
done < /dev/ttyS0
With this script I'm able to see everything except the grub menu items and the prompt!
I already know that, to enable the prompt and the grub menu, I have to setup the "init" (I found many resources on google that explain how to do that) and also the grub conf.
But the curious thing is that when I execute the command "
cat /dev/ttyS0"
everything is displayed!
Where is the trick?
I supposed that the bash script was not properly the right way to read and buffering the serial port and I also tried to develop a perl script....but I got the same result!
I was able to see the boot process but no the grub menu and the prompt command!
Help me guys!
Thank you!
P.S.
Moreover I have a proprietary Linux binary service tool that read and send data through the serial port to the CentOS machine. It works properly and I can see/send every data.
To run the tool I have to lunch like command:
Code:
./serialConnect -dev /dev/ttyS0
That's why I think that the CentOS serial configuration is properly done! The problem is elsewhere on the local machine!
Thank you