Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,182 Views

Reading message from Bluetooth socket delay

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:

# !/usr/bin/python

from __future__ import absolute_import, print_function, unicode_literals

from optparse import OptionParser, make_option

import os

import errno

import sys

import socket

<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...

0 Kudos
3 Replies
Highlighted
Community Manager
11 Views

Hello Michal,

 

 

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.

 

 

Regards,

 

Octavian

 

0 Kudos
Highlighted
Community Manager
11 Views

Hello Michal,

 

 

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.

 

 

Regards,

 

Octavian
0 Kudos
Highlighted
Community Manager
11 Views

Hello Michal,

 

 

Do you require any more assistance with this issue?

 

 

Regards,

 

Octavian
0 Kudos