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
Problem connecting to SSID
-
- Posts: 94
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
-
- Valued Contributor
- Posts: 1042
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 107 times
- Been thanked: 538 times
Re: Problem connecting to SSID
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
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
-
- Posts: 94
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
Re: Problem connecting to SSID
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
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
-
- Valued Contributor
- Posts: 1042
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 107 times
- Been thanked: 538 times
Re: Problem connecting to SSID
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
Another example at viewtopic.php?t=1040#p5525, used lower level code to do a similar job.
Martin
-
- Valued Contributor
- Posts: 1213
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 297 times
- Been thanked: 429 times
Re: Problem connecting to SSID
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
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
-
- Posts: 94
- Joined: Fri Dec 04, 2020 6:12 pm
- Has thanked: 1 time
- Been thanked: 9 times
Re: Problem connecting to SSID
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
I have purchased another I hope that one works.
Wayne
-
- Valued Contributor
- Posts: 1213
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 297 times
- Been thanked: 429 times
Re: Problem connecting to SSID
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
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