LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2007, 11:30 PM   #1
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Rep: Reputation: 15
Serial port issue...


Hi all,

I am connecting GPS module to my PXA255 board through serial port.
Everything works fine. The procedure i made it work is..


1) Open the Minicom in host.
2) Run the command,

./GPS
3) Then remove the serial cable connected b/w the board and pc. And connect the GPS module.(I have only one serial port)

4) I can receive data from the gps..By setting all the initial serial port parameters in my GPS program.

The procedure goes well. But with the same procedure if i run

./GPS & --> when i run the program in background.

The program hangs with out any reason.

Now, there is a need for me to run the program with in the board as an application and i wrote script and connected to window manager...

The same GPS program when run from inside the board it is not able to read from the serial port. But it sends data...

I think when we run as a application in board it is executed as background??

Why i can not read from serial port when i run the same program in background?? or within the board (without using minicom)??

Will some one help me in solving this issue..
 
Old 11-29-2007, 03:47 AM   #2
ramesh6056
Member
 
Registered: May 2007
Posts: 89

Original Poster
Rep: Reputation: 15
Hi all,

I tried a simple serial program which will read from the serial port. I cross-compiled this program and put on the PXA255 board. As i have already told, when start the program in minicom,

./program

everything goes fine..

But when i start it like this

./program&

The program hangs. And now in my own program it hangs at

tcsetattr(fd, TCSANOW, &portconfig);

It is waiting and waiting for writing the new termios structure..
But is not getting succedded... and finally hangs..

Any one faced this problem??
 
  


Reply



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
linux serial port to router console port connection? frankie_fix Linux - General 3 02-26-2007 09:32 PM
Parallel Port & Serial Port device identification helpmeforlinux Linux - Hardware 3 01-02-2007 01:15 AM
timedia 4 port serial port i/o card configuration binu_edl Linux - Hardware 0 03-09-2006 09:39 AM
Using serial port card(PCMCIA) with IPAQ running Linux, can't find ttyS0 port d2army Linux - Laptop and Netbook 0 11-12-2005 08:07 PM
Serial Port issue w0und3d Mandriva 10 03-22-2005 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:59 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
Open Source Consulting | Domain Registration