• i am trying the following, but i get following error. any help please

    Traceback (most recent call last): File "puck_serial.py", line 6, in

    sock.connect((bd_addr,port))   File "<string>", line 5, in connect bluetooth.btcommon.BluetoothError: (112, 'Host is down')
    
    from bluetooth import *
    import time
    bd_addr = "D8:19:E7:5B:3A:57"
    port = 1
    sock = BluetoothSocket (RFCOMM)
    sock.connect((bd_addr,port))
    print 'waiting'
    while 1:
            data = sock.recv(10)
            print data
            time.sleep(2.0)
            [#tosend](http://forum.espruino.com/sear­ch/?q=%23tosend) = raw_input()
            [#if](http://forum.espruino.com/search/?­q=%23if) tosend != 'q':
            #        sock.send(tosend)
            [#else](http://forum.espruino.com/search­/?q=%23else):
            #        break
    
    sock.close()
    
About

Avatar for Ossama @Ossama started