Connect Fails (New User!)

Help
Jamie
2008-07-17
2013-04-25
  • Jamie

    Jamie - 2008-07-17

    Hi

    I've just started working with Bluetooth and lightblue, so please excuse any silly questions, but I was wondering if anyone could point me in the right direction to understand what is causing the below error? I can't seem to connect to a bluetooth module (00:06:66:00:D3:4D, as below) I'm developing with. Here is the transcript from command line Python:

    Python 2.3.5 (#1, Aug 22 2005, 22:13:23)
    [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import lightblue
    >>> lightblue.findservices('00:06:66:00:D3:4D')
    [('00:06:66:00:D3:4D', 1, u'SPP')]
    >>> from lightblue import *
    >>> s = socket(L2CAP)
    >>> s.connect(("00:06:66:00:D3:4D", 5))
    Traceback (most recent call last):
      File "<stdin>", line 1, in ?
      File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/lightblue/_bluetoothsockets.py", line 385, in connect
        "Cannot connect to %d on %s" % (address[1], address[0]))
    socket.error: (-536870195, 'Cannot connect to 5 on 00:06:66:00:D3:4D')
    >>>

    Any help or pointers would be greatly appreciated. I'm developing on Mac OS 10.4 if that helps...

    Thanks loads.

    Jamie

     
    • blam

      blam - 2008-07-26

      Hi Jamie,

      It looks like it can't connect to the L2CAP channel for some reason. I can't tell much from that error myself and the error numbers are admittedly quite un-useful. Are you sure that service is running? Does the other device require pairing for that service? Might be worth checking the log from the Bluetooth Packet Logger app too.

       

Log in to post a comment.