Problem connecting to SSID

For general Flowcode discussion that does not belong in the other sections.
Post Reply
wayne_millard
Posts: 94
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 6:12 pm
Has thanked: 1 time
Been thanked: 9 times

Flowcode v9 Problem connecting to SSID

Post 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
Attachments
RTC_ESP32.fcfx
(19.05 KiB) Downloaded 38 times

mnfisher
Valued Contributor
Posts: 1008
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 106 times
Been thanked: 522 times

Re: Problem connecting to SSID

Post 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

wayne_millard
Posts: 94
Joined: Fri Dec 04, 2020 6:12 pm
Has thanked: 1 time
Been thanked: 9 times

Re: Problem connecting to SSID

Post 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

mnfisher
Valued Contributor
Posts: 1008
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 106 times
Been thanked: 522 times

Re: Problem connecting to SSID

Post 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

chipfryer27
Valued Contributor
Posts: 1203
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 289 times
Been thanked: 424 times

Re: Problem connecting to SSID

Post 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

wayne_millard
Posts: 94
Joined: Fri Dec 04, 2020 6:12 pm
Has thanked: 1 time
Been thanked: 9 times

Re: Problem connecting to SSID

Post 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

chipfryer27
Valued Contributor
Posts: 1203
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 289 times
Been thanked: 424 times

Re: Problem connecting to SSID

Post 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

Post Reply