Hello I'm having some trouble with a Python's socket and FIFO files. I'm communicating with a device through Bluetooth - I'm sending a command and receiving a response. A command needs to be written to a FIFO file and a response is read from another FIFO and when a script finds '\n' - it sends it. The problem is that at the beginning the system works fine but after some time I have a big delay in receiving a response from device - about 100ms, then it works fast and again have this delay and again. I think the problem is in writing data to FIFO or receiving incoming data from socket because in my code in Arduino C I've got this delay when I want to read a data from the input FIFO using fgets function. My Python's script:
absolute_import, print_function, unicode_literals
<code class="keyword python" style="background: none !important; margin: 0 !important; padding: 0 !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; font-size: 1em !important; co...
Thank you for your interest in the Intel Edison Module.
Your request has been received and is currently being investigated.
We will get back to you as soon as possible.
Thank you for your patience.
Since the Arduino code is a process running on Edison that could be the reason why you observe such delay in the Bluetooth communication (python socket and FIFO files).
Try reducing that delay in the Arduino script to ~50 ms and see if the difference in delay can be observed in the Bluetooth communication.