![Example Example](/uploads/1/2/5/6/125621256/141020270.gif)
![C Rs232 Example C Rs232 Example](/uploads/1/2/5/6/125621256/210842101.png)
Hello, Can anyone share example of a RS232 interface code in C programming language?
The problem has been fixed!Apparently, the device was waiting for an end-line terminator, which was not available in char writebuffer = 'READ?' ;Therefore when it received such a command, the bus would 'hang' and in order for it to work again one would have to open the port again.This also explains why the echo 'READ?' /dev/ttyUSB0 command worked - since it automatically outputs an end-line terminator.I attach the working code below - thank you everyone for your commments and kind help!
When answering a question please:. Read the question carefully. Understand that English isn't everyone's first language so be lenient of badspelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, oredit the question and fix the problem. Insults are not welcome. Don't tell someone to read the manual.
Chances are they have and don't get it.Provide an answer or move on to the next question.Let's work to help developers, not make them feel stupid.