nadeesha5814 / pybluez

Automatically exported from code.google.com/p/pybluez
GNU General Public License v2.0
0 stars 0 forks source link

pybluez 0.18 server not working with Py60 2.0.0 when trying to discover the services #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I have build a simple program on Symbian 60 using Py60 2.0.0 edition
trying to acess services and sending character to a server.
2. Using a telent console, my PC is able to receive properly the character.
I use the example located in
http://www.mobilenin.com/pys60/ex_bluetooth_mobile_to_pc.htm
3. Now I created the server code using your proposed example
http://code.google.com/p/pybluez/source/browse/trunk/examples/simple/rfcomm-serv
er.py
4. In that case my program on the phone fail when trying to discover the
services on my PC (btsocket.bt_discover()) and stop immediately

Is that a known bug?
What is the workaround?
Many thanks for your help.

What is the expected output? What do you see instead?
My client should have been connected to the server

What version of the product are you using? On what operating system?
Py60 2.0.0
Python 2.5.4
pybluez 0.18

Please provide any additional information below.

Original issue reported on code.google.com by JeanDavi...@gmail.com on 18 Feb 2010 at 9:57

GoogleCodeExporter commented 8 years ago
I've got the same problem. When I using Linux evrything is ok. If you want to 
discover serwice pys60 you must use this.
services = bluetooth.find_service(address="12:34:56:67:78:56",uuid="0100")
uuid="0100" this is important and allow you to discover that service on linux.
I tried on windows but it allow you to discover only J2Me servicec that is 
invisible to normal find_sevrice. 
There is another solution for that. You can simply try to connect to servie and 
set timeout. If timeout exception occurs then you now that this service doesn't 
exist. But sock.timeout in pybluez works only in linux but you can simply wite 
that using threading module. You can use port that is never useb for example 30.

I will be grateful if somebody fix that problem with finding services on 
windows.

Here i attach some code that works with my phone.

Original comment by Matys.Sp...@gmail.com on 7 Jul 2012 at 8:56

Attachments: