| Reply | « Previous Thread | Next Thread » |
|
hi,
i'm using a USB bluetoothfor my PC, a phone and java. i'm trying to build a bluetooth server in my pc to accept all connections (for now), but i can't have the client (phone) connected. The problem is that i'm having the program wait for a connection but when i have the client connected, it connects to the windows "handler" for bluetooth and my program keeps on waiting. I already tried to search for devices and i can find them, just can't get the client to connect my program instead of windows. this might be a little confusing, let me know if you didn't understand. I really need to understand this problem. Thks, antonio |
| antonio206 |
| View Public Profile |
| Find all posts by antonio206 |
|
since noone replied i'm going to try to explain better myself.
i have this code: Code:
LocalDevice localdevice = LocalDevice.getLocalDevice(); DiscoveryAgent agente = localdevice.getDiscoveryAgent(); localdevice.setDiscoverable(DiscoveryAgent.GIAC) ... initiate a service ... conn = notifier.acceptAndOpen(); The question is: how can i make the program recieve the connection and not windows it self ? |
| antonio206 |
| View Public Profile |
| Find all posts by antonio206 |
|
Which UUID are you using? Is that UUID offered by another application on your computer already?
|
|
i'm using 1105 for the push object,
Object Push OBEXObjectPush 4357 0x1105 How can i tell which UUID my pc is using? Should i create my own service for push object? |
| antonio206 |
| View Public Profile |
| Find all posts by antonio206 |
|
i tried changing UUID:
new UUID(0x1106) - file transfer works, the phone can find it and use it. new UUID(0x1105) - object push isn't even found by the phone btgoep://localhost:0000110500001000800000805f9b34fb;authenticate=false;master=true;encrypt=false;name=ObexExample i'm using this url for the service. |
| antonio206 |
| View Public Profile |
| Find all posts by antonio206 |
|
Problem Solved.
The url was in fact not being done correctly. |
| antonio206 |
| View Public Profile |
| Find all posts by antonio206 |
|
Additinonally, do not forget to set the service bit (ServiceRecord.setDeviceServiceClasses) and to modify your service record accorinding its profile specification (ServiceRecord.setAttributeValue); otherwise some devices will not use your service: Wiki-entry …
|
|
i m using UUID as : String serverUUID=new UUID("9106",true).toString();
i didn't understand about servicerecord.setDeviceServiceClasses() and servicerecord.setAttributeValue() methods. Means what parameter i have to send in these methods. i m using following string as my connection to the server: "btspp://localhost:" + serverUUID + ";name=BTTP" : serverUUID is a string from first line above. my pc server is not receiving any data. Although my mobile is able to find the service's URL of pc and able to connect to it. acceptAndOpen() is the line where my pc server is stucked. please help me its very urgent for me. |
| manish4edu |
| View Public Profile |
| Find all posts by manish4edu |
|
manish4edu, where is your code executed: On your PC or phone?
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem in makeing Phone Call in 2nd edition | yogesh.bhople | General Symbian C++ | 4 | 2006-11-18 09:47 |
| detecting the phone connection to pc | verlycious | PC Suite API and PC Connectivity SDK | 6 | 2006-09-11 22:57 |
| PC Connection Problem with 6310 | Nokia_Archived | PC Suite API and PC Connectivity SDK | 4 | 2002-06-18 21:07 |