Author Topic: iOS Client unable to connect after weak WiFi  (Read 1217 times)

David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
iOS Client unable to connect after weak WiFi
« on: May 23, 2018, 01:41:09 PM »
Iím experiencing a bug that occurs after I unsuccessfully connect to my local host. e.g.
I try to connect too early during/after a WeatherCat restart, my phoneís connection to my WiFi is too weak.

After the failure to connect I wait and restart the app, but it doesnít matter how long I wait (hours) or how many times I restart the app, I am unable to connect to localhost.

The only way I am able to fix this is by connecting to a remote server (trixology or disable my WiFi and use LTE to connect to my WeatherCat server). After this successful connection, I enable wifi, connect to my closest AP, and then switch back to my localhost, which it finds immediately.


Sent from my iPhone using Tapatalk

The Grand Poohbah

  • Moderator
  • Strong Breeze
  • *****
  • Posts: 242
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: iOS Client unable to connect after weak WiFi
« Reply #1 on: May 23, 2018, 06:27:12 PM »
Iím experiencing a bug that occurs after I unsuccessfully connect to my local host. e.g.
I try to connect too early during/after a WeatherCat restart, my phoneís connection to my WiFi is too weak.

After the failure to connect I wait and restart the app, but it doesnít matter how long I wait (hours) or how many times I restart the app, I am unable to connect to localhost.

The only way I am able to fix this is by connecting to a remote server (trixology or disable my WiFi and use LTE to connect to my WeatherCat server). After this successful connection, I enable wifi, connect to my closest AP, and then switch back to my localhost, which it finds immediately.


Sent from my iPhone using Tapatalk

Can the benevolent overseers kindly move this to the About WeatherCatRCP 1.0 topic?

David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: iOS Client unable to connect after weak WiFi
« Reply #2 on: May 25, 2018, 07:19:16 PM »
GP,

This issue also occurs when Iím trying to connect to my RCP server through my public IP address via two different DDNS services. Today WeatherCat RCP failed to find my server using my ddns.net address until I successfully connected using my MikroTik DDNS. I restarted to app numerous times and that did not solve my issue.

ColdnFrosty

  • Gentle Breeze
  • **
  • Posts: 42
    • AS918
    • KNHSTRAT15
  • Station Details: Davis Vantage Pro 2
Re: iOS Client unable to connect after weak WiFi
« Reply #3 on: May 27, 2018, 03:00:29 AM »
Similar situation here. Although I can't confirm that it has anything to do with W-Fi.  I tried connecting through LTE from a remote location and no joy. Came home and tried again and no joy. I saw your post and tried connecting to trixology which was successfully. I then switched back to my IP and voila, the connection was made successfully.

Iím experiencing a bug that occurs after I unsuccessfully connect to my local host. e.g.
I try to connect too early during/after a WeatherCat restart, my phoneís connection to my WiFi is too weak.

After the failure to connect I wait and restart the app, but it doesnít matter how long I wait (hours) or how many times I restart the app, I am unable to connect to localhost.

The only way I am able to fix this is by connecting to a remote server (trixology or disable my WiFi and use LTE to connect to my WeatherCat server). After this successful connection, I enable wifi, connect to my closest AP, and then switch back to my localhost, which it finds immediately.


Sent from my iPhone using Tapatalk

jennajon

  • Gentle Breeze
  • **
  • Posts: 36
    • FW2882
    • KMEELLSW46-back from the dead for a time
    • Hallbrook Estates Personal Weather Station
  • Station Details: Davis Vantage Pro2 Plus, Solar and UV sensors, MAC 27 in. Retina,
Re: iOS Client unable to connect after weak WiFi
« Reply #4 on: June 02, 2018, 02:05:46 PM »
Same situation here.
ddns.net worked; now receiving error message that it can not be found AND server not verified, use a different server. Have tried uninstall and reinstall since app hangs, but that has not improved the outcome either. Local connects perfectly.
Using wireless ORBI mesh network. No security issues found, but did just update to MacOS HS 10.13.5.

 [rainyluck]

UPDATE:  IP address of MAC changed, once that was updated in port forwarding--connected to ddns with no further issues.  [woohoo]
Consider this entry SOLVED!!!!!! ThU5:-)

Blicj11

  • Storm
  • *****
  • Posts: 2925
    • EW3808
    • KUTHEBER6
    • Timber Lakes Utah
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIPô Data Logger | iMac (late 2013), 3.5 GHz Intel Core i7, 24 GB RAM, macOS High Sierra | Sharx SCNC2900 Webcam | Supportive Wife
Re: iOS Client unable to connect after weak WiFi
« Reply #5 on: June 04, 2018, 09:03:27 PM »
Good work, jennajon. The IP address of your Mac will be different depending on whether you connect to the network via wireless or ethernet cable. The correct IP address has to be included in Port Forwarding.
Blick


David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: iOS Client unable to connect after weak WiFi
« Reply #6 on: June 08, 2018, 12:54:32 PM »
My internal network is static, and I still have this issue.
UPDATE:  IP address of MAC changed, once that was updated in port forwarding--connected to ddns with no further issues.  [woohoo]
Consider this entry SOLVED!!!!!! ThU5:-)

David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: iOS Client unable to connect after weak WiFi
« Reply #7 on: June 08, 2018, 12:59:27 PM »
Similar situation here. Although I can't confirm that it has anything to do with W-Fi.

I no longer believe it has anything to do with WiFi, it happens in any situation where I had previously connected to a different network (i.e. LAN or WWW). Itís takes over two minutes at times for WeatherCat to resolve that it canít find my server before it allows me to choose the correct network/IP address.

The Grand Poohbah

  • Moderator
  • Strong Breeze
  • *****
  • Posts: 242
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: iOS Client unable to connect after weak WiFi
« Reply #8 on: June 08, 2018, 08:17:37 PM »
Similar situation here. Although I can't confirm that it has anything to do with W-Fi.

I no longer believe it has anything to do with WiFi, it happens in any situation where I had previously connected to a different network (i.e. LAN or WWW). Itís takes over two minutes at times for WeatherCat to resolve that it canít find my server before it allows me to choose the correct network/IP address.

Unfortunately, that seemingly eternal delay when one is attempting to connect to a bogus WeatherCat 3 server is not under the control of WeatherCatRCP. If there is any error in the URL or the server is not set up properly, it can take many minutes before the bad connection is reported. The process occurs deep in the bowels of the iOS, so quitting WeatherCatRCP prematurely is unlikely to resolve things.

David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: iOS Client unable to connect after weak WiFi
« Reply #9 on: June 08, 2018, 09:02:12 PM »
Unfortunately, that seemingly eternal delay when one is attempting to connect to a bogus WeatherCat 3 server is not under the control of WeatherCatRCP. If there is any error in the URL or the server is not set up properly, it can take many minutes before the bad connection is reported. The process occurs deep in the bowels of the iOS, so quitting WeatherCatRCP prematurely is unlikely to resolve things.

Is is possible to give users the option to select our server before the connection attempt initiates? This really cripples the use of the app whenever I switch networks. ~ Hopeful

David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: iOS Client unable to connect after weak WiFi
« Reply #10 on: June 08, 2018, 09:10:57 PM »
Similar situation here. Although I can't confirm that it has anything to do with W-Fi.  I tried connecting through LTE from a remote location and no joy. Came home and tried again and no joy. I saw your post and tried connecting to trixology which was successfully. I then switched back to my IP and voila, the connection was made successfully.

Grand Poobah, is this also related to iOS or is it something you are able to resolve?

The Grand Poohbah

  • Moderator
  • Strong Breeze
  • *****
  • Posts: 242
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: iOS Client unable to connect after weak WiFi
« Reply #11 on: June 12, 2018, 06:22:41 PM »
Is is possible to give users the option to select our server before the connection attempt initiates? This really cripples the use of the app whenever I switch networks. ~ Hopeful

Why select a server without initiating a connection? I don't understand. Please give me more detail about what you would like to do.

David

  • Gentle Breeze
  • **
  • Posts: 42
    • EW8863
    • KMDGLENB25
  • Station Details: Davis Vantage Pro 2 Plus
Re: iOS Client unable to connect after weak WiFi
« Reply #12 on: June 12, 2018, 08:29:07 PM »
Why select a server without initiating a connection? I don't understand. Please give me more detail about what you would like to do.

Right now, when the user is on a network that does not have a WC RCP server:
  • Start the App
  • App immediately attempts to connect to the last server.
  • The App is locked up "in the bowels of iOS" for about 2-3 minutes (in my experience), before it times out. (In order for this to work, the app must be left open, in the foreground, and the phone must be prevented from locking.)
  • After the connection attempt has timed out, the App asks the user to try to connect again or to connect to a different server.
  • User selects correct server
  • App connects to the server
[li]
[/li][/list]

The above takes 2-3 minutes and requires the user to keep WC RCP for iOS in the foreground while ensuring the phone doesn't lock until the connection attempt times out.

What I'm proposing:
  • Start the App
  • App asks which server to connect to
  • User selects the appropriate I.P. address/network/ddns
  • App connects to server

The above would take 1-2 seconds.

Having the app ask which server to connect to on startup (prior to attempting to connect to a server from a network the user is no longer on), could be a preference that the user could turn on or off. If a user only uses the app on one network they would likely turn this feature off. Users, such as myself, who use their app on multiple networks (local, Internet) would not have to leave the app open for 2-3 minutes every time they switch networks before being able to tell the app which I.P. address (local, Internet) to connect to.

If this explanation doesn't make sense, let me know and I'll create a video demonstrating the issue.

The Grand Poohbah

  • Moderator
  • Strong Breeze
  • *****
  • Posts: 242
  • Developer of WeatherCat for iOS, tvOS, and watchOS
    • EW6355 KCANEVAD43
    • Hopeful Hill Ranch
  • Station Details: Vantage Pro 2, aspirated, solar radiation, uv, soil temp and moisture
Re: iOS Client unable to connect after weak WiFi
« Reply #13 on: June 13, 2018, 05:17:13 PM »
    Why select a server without initiating a connection? I don't understand. Please give me more detail about what you would like to do.

    Right now, when the user is on a network that does not have a WC RCP server:
    • Start the App
    • App immediately attempts to connect to the last server.
    • The App is locked up "in the bowels of iOS" for about 2-3 minutes (in my experience), before it times out. (In order for this to work, the app must be left open, in the foreground, and the phone must be prevented from locking.)
    • After the connection attempt has timed out, the App asks the user to try to connect again or to connect to a different server.
    • User selects correct server
    • App connects to the server
    [li]
    [/li][/list]

    The above takes 2-3 minutes and requires the user to keep WC RCP for iOS in the foreground while ensuring the phone doesn't lock until the connection attempt times out.

    What I'm proposing:
    • Start the App
    • App asks which server to connect to
    • User selects the appropriate I.P. address/network/ddns
    • App connects to server

    The above would take 1-2 seconds.

    Having the app ask which server to connect to on startup (prior to attempting to connect to a server from a network the user is no longer on), could be a preference that the user could turn on or off. If a user only uses the app on one network they would likely turn this feature off. Users, such as myself, who use their app on multiple networks (local, Internet) would not have to leave the app open for 2-3 minutes every time they switch networks before being able to tell the app which I.P. address (local, Internet) to connect to.

    If this explanation doesn't make sense, let me know and I'll create a video demonstrating the issue.

    That makes a lot of sense. Thanks for the detail.

    The App doesn't know if you have left the network unless it attempts a connection. But you don't want it to automatically check for a connection, like it does now. For example, you leave the app open and the iPhone goes to sleep (the screen goes black). The App will ask you which server to use when it awakens. Another example is when you switch from the App to another app and then go back to the App. Again, the App will ask you which server to use when it awakens. This would have to be an option since many users would prefer the automatic connection. Are we on the right track?

    David

    • Gentle Breeze
    • **
    • Posts: 42
      • EW8863
      • KMDGLENB25
    • Station Details: Davis Vantage Pro 2 Plus
    Re: iOS Client unable to connect after weak WiFi
    « Reply #14 on: June 13, 2018, 07:07:38 PM »
    That makes a lot of sense. Thanks for the detail.

    The App doesn't know if you have left the network unless it attempts a connection. But you don't want it to automatically check for a connection, like it does now. For example, you leave the app open and the iPhone goes to sleep (the screen goes black). The App will ask you which server to use when it awakens. Another example is when you switch from the App to another app and then go back to the App. Again, the App will ask you which server to use when it awakens. This would have to be an option since many users would prefer the automatic connection. Are we on the right track?

    YES, EXACTLY! I agree; it would have to be an option, for the exact reason you stated.

    //break//

    Would it be possible to add this logic before the app asks which server to connect to:

    Following a successful connection to a RCP server (RCP_server_current), App polls and stores the device's current gateway IP address (gIP_sucess)
    Upon open/wake from sleep, App polls the device's current gateway IP address (gIP_current) and compares gIP_current with gIP_sucess
    If match
          connect to RCP_server_current.
    else
          ask user for RCP server


    If that's not possible, I'd still be thrilled with the option to have the app ask me every time which server to connect to.