| Reply | « Previous Thread | Next Thread » |
|
Hi,
As far as I can tell, calling bt_advertise_service() with a 'False' flag should stop advertising a service. But if I run the snippet below, it will start advertising the service, but the service does not get removed after the last call to bt_advertise_service(). (So, if I run this code a few times, it advertises duplicate services with the same name and channel.) Do other people have this problem? I am running PyS60 1.3.1 final. I am not sure whether this is a problem on other versions. Thanks very much, B. === import socket SERVICE_NAME = u"My Service" s = socket.socket(socket.AF_BT, socket.SOCK_STREAM) p = socket.bt_rfcomm_get_available_server_channel(s) s.bind(("", p)) socket.set_security(s, socket.AUTH) print "Advertising service '%s'" % SERVICE_NAME socket.bt_advertise_service(SERVICE_NAME, s, True, socket.OBEX) print "Stopping service" socket.bt_advertise_service(SERVICE_NAME, s, False, socket.OBEX) print "Closing socket" s.close() |
|
Your code should work. Please file a bug about this.
|
|
I can confirm this bug for 1.3.13 final.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Problem with service attribute propagation and service attribute retrieval | pfrey | Bluetooth Technology | 4 | 2006-09-05 16:15 |
| 6680 and bluetooth service profiles | ceruault | Mobile Java Networking & Messaging & Security | 1 | 2005-10-08 23:24 |
| Service Registration question | asmatic | Mobile Java Networking & Messaging & Security | 1 | 2005-07-21 11:04 |
| Trouble advertising Audio service (A2DP) in SDP | dahhorn | Bluetooth Technology | 0 | 2004-12-30 00:13 |
| Service Discovery | jimdeal | Bluetooth Technology | 1 | 2003-09-25 10:41 |