Trixology

WeatherCat => WeatherCat iOS Clients => Topic started by: David on May 23, 2018, 01:41:09 PM

Title: iOS Client unable to connect after weak WiFi
Post by: David 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
Title: Re: iOS Client unable to connect after weak WiFi
Post by: The Grand Poohbah 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?
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: ColdnFrosty 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
Title: Re: iOS Client unable to connect after weak WiFi
Post by: jennajon 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:-)
Title: Re: iOS Client unable to connect after weak WiFi
Post by: Blicj11 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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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:-)
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: The Grand Poohbah 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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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?
Title: Re: iOS Client unable to connect after weak WiFi
Post by: The Grand Poohbah 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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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:
[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:

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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: The Grand Poohbah 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?
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David 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.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: Blicj11 on June 13, 2018, 07:45:46 PM
My 2? for what it's worth, I think David's suggestion would be a major improvement if it is possible to implement. The few minutes waiting for a timeout seems like forever, even though it's not, and one has to keep fiddling with the iPhone to keep it from going to sleep whilst waiting for the timeout to occur.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: The Grand Poohbah on June 16, 2018, 06:04:34 PM
Quote
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

I've spent some time looking into this and found some examples of how to get the router IP address in objective c. It's not pretty. I'll keep investigating.
Title: Re: iOS Client unable to connect after weak WiFi
Post by: David on June 16, 2018, 06:06:21 PM
Greatly appreciated!