def METHOD_NAME(packet_type, packet, time_sec):
    global scan_start_timestamp, scan_nr
    if packet_type != 0x00 or packet[0] != 0x0C or packet[1] != 0x20:
        return
    if (int(packet[3])): 
        scan_start_timestamp = time_sec
        scan_nr = scan_nr + 1
        print("Scanning started at %u"%scan_start_timestamp)
    else:          
        print("Scanning stopped")