com1 getch() problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > com1 getch() problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    com1 getch() problem  
one2001boy@yahoo.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-19-06 06:31 AM

Hello,

I use 'getch' to read the input from stdin, it seems not to work via
serial port using null-modem cable, is 'getch' not compatibal with the
serial port( com1) or some special settings needs to be set?

thanks





[ Post a follow-up to this message ]



    Re: com1 getch() problem  
Thomas Dickey


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-19-06 12:32 PM

one2001boy@yahoo.com <one2001boy@yahoo.com> wrote:
> Hello,

> I use 'getch' to read the input from stdin, it seems not to work via
> serial port using null-modem cable, is 'getch' not compatibal with the
> serial port( com1) or some special settings needs to be set?

You probably intended getchar().
getch() is used for screen-oriented applications.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net





[ Post a follow-up to this message ]



    Re: com1 getch() problem  
one2001boy@yahoo.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-20-06 12:24 PM

Thomas Dickey wrote:


> 
>
> 
>
>
> You probably intended getchar().
> getch() is used for screen-oriented applications.
>
thanks so much for your help.

I realized the problem is more related to ioctl() function.
I tried to write my own terminal for com1,
/sbin/agetty is used as a terminal service and ioctl() functions
returns correctly, but the col and row size is zero.

did I miss something?  thanks.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:51 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register