Obtenga la versión MW y los registros de la versión FW del teléfono móvil nfc

/vendor/nxp/opensource/commonsys/packages/apps/Nfc/nci/jni/NativeNfcManager.cpp imprimirá la información de la versión de NFC.

Versión MW

  static jboolean nfcManager_doInitialize(JNIEnv * e, jobject o) {
    
    
    initializeGlobalDebugEnabledFlag();
    uint8_t switchToUiccSlot = 0;
#if (NXP_EXTNS == TRUE)
    rfActivation = false;
#endif
    mwVer = NFA_GetMwVersion();
    DLOG_IF(INFO, nfc_debug_enabled)
        << StringPrintf("%s:  MW Version: NFC_NCIHALx_AR%X.%x.%x.%x", __func__,
                        mwVer.validation, mwVer.android_version,
                        mwVer.major_version, mwVer.minor_version);

Versión FW

static jint nfcManager_getFwVersion(JNIEnv * e, jobject o) {
    
    
  (void)e;
  (void)o;
  DLOG_IF(INFO, nfc_debug_enabled) << StringPrintf("%s: enter", __func__);
  tNFA_STATUS status = NFA_STATUS_FAILED;
  //    bool stat = false;                        /*commented to eliminate
  //    unused variable warning*/
  jint version = 0, temp = 0;
  tNFC_FW_VERSION nfc_native_fw_version;

  if (!sIsNfaEnabled) {
    
    
    DLOG_IF(INFO, nfc_debug_enabled)
        << StringPrintf("NFC does not enabled!!");
    return status;
  }
  memset(&nfc_native_fw_version, 0, sizeof(nfc_native_fw_version));

  nfc_native_fw_version = nfc_ncif_getFWVersion();
  DLOG_IF(INFO, nfc_debug_enabled) << StringPrintf(
      "FW Version: %x.%x.%x", nfc_native_fw_version.rom_code_version,
      nfc_native_fw_version.major_version,
      nfc_native_fw_version.minor_version);

  temp = nfc_native_fw_version.rom_code_version;
  version = temp << 16;
  temp = nfc_native_fw_version.major_version;
  version |= temp << 8;
  version |= nfc_native_fw_version.minor_version;

  DLOG_IF(INFO, nfc_debug_enabled)
      << StringPrintf("%s: exit; version =0x%X", __func__, version);
  return version;
}

Busque su mensaje logcat cuando NFC activado ~ El
ejemplo es el siguiente:

04-22 14: 14: 13.478: I / libnfc_nci (3193): [INFO: nfa_dm_api.cc (1500)] 0x0: NFC MW Versión principal:
04-22 14: 14: 13.478: I / libnfc_nci (3193): [ INFO: nfa_dm_api.cc (1502)] 0xa: NFC MW Minor Version:
04-22 14: 14: 13.478: I / libnfc_nci (3193): [INFO: nfa_dm_api.cc (1507)] mwVer: Major = 0x0, Minor = 0xa
04-22 14: 14: 13.478: E / libnfc_nci (3193): [NativeNfcManager.cpp (1479)] nfcManager_doInitialize: MW Versión: NFC_AR_00_6000_10.00.0a_RC1

04-22 14: 14: 13.509: D / NxpHal (811): phNxpNciHal_configFeatureList () chipType = 11
04-22 14: 14: 13.509: D / NxpHal (811): phNxpNciHal_configFeatureList () chipType = 11
04-22 : 13.509: D / NxpHal (811): phNxpNciHal_configFeatureList () FW = 16
04-22 14: 14: 13.509: D / NxpHal (811): NxpNci> Versión de FW: 1.10.33

Supongo que te gusta

Origin blog.csdn.net/qq_43804080/article/details/107541288
Recomendado
Clasificación