LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Bluetooth sdp and socket programming (https://www.linuxquestions.org/questions/linux-networking-3/bluetooth-sdp-and-socket-programming-291833/)

hk_michael 02-18-2005 08:43 AM

Bluetooth sdp and socket programming
 
Hi all!
I'm facing a very big problem in my project. In the past, I initialized the connection from PC to T610 thorugh bluetooth rfcomm layer, and it successed. But then when I changed the approach from T610 (or even other mobile device) to PC (actually, this requirement is from my supervisor), I can't see any result. Then I asked my tutor and the user in BlueZ's email list, and they told me to do about sdp programming and then learn about socket programming. But I don't know how to do it. So, I wish to ask 2 quiestions here.
1.Is there any reference for me to write bluetooth socket programming, and how can I do for sdp i.e. how to use the sdptool.c in my main program so that the main program can let the bluetooth mobile device to connect to PC?
2.The other thing is that now, my PC should act as server. Some people in this forum taught me one thing to do: make an infinite while loop. But then I have to consider one thing. I assume that the mobile phone accesses program first, and then the phone uses the program for a while. Then my PDA wish to access it. But the key point is the access of PDA must not affect what mobile is doing, and on the other hand, what PDA does must not affect the mobile phone. So, how can I do in the infinite while loop? Thank you very much for your kindness.
Michael


All times are GMT -5. The time now is 06:10 PM.