How to get serial console data while still using busybox features?

Cory WX Xie CoryXie at pek.destiny.com.cn
Tue Jun 13 20:07:02 PDT 2006


Hi, ALL,
     
     Maybe my question is confusion,but please let me expalin it in
detail:

    I have a S3C2410 based Linux box which has been set up with two UART
port,
/dev/ttyS0 and /dev/ttyS1.The /dev/ttyS0 is used as debug console,and
busybox
is working on this port to receive commands from the host PC;The
/dev/ttyS1 is 
connected to a GSM Modem to send and receive Short Message by a SMS 
program I wrote.All things are OK when working in this mode.
    But now we need to connect /dev/ttyS0,the debug serial console, to
a 80C51 MCU serial port,and the 80C51 will send commands by this port to
control
the SMS program,thus I need to receive the commands from
/dev/ttyS0,however,
the commands will contain values equal to '\0','\n',\t' etc,thus I don't
want to use scanf()
 because it will require the 80C51 to send more blank space to format
the string.
     So I tried to use read(STDIN_FILENO,...) ,but the busybox seems to
be 
in chage of read(STDIN_FILENO,...),thus i can't get any data.

I want to know something:
1)If I need to keep the busybox features,when I sometimes connect the
/dev/ttyS0 to the 
PC host again,I can still use the cp,rm,etc,how can I bypass the busybox
read(STDIN_FILENO,...)?
2)If I should add my SMS into busybox,not by suing the shell,how can I
do it?

Actually,what I need is how to get all the raw  commands data under
busybox environment?

Thanks in advance!

Cory


More information about the busybox mailing list