×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    158

    Bluetooth connection error

    I'm trying to connect through Bluetooth using the following code snippet I found in this forum:

    Code:
    from socket import *
    s = socket(AF_BT, SOCK_STREAM)
    p = bt_rfcomm_get_available_server_channel(s._sock)
    s.bind(("", p))
    bt_advertise_service( u"asdf", s._sock, True, RFCOMM )
    set_security(s._sock, AUTHOR)
    s.listen(1)
    c = s.accept()
    But it results in:

    e32socket.bt_advertise(name,_unwrap(socket),flag,class_)
    Attribute error: 'module' object has no attribute 'bt_advertise'

  2. #2
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Bluetooth connection error

    Originally posted by bercobeute
    I'm trying to connect through Bluetooth using the following code snippet I found in this forum:

    Code:
    from socket import *
    s = socket(AF_BT, SOCK_STREAM)
    p = bt_rfcomm_get_available_server_channel(s._sock)
    s.bind(("", p))
    bt_advertise_service( u"asdf", s._sock, True, RFCOMM )
    set_security(s._sock, AUTHOR)
    s.listen(1)
    c = s.accept()
    But it results in:

    e32socket.bt_advertise(name,_unwrap(socket),flag,class_)
    Attribute error: 'module' object has no attribute 'bt_advertise'
    Thanks for the report, will fix. I guess this just shows that there is no such thing as code that is too simple to test...

    * puts brown paper bag on head *

  3. #3
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643
    FYI: tracking number for this bug is #203. This bug is fixed in 1.1.5.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •