title: Bluetooth server with Python 3.3
body: <p>Python 3.3 came with native support for bluetooth sockets. Unfortunately, it's not too well documented yet (there is only one mention of it in the <a href="http://docs.python.org/3.4/library/socket.html?highlight=af_bluetooth" rel="noreferrer">documentation</a>).</p>
  
  <p>Googling it there is <a href="http://bitsofpy.blogspot.com.ar/2012/09/bluetooth-with-python-33.html" rel="noreferrer">a blog post</a> about implementing a client, but I couldn't find anything about creating a server.</p>
  
  <p>More specifically, how to set the user-friendly name and advertise the service.</p>
  
  <p>So, something like</p>
  
  <pre><code>import socket
  
  serverSocket = socket.socket(socket.AF_BLUETOOTH,
                               socket.SOCK_STREAM,
                               socket.BTPROTO_RFCOMM)
  serverSocket.setTimeout(1)
  serverSocket.bind(("", 1))
  serverSocket.listen(1)
  
  something.advertise_service(something something)
  </code></pre>
  
  <p>Any ideas?</p>