[LightBlue-devel] Lightblue on Ubuntu 11.04 or Python 2.7
Status: Alpha
Brought to you by:
blammit
From: Santosh v. <vat...@gm...> - 2011-07-13 22:34:09
|
Hello all, I am a student at University of Pennsylvania and we are using lightblue for a project. We have suddenly started encountering a problem with lightblue socket.accept() method. We used this method before for without any problems on Ubuntu 10.10 and Python 2.6. The problem is as follows: We have a bluetooth server that essentially runs the following code: import lightblue ss = lightblue.socket() ss.bind(( "", 1 )) ss.listen(1) lightblue.advertise("BluetoothServer", ss, lightblue.RFCOMM) sock, addr = ss.accept() and a client that runs: import lightblue ss = lightblue.socket() err = ss.connect_ex(("BluetoothAddress", BluetoothPort)) When we run the server and then the client, the client's connect_ex() method returns with a 0 error code indicating that the connection was successfully established. However the server ss.accept() method is still blocked and does not return. We see that this problem exists when the server is running on Ubuntu 11.04 and Python 2.7. We ran the server code on Ubuntu 10.04 and Python 2.6 and it seems work just fine. I just needed to know if this is a problem that someone has encountered and if so does anyone know the solution or a workaround for this problem. Thanks in advance. -- Regards Santosh G Vattam |