I was able to reproduce this in kernel 3.0 and 3.2. This seems to be a timing issue and can be isolated in a simple socket-connection (using python-lightblue in this case):
sock = lightblue.socket()
sock.connect((addr, port))
# adding a sleep of a couple of seconds made it work more reliable
sock.send(data)
I was able to reproduce this in kernel 3.0 and 3.2. This seems to be a timing issue and can be isolated in a simple socket-connection (using python-lightblue in this case):
sock = lightblue.socket()
sock.connect((addr, port))
# adding a sleep of a couple of seconds made it work more reliable
sock.send(data)
stracing that shows:
socket( PF_BLUETOOTH, SOCK_SEQPACKET, 0) = 4 AF_BLUETOOTH, sa_data= "\1\0\317, \17\234\ 320\260\ 0\0\0\0\ 0\0"}, 12) = 0 PF_BLUETOOTH, SOCK_STREAM, 3) = 4 AF_BLUETOOTH, sa_data= "\317,\ 17\234\ 320\260\ 10\0\0\ 0\0\0\0\ 0"}, 10) = -1 ECONNREFUSED (Connection refused)
connect(4, {sa_family=
// and right afterwards:
socket(
connect(4, {sa_family=