Wifi reconfigure issues

sir lets said we will sell the device to customer now the device is connected to the network after few months customer change they are wifi password then how to reconnect wifi to device ? and how to define my esp32 pin for reconfig botton for press 10sec in setting.h i am using esp32 wroom i allready define the gpio pin 2 sir but isnt work please take a look the screenshot,

i understand that if customer wifi password changing before he will go the Blynk app and once click wifi config then the 2nd time very easy to connect another network if customer forget to that then how sir ?
i hope you hear me soon
Best Regrds
Maaz

The answer is right there.

You are using GPIO2 for both Reset pin and Led indicator.

Use different pins for each and you are good to go.

2 Likes

Thanks for Replying sir
Define board_botton_pin here I will change to another GPIO pin that’s it Right?
Then after that I need to use jumper wire and then short for 10sec Define GPIO pins and GND is it correct Sir ?

Best Regards
Maaz

1 Like

You are right.

1 Like

Thank you from the bottom of my heart sir
I will try it today

1 Like

Hello sir
sir i allready try as you said that 02 place i will change couple of others gpio pins and try each pins , after i make changes i use small jamper wire to short GPIO pins and GND togather for 10sec and i try more than 10sec too it will wont work for me, or may be i need to make changes some others place too?
take a look the screenshot sir i attached for your info .

Best Regards
Maaz

Do you have one of the board types uncommented in your .ino file?
Are you seeing the “Custom board configuration is used” message in your compiler messages whne you compile the sketch?
Do you have an LED connected to GPIO2 and is this flashing/pulsing after start-up?

Pete.

1 Like

Thanks for reply sir

  1. yes sir I have
  2. don’t have sir
  3. yes sir I have green led connected yes it’s flashing

Best Regards
Maaz

In that case, no amount of changes to the Custom board configuration settings will have any effect, as these only have any impact when you don’t have a specific board type uncommented.

Maybe you should read this…

Pete.

1 Like

@Huzefamaz1
Hello,

I revised the code.

**In `ResetButton.h` we have delay by default**

if (buttonState && !g_buttonPressed) {
    g_buttonPressTime = millis();
    g_buttonPressed = true;
    DEBUG_PRINT("Hold the button for 10 seconds to reset configuration...");
  } else if (!buttonState && g_buttonPressed) {
    g_buttonPressed = false;
    uint32_t buttonHoldTime = millis() - g_buttonPressTime;
    if (buttonHoldTime >= BUTTON_HOLD_TIME_ACTION) {
      button_action();
    } else if (buttonHoldTime >= BUTTON_PRESS_TIME_ACTION) {
      // User action
    }
    g_buttonPressTime = -1;
  }
}

In Settings.h

BUTTON_HOLD_TIME_ACTION 10000 //10 sec

Until we understand what the problem is.

@PeteKnight please review this post. Maybe hardware problem. Perhaps you can help the user?

1 Like

@Huzefamaz1 did you fix your issue by changing the correct section of Settings.h ?

Pete.

1 Like

Thanks i Will try this and back to you

i will try now sir then let you know sir thank you

Hello sir
i just try you code i will shows this error i attached here the screenshot please take a look

Best Regards
Maaz

I guess that’s because you missed this part…

Pete.

1 Like

that allready in default sir

Strange. And with default settings

1 Like

Sir did you try this your side ?
I must have to use this reset botton function because lets said I sell my device to end customer then customer forget to click reconfigure option, then he change his wifi user name or password then I need to go site just to do the wifi reconfiguration

This is what the standard Edgent sketch does, as explained in the tutorial I linked to. I think your issue is that you were configuring the custom board type settings, but not using the custom board type.

I’d suggest that you go back to the original Edgent example, un-comment the appropriate board type for the board you are using and if the Settings.h entry for that board type needs to be adjusted then make those changes.

Pete.

1 Like

Ok thanks for replying sir
I will go today orginal Edgent example then let you know sir thank you

Best Regards
Maaz