def METHOD_NAME(sock):
    print ("starting listening")
    while True:
        data, addr = sock_r.recvfrom(2000)
        print (">>>", binascii.hexlify(data))
        msg = cbor.loads(data)
        if msg[1] != 1:
            print ("not LoraWAN Technology")
            continue
        dev_eui = binascii.hexlify(msg[2]).decode().upper()
        if not dev_eui in app_id:
            print ("device unknown", dev_eui)
            continue