diff --git a/lib/default/rddl-sdk b/lib/default/rddl-sdk index df128bb473b8..e950ed2a573f 160000 --- a/lib/default/rddl-sdk +++ b/lib/default/rddl-sdk @@ -1 +1 @@ -Subproject commit df128bb473b8634c8223d0410c211db96ca378dc +Subproject commit e950ed2a573faa5364adc135f044e7da14fce859 diff --git a/tasmota/include/i18n.h b/tasmota/include/i18n.h index 2653f5b9a648..58edaa3813ca 100644 --- a/tasmota/include/i18n.h +++ b/tasmota/include/i18n.h @@ -279,6 +279,7 @@ #define D_CMND_NOTARIZATION_PERIODICITY "NotarizationPeriodicity" #define D_CMND_NOTARIZE "Notarize" #define D_CMND_REMOVE_FILES "RemoveFiles" +#define D_CMND_CIDSTOBEQUERIED "CIDsToBeQueried" #define D_CMND_STATUS "Status" #define D_STATUS1_PARAMETER "PRM" #define D_STATUS2_FIRMWARE "FWR" diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h index b4d6aeb1e3d9..9713d42f9d88 100644 --- a/tasmota/include/tasmota.h +++ b/tasmota/include/tasmota.h @@ -484,7 +484,7 @@ enum SettingsTextIndex { SET_OTAURL, SET_SHD_PARAM, SET_RGX_SSID, SET_RGX_PASSWORD, SET_INFLUXDB_HOST, SET_INFLUXDB_PORT, SET_INFLUXDB_ORG, SET_INFLUXDB_TOKEN, SET_INFLUXDB_BUCKET, SET_INFLUXDB_RP, - SET_PLANETMINT_API, SET_PLANETMINT_CHAINID, SET_PLANETMINT_DENOM, SET_NOTARIZTATION_PERIODICITY, + SET_PLANETMINT_API, SET_PLANETMINT_CHAINID, SET_PLANETMINT_DENOM, SET_NOTARIZTATION_PERIODICITY, fSET_CIDS_TO_BE_QUERIED, SET_MAX }; enum SpiInterfaces { SPI_NONE, SPI_MOSI, SPI_MISO, SPI_MOSI_MISO }; diff --git a/tasmota/tasmota_support/settings.ino b/tasmota/tasmota_support/settings.ino index 8376a1baaef2..0a7f4b5eef46 100644 --- a/tasmota/tasmota_support/settings.ino +++ b/tasmota/tasmota_support/settings.ino @@ -1392,7 +1392,7 @@ void SettingsDefaultSet2(void) { SettingsUpdateText( SET_PLANETMINT_CHAINID, "planetmint-testnet-1"); SettingsUpdateText( SET_PLANETMINT_DENOM, "plmnt"); SettingsUpdateText( SET_NOTARIZTATION_PERIODICITY, "3600"); - + SettingsUpdateText( SET_CIDS_TO_BE_QUERIED, "2"); } void SettingsDefaultSet3(void) { diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 898df8e94fc9..da454959af09 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -47,7 +47,7 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix D_CMND_BALANCE "|" D_CMND_RESOLVEID "|" D_CMND_PLANETMINTDENOM "|" D_CMND_GETACCOUNTID "|" D_CMND_PLANETMINTCHAINID "|" D_CMND_MACHINEDATA "|" D_CMND_POPCHALLENGE "|" D_CMND_ATTESTMACHINE "|" D_CMND_NOTARIZATION_PERIODICITY "|" D_CMND_NOTARIZE "|" D_CMND_REMOVE_FILES "|" D_CMND_POPINIT "|" - D_CMND_CHALLENGE "|" D_CMND_POPCHALLENGERESULT "|" D_CMND_REDEEMCLAIMS "|" D_CMND_CREATEACCOUNT "|" + D_CMND_CHALLENGE "|" D_CMND_POPCHALLENGERESULT "|" D_CMND_REDEEMCLAIMS "|" D_CMND_CREATEACCOUNT "|" D_CMND_CIDSTOBEQUERIED "|" #ifdef USE_I2C D_CMND_I2CSCAN "|" D_CMND_I2CDRIVER "|" #endif @@ -92,7 +92,7 @@ void (* const TasmotaCommand[])(void) PROGMEM = { &CmndBalance, &CmdResolveCid, &CmndPlanetmintDenom, &CmndGetAccountID, &CmndPlanetmintChainID, &CmndMachineData, &CmndPoPChallenge, &CmndAttestMachine, &CmndNotarizationPeriodicity, &CmndNotarize, &CmndRemoveFiles, &CmndPoPInit, - &CmndChallenge, &CmndPoPChallengeResult, &CmndRedeemClaims, &CmndCreateAccount, + &CmndChallenge, &CmndPoPChallengeResult, &CmndRedeemClaims, &CmndCreateAccount, &CmndCIDsToBeQueried, #ifdef USE_I2C &CmndI2cScan, &CmndI2cDriver, #endif @@ -1157,7 +1157,18 @@ void CmndCreateAccount(void) { ResponseClear(); } +void CmndCIDsToBeQueried(void) { + if( XdrvMailbox.data_len ) { + //verify convertibility + uint32_t value = (uint32_t)atoi(sdkGetSetting( SET_CIDS_TO_BE_QUERIED)); + sdkSetSetting( SET_CIDS_TO_BE_QUERIED, XdrvMailbox.data); + } + Response_P( "{ \"%s\": \"%s\" }", D_CMND_CIDSTOBEQUERIED, sdkGetSetting( SET_CIDS_TO_BE_QUERIED) ); + + CmndStatusResponse(40); + ResponseClear(); +} void CmndStatus(void) { diff --git a/tasmota/tasmota_xdrv_driver/xdrv_129_rddl_network.ino b/tasmota/tasmota_xdrv_driver/xdrv_129_rddl_network.ino index f7d82da52441..648aeeeab414 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_129_rddl_network.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_129_rddl_network.ino @@ -226,7 +226,12 @@ void InitializePoPWorkflow(){ AddLog(2, "PoP: initialize PoP challenge"); // select CID - char* cid = getCIDofChallengee(); + uint32_t cidsToBeQueried = (uint32_t)atoi(sdkGetSetting( SET_CIDS_TO_BE_QUERIED)); + char* cid = getCIDofChallengee( cidsToBeQueried ); + if( cid == NULL ){ + AddLog(2, "{ \"PoP\": no cid retrieved }"); + return; + } AddLog(2, "PoP: CID to be challenged %s", cid ); bool result = ChallengeChallengee( cid, NULL); if( result )