In Xbee3 ble, can you save a service or characteristic "handle" for later use?
I tried and it seemed to work:
>>> conn=ble.gap_connect(ble.ADDR_TYPE_RANDOM, ubinascii.unhexlify("F64D1D24B0E6"), timeout_ms=5000)
>>> list(conn.gattc_services())
[(65545, UUID(0x1800)), (655370, UUID(0x1801)), (786431, UUID('0000BEEF-1212-EFDE-1523-785FEF13D123'))]
>>> list(conn.gattc_characteristics(786431))
[(13, UUID('00004478-1212-EFDE-1523-785FEF13D123'), 18)]
>>> conn.close()
then some period of time later:
>>> conn=ble.gap_connect(ble.ADDR_TYPE_RANDOM, ubinascii.unhexlify("F64D1D24B0E6"), timeout_ms=5000)
>>> list(conn.gattc_read_characteristic(13))
[13]
and 13 is a correct reading from that characteristic.
Is this safe? I can't really find much of a description of these handles. Is it a digi specific concept, or is it part of BLE?