| Reply | « Previous Thread | Next Thread » |
|
Hello,
I am new to bluetooth programming and try to understand RFCOMM point to point example which exists in Symbian\Series60_1_2_B\series60ex. If I just want to connect to a certain bluetooth device with my 3660 phone why I still need to create sdpattributeparser class and also what is the reason for those messageservicesearcher, messageserviceadvertiser classes? Isn´t it possible to communicate via rfcomm just with basic server and client classes? I hope I can understand..if someone can show me a very simple rfcomm sample code I will be very thankful! Burge |
|
The reason basically is that the client (connecting device) has to know to which application (~service) and port (=channel) to connect on the server. And this information it can retrieve via service discovery.
If you create the application without SDP implementation, there is a risk that conflicts occur. -seppo Forum Nokia |
|
Question about service discovery:
When a client is setting up a listening port, and getting ready to start advertising its service, it first asks for an available channel number from the socket server, and then uses this channel number (port) to advertise its service.. If you have multiple BT apps running on the same phone, the socket server will make sure each service uses a different port. Let's assume some app is running on phone A, gets assigned port 1 and it is using RFCOMM protocol. It starts advertising its service. On a nearby phone B, there is a different app, and it is advertising its own service on port 1 using RFCOMM as well.. A third phone C wants to connect to app on phone A. How will he differentiate between phone A service and phone B service? Using the bluetooth address of the phone it wants to connect to? (Assume that the name of the service is either blank or the same for phones A and B) And once he connects to phone A , a 4th phone D wants to connect to phone B. Since both phone A and phone B services are using the same port of the same protocol, and phone A is already connected to phone C on this port of the protocol, wouldn't that create a problem for phone D? It makes sense to assign a unique port for services on the same phone, but how do you guarantee that the assigned port will be available for all the nearby phones especially if all the other differentiating factors are the same (except for BT address). I must be missing something here. Could someone explain to me how this scenario works out? |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|