LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2013, 09:53 PM   #1
narke
Member
 
Registered: Apr 2010
Posts: 197

Rep: Reputation: 5
A Software LED showing serial tx/rx activities


Hi,

In a Linux GUI application, I want to implement a software LED which by blinking can show the serial ports tx/rx activities. What's the suggested method of receiving these events from OS?

I am using C/GTK+ on 3.1.x kernel.

Thanks in advance.
 
Old 09-27-2013, 02:37 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
Okay, since no one else has answered;

Based on what I've read about serial programming on a *nix based system, it doesn't seem likely that you can get a true, real-time, signal on the software side. I suspect that the best way would be to simulate the bit-stream using a pseudo-random sequence.
The Tx and Rx L.E.D.s found on embedded boards are physically connected to the lines they represent. However, there is no feedback of these lines to the OS as far as I know. (and if there is, it's probably implemented differently on different hardware.)

Here are some links to resources that may help you to determine when, in the program you're writing, you should start and stop the 'blinking' of the L.E.D.s
http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/
http://en.wikibooks.org/wiki/Serial_...g/Serial_Linux
http://stackoverflow.com/questions/6...rial-port-in-c
 
  


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
Raspberry pi red LED on solidly with flashing green led. darkstarbyte Linux - Hardware 19 01-05-2013 06:54 PM
disable DVD-drive access LED via software? Cazed Linux - Hardware 3 06-08-2009 08:12 AM
Hard drive led showing constant activity when not in use 0p3r4 Linux - Hardware 8 07-21-2006 03:55 PM
Hardware to drive LED Meter along with Linux software dvlmn666 Linux - Hardware 0 07-22-2004 04:17 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:50 AM.

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