Raspberry Pi UART Communication with Flow Control

Job ID: 34954242

Budget: $250 – $750 CAD

Refer to attachment Gate Circuit Diagram.JPG

I have two raspberry PI's connected to each other through the UART. There is a gate circuit in between the two RPI's. The purpose of the gate circuit is to pull the GPIO pins LOW during periods of no data transmission (this is necessary to protect an amplifier not shown in the circuit diagram and not hooked up for the purposes of this project). The attached uart_tx_V3.c program pulls the GPIO pin (pin 24) HIGH which opens the gate in the gate circuit to allow the signal to pass to the receiver raspberry pi. Once the file has been sent, the uart_tx_V3.c program pulls the GPIO pin LOW to close the gate and not allow voltage to pass to the receiving raspberry pi.

So far, everything seems to work except uart_rx_V3.c does not know when to start recording data to file and does not know when to end recording. The result is it writes null characters to the file at the start and end of file. The receiving program is also not recording the end of the file properly. Everything in between the start of file and end of file seems to be transmitting okay. I've attached to files; largetxtfile.txt is the test transmission file. largetxtfile_rx is currently what the receiving file looks like, with extra random characters at start and end of file.

I am looking to hire a programmer who can implement flow control into the programming. The transmission file (uart_tx_V3.c) will transmit a start character and an end character. The receiving file (uart_rx_V3.c) will recognize the start character and begin writing to file. It will recognize the end character, and quit writing to file.

The library I am using is Termios.h. You must have experience programming in C with this library in the past and prove that experience.
https://pubs.opengroup.org/onlinepubs/7908799/xsh/termios.h.html
You will need to implement the flags TCION, TCIOFF or IXON/IXOFF.

Both raspberry PI's are connected to the internet and you can access them through a tunnel (NGROK). Once you have altered/saved/compiled the code on the TX Rpi, you can run the program and log into the RX Rpi to test the transmission and see if it is transmitting/receiving properly.

This job is complete when you are able to transmit/receive attached "largefile.txt" without any errors, or extra characters at the beginning or end of file. The software must also be able to transmit and recieve sample file smalltxtfile.txt without any data transmission errors. The transmitting and receiving file must be identical to each other before the job is complete.

You must have experience in C programming and particularly UART data transmission implementing flow control. You must also know how to login to a raspberry pi remotely through an NGROK tunnel and program remotely.