Thread: Duplex communication thro serial port

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    2

    Duplex communication thro serial port

    Hi,

    I am writing an application on a Beagleboard (running Ubuntu) which reads sound samples from a microphone (using ALSA APIs), compresses them and writes it to the serial port to a radio (which broadcasts it). For duplex communication, i need to receive the data from the radio (by reading from the serial port), uncompress it and send it to the speaker (again through ALSA APIs). The problem here is that the whole operation is performed in a loop. I am writing byte by byte into the port and sending it to the radio. However the radio writes 80 bytes as and when it receives a packet and there is no synchronization between the two devices. Effectively i am unable to read any data from the serial port. Can anyone suggest a better method of implementation ?

    Thanks in advance,
    Priya.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Duplex communication thro serial port
    By Priyachu in forum Networking/Device Communication
    Replies: 1
    Last Post: 05-30-2009, 04:24 AM
  2. Serial port Communication
    By vin_pll in forum C++ Programming
    Replies: 23
    Last Post: 01-07-2009, 09:32 AM
  3. Serial Port Communication
    By maxorator in forum C++ Programming
    Replies: 11
    Last Post: 04-27-2006, 03:13 PM
  4. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 04:59 PM
  5. Need help or info about serial port communication
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 01-08-2002, 01:48 PM

Tags for this Thread