| Reply | « Previous Thread | Next Thread » |
|
Once I've started server.accept(), how can I stop it correctly (for example if the user hits exit) so that I am able to restart it a second time in the same fashion (the user wants to start it again)
What part of my code looks like: Code:
server = socket.socket(socket.AF_BT, socket.SOCK_STREAM)
channel = socket.bt_rfcomm_get_available_server_channel(server)
server.bind(("", channel))
server.listen(1)
socket.bt_advertise_service(unicode(SERVICE_NAME), server, True, socket.RFCOMM)
socket.set_security(server, socket.AUTH | socket.AUTHOR)
conn, client_addr = server.accept()
# Once here, the phone application just waits, nothing happens
- server.close() doesn't accomplish the desired effect. I already tried it. - I am able to accomplish the desired effect IF a client connects, than I can close the connection; and doing the whole process again works well. The problem is that if noone connects, the accept() just seems to hang. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Bluetooth GPS simulator for j2me phone | vgps | Mobile Java Networking & Messaging & Security | 2 | 2007-02-09 05:30 |
| bluetooth sockets | bunty | General Symbian C++ | 3 | 2006-11-21 07:47 |
| regarding bluetooth listening sockets. | architgupta | Symbian Networking & Messaging | 1 | 2005-07-28 15:29 |
| Bluetooth statuspane icon | antijn | Bluetooth Technology | 2 | 2004-10-30 10:23 |
| PC Suite not detect 6600 with Bluetooth connection | spinacle | Bluetooth Technology | 29 | 2004-03-15 00:24 |