def read_inquiry_scan_activity(sock):
<EOL>old_filter = sock.getsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, <NUM_LIT>)<EOL>flt = bluez.hci_filter_new()<EOL>opcode = bluez.cmd_opcode_pack(bluez.OGF_HOST_CTL, <EOL>bluez.OCF_READ_INQ_ACTIVITY)<EOL>bluez.hci_filter_set_ptype(flt, bluez.HCI_EVENT_PKT)<EOL>bluez.hci_filter_set_event(flt, bluez.EVT_CMD_COMPLETE);<EOL>bluez.hci_filter_set_opcode(flt, opcode)<EOL>sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, flt )<EOL>bluez.hci_send_cmd(sock, bluez.OGF_HOST_CTL, <EOL>bluez.OCF_READ_INQ_ACTIVITY )<EOL>pkt = sock.recv(<NUM_LIT:255>)<EOL>status,interval,window = struct.unpack("<STR_LIT>", pkt)<EOL>interval = bluez.btohs(interval)<EOL>interval = (interval >> <NUM_LIT:8>) | ( (interval & <NUM_LIT>) << <NUM_LIT:8> )<EOL>window = (window >> <NUM_LIT:8>) | ( (window & <NUM_LIT>) << <NUM_LIT:8> )<EOL>if status != <NUM_LIT:0>: mode = -<NUM_LIT:1><EOL>sock.setsockopt( bluez.SOL_HCI, bluez.HCI_FILTER, old_filter )<EOL>return interval, window<EOL>
returns the current inquiry scan interval and window, 
    or -1 on failure