Unable to get Service from Bluetooth Sensor Device



  • I have scanned and able to connect with my Ti sensor Device , but on Service request it is not working.

    bluetooth = Bluetooth()
    bluetooth.start_scan(5)
    while bluetooth.isscanning():
    adv = bluetooth.get_adv()
    if adv:
    if(str(binascii.hexlify(adv.mac).decode()) == '78a50454b267'):
    conn = bluetooth.connect(adv.mac)
    print(type(conn))
    service = bluetooth.get_service()
    print("got service", service)

    The service is not print. Loop get stopped their and no response.

    Even I have tried so many get service methods.,

    missed any import functions. ?
    Is there any GATT connection problem. ?
    How to import .gatt and its service, characteristic ??



  • please add time.sleep after connection and make service as dictionary, things will work...



Hello World?

Pylife on Kickstarter - November 2018








Back Us On Kickstarter >

Pycom on Twitter