Thread: serial communication through linux c

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    1

    serial communication through linux c

    Hi,

    Urgent!!!
    I'm currently a Full-Time student, having my Final-Year Project. Who seeking help regards on the above mentioned Title.

    Tasks:
    PC(1) opens Hyperterminal, input some text to transmit (Transmitter, Tx) to...
    PC(2) through a Null Modem Cable which opens linux c with a program to receive (Receiver,Rx) what the HyperTerminal input text that has been transmitted...

    How can this be done?
    After further research made, Terminals with the same communication setting must set under the same bps, data bits, parity, stop bits and flow control.

    But I seeking help on how to write a programm in linux c(full source code)?
    As I'm new linux c.

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Strange - almost exactly the same wording as this older thread.

    I don't know much Linux, but I've done serial port communication in Windows.

    There's a library linked on this thread, though I just found it now and never used it, so I can't tell you if it's any good. The point is, there is a lot of information out there if you just search.

    [edit]

    (full source code)
    It's not very likely you'll get someone to write the entire code for you. Please review the homework policy of these forums.
    Last edited by Matticus; 01-18-2013 at 07:27 AM.

  3. #3
    Stoned Witch Barney McGrew's Avatar
    Join Date
    Oct 2012
    Location
    astaylea
    Posts
    420
    You can't magically open “linux c” which will open a program to receive the data, when you receive data through the modem cable. It seems like you need to be running a program that will listen for data on the modem cable. This is usually done with Unix-like systems by calling socket followed by read, so you might want to look at both of those functions.

    But I seeking help on how to write a programm in linux c(full source code)?
    Consider getting a text editor. I like Vim, but there are many others as well.

  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    200
    See this.
    Programming and other random guff: cat /dev/thoughts > blogspot.com (previously prognix.blogspot.com)

    ~~~

    "The largest-scale pattern in the history of Unix is this: when and where Unix has adhered most closely to open-source practices, it has prospered. Attempts to proprietarize it have invariably resulted in stagnation and decline."

    Eric Raymond, The Art of Unix Programming

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Serial Communication in C++
    By NewGuy100 in forum C++ Programming
    Replies: 8
    Last Post: 04-24-2006, 01:56 PM
  2. Serial Communication Help
    By NewGuy100 in forum C Programming
    Replies: 4
    Last Post: 07-28-2005, 09:15 AM
  3. serial communication
    By hick.hack in forum C++ Programming
    Replies: 1
    Last Post: 02-13-2003, 12:18 PM
  4. Need some help with Serial Communication
    By vsriharsha in forum C Programming
    Replies: 1
    Last Post: 02-25-2002, 09:11 AM
  5. Serial Communication
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 01-17-2002, 08:36 AM