Since you are not getting the timeout errors from your read thread, there 
is definitely something wrong with your UART initilization.  And since you 
need to kill your program with Ctr-C, your read thread would seem to be 
running and blocking main() in the pthread_join().

Have you read through this guide:
https://www.cmrr.umn.edu/~strupp/serial.html

While your device is not a modem, odds are you want to talk to it as if it 
were, but instead of using  "AT commands" your device will have its own 
command-response protocol for your program to implement.

The suggestion to use separate programs communicating by shared memory 
protected by a named semaphore is viable but should not be necessary.  But 
I often first write a thread function as main() in a stand alone program 
and move it into a thread function once I've got it basically working.

On Monday, July 25, 2016 at 10:32:09 PM UTC-5, Regina Choi wrote:
>
> Thanks for reply.  
>
> I'm not sure why, but I don't get timeout error messages from the read 
> thread (though I have set it to 1 sec) !? It just freeze there waiting for 
> UART input, even though there are UART input coming in. 
>
> Yes, I got the Byte sent message printf from TX thread. Please see the 
> attachement. 
>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/bb75c710-440f-4c48-b24c-faaaad622af0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to