anchor.diff:      ingest_data_frame(MAC, MType, Msg, FOpts, FRMPayload, MIC,
           #frame{conf=Confirm, devaddr=DevAddr, adr=ADR, adr_ack_req=ADRACKReq, ack=ACK, fcnt=FCnt, port=Port});
   ingest_frame0(MAC, MType, Msg, _MIC) ->
  -    lager:debug("~s bad frame (mtype ~.2B): ~p", [binary_to_hex(MAC), MType, Msg]),
  +    lager:warning("~s bad frame (mtype ~.2B): ~p", [binary_to_hex(MAC), MType, Msg]),
       ignore.
   
   ingest_data_frame(_MAC, MType, Msg, FOpts, FRMPayload, MIC,
  
positive.code:         [D] ->
              case aes_cmac:aes_cmac(D#device.appkey, Msg, 4) of
                  MIC ->
                      handle_join(D, DevNonce);
                  _MIC2 ->
                      {error, {device, DevEUI}, bad_mic}
              end
  
negative.code:             {ignore, Frame}
      end;
  ingest_data_frame(MAC, MType, _Msg, _FOpts, _FRMPayload, _MIC, #frame{devaddr=DevAddr}) ->
      lager:warning("~s ~s downlink frame (mtype ~.2B)", [binary_to_hex(MAC), binary_to_hex(DevAddr), MType]),
      ignore.
  
  handle_join(MAC, #device{deveui=DevEUI, profile=ProfID}=Device, DevNonce) ->
      case mnesia:read(profile, ProfID, read) of
          [] ->
              {error, {device, DevEUI}, {unknown_profile, ProfID}, aggregated};
  