LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 01-15-2009, 05:36 AM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Rep: Reputation: 17
sending control-Z to serial port


hello every body
I wrote a program for my serial port for acting like minicom (but very simple) and I wanted to communicate to a gprs modem that I connected it to my serial port. every thing is good and I can send any command and receive its answer and action except control-Z and that is neccesery for me to sending sms via gprs modem, first of all I ignored SIGTSTP in my program for preventing it to stop but it does not work then I wrote function to send 26 (I think code of control+Z)to serial port that it does not work again.
what can I do
please help me.

this is the signal handler and my fuction in my program:
signal(SIGTSTP,ctrlz);

void ctrlz()
{
char ch[2]="26";
SerialOpen( port);
SerialSetSpeed( port, speed);
SerialWrite( port, &ch, 2);
}
 
Old 01-15-2009, 06:49 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
1 members found this post helpful.
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sending control-Z to serial port golden_boy615 Linux - Embedded & Single-board computer 1 01-21-2009 05:42 PM
Sending files over serial port. Fadoksi Linux - General 2 08-01-2007 09:36 AM
Sending and receiving data to through Serial Port kalyan.penujeevi Programming 1 08-07-2006 08:55 AM
serial port (ttyS1) - Sending commands via terminal... HELP!!! Nalorin Linux - Networking 2 08-21-2005 11:22 PM
shell script: sending data through the serial port funkymunky Programming 2 06-10-2004 12:47 AM


All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration