>>> I am using ts-7260 and I wanna connect a device via COM2. As it did not
>>> work, I made some tests on the COM2 and saw that:
>>> If I enable getty on ttyAM1 in inittab, I can successfully send data
>>> over COM2. I tried "echo hello > /dev/ttyAM1" and saw the the text on
>>> the other end. But if i comment out getty on ttyAM1 in inittab, the text
>>> cannot be sent over COM2 anymore.
>>> Could someone help me to explain why? FYI, JP4 was not connected. Thank
>>> you very much.
>>
>> One possibility is that getty will set the baud rate for you. If you
>> boot the board without a getty process, I am not sure what baud rate the
>> serial port is initialised to. It's likely to be 115200, though.
>>
>> I have used getty purely to set a baud rate on some occasions, as getty
>> does not restore the previous settings when it exits, which was a useful
>> side effect.
>
> I also doubted at the baud rate. But after i set the baud rate using
> setserial with baud_base 115200, some garbage text appeared on another
> end. It seemed that the speed of 115200 did not match although it is same
> as the value I used with getty. Do you have any idea?
You have to set the interface up, for the serial connection you require.
That is what getty does. There is more than the baud rate.
setserial can do some things, otherwise you need to program it.
There are countless example programs and FAQs out there that show how to
program the Linux serial interface, it is the same as on any other linux
system - google is your friend. It is also a FAQ here so searching the
group for stuff on serial use should help too. In fact, in the gzipped tar
file I sent you re. an adc program, there is example rs232 source code!
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|