Page 1 of 1

Problem connecting to SSID

Posted: Thu May 04, 2023 7:13 pm
by wayne_millard
Hi Everyone.

Can anyone find a problem with what i am doing. Im try to connect to a SSID and receive a NTP sever.
The problem i have is it will not connect to the SSID. Im using a Wifi kit 32 module.

Thanks,
Wayne M

Re: Problem connecting to SSID

Posted: Thu May 04, 2023 9:03 pm
by mnfisher
Assuming you have the SSID and password correct (case etc) - make sure the strings are long enough to include a 0 terminator. Use length of string + 1 (or more) (so, for example = SSID[7] = "MySSID" (Not SSID{6]). Note that if you pass the strings as arguments (ConnectToSSID("mySSID", "MyPassword", timeout) is handled correctly)

The esp32 will only connect to 2.4GHz signal (new models may allow 5Ghz)
Try a longer timeout (say 60s) - if the signal is weak it might take a little time to connect.

Martin

Re: Problem connecting to SSID

Posted: Thu May 04, 2023 10:08 pm
by wayne_millard
Hi Martin

I have tried all that you said to try but still will not connect. I'm only 2 meters away from WiFi hub.

Thanks
Wayne m

Re: Problem connecting to SSID

Posted: Thu May 04, 2023 10:53 pm
by mnfisher
I posted a sample at viewtopic.php?t=1679&start=10 that does work. If reads the time from NTP. Your code looks to do similar setup etc
Another example at viewtopic.php?t=1040#p5525, used lower level code to do a similar job.
Martin

Re: Problem connecting to SSID

Posted: Fri May 05, 2023 7:02 am
by chipfryer27
Hi

If nothing Martin suggests has helped then it sounds like you may have a similar problem to me here

viewtopic.php?p=8123#p8123

Modules I had would barely connect over a couple of metres and pretty much impossible to through a plasterboard partition despite being just a couple of metres away from Draytek router.

My modules were bought from a well known online market place and in my experience, with any ESP module you get what you pay for. When I bought a module from a more specialist supplier I had no issues. There is a recent post in which Benj lists a supplier he uses, but as it is in China delivery will take a few weeks.

Recently I obtained a few ESP8266 modules from a suppler I've used before for other items, as everything previous was reasonable cost effective (cheap) and of good quality. They were returned as they were useless.

Regards

EDIT...
Here's a link to the post in which modules are recommended viewtopic.php?p=11076#p11076

Re: Problem connecting to SSID

Posted: Fri May 05, 2023 5:46 pm
by wayne_millard
Thanks everyone for trying to help but still will not connect but will do a SSID scan so module WiFi does work.
I have purchased another I hope that one works.

Wayne

Re: Problem connecting to SSID

Posted: Fri May 05, 2023 6:14 pm
by chipfryer27
Hi

When I had my issues I obtained another module from my original supplier, this too was useless. Using one from a more reliable source fixed my issue. Hopefully you will have better luck with your new module.

Regards