Author Topic: WiThrottle disconnect on background  (Read 938 times)

0 Members and 1 Guest are viewing this topic.

dvescovoi

  • Posts: 9
  • Respect: 0
WiThrottle disconnect on background
« on: January 08, 2024, 07:52:09 AM »
0
A really annoying bug in the WiThrottle iPhone app is the fact that it disconnects when it goes background (like when you switch to take a photo).
I informed the developer about this but they did not seem too interested in fixing it. Gave me the line that it is a "safety" feature.
I do not buy it, as a mobile developer myself I know for a fact it is quite simple to add the "keep connect alive" while in background.
This can be set as a true/false option in the app settings and can be defaulted to disconnect. This still gives the user the option to set it either way.
Some other iPhone based throttles don't seem to have the same issue.

greenwizard88

  • Crew
  • *
  • Posts: 290
  • Respect: +63
Re: WiThrottle disconnect on background
« Reply #1 on: January 08, 2024, 08:08:07 AM »
0
The iOS operating system doesn't allow for long running background tasks. A developer could keep a socket open, but iOS is likely to kill it at any point after a few seconds. A socket that isn't shut down properly can cause more confusion for JMRI and operators than disconnecting and later reconnecting.

If you're aware of an api that can be used, please link the docs to me because if love to implement that keep alive feature into my own app.


greenwizard88

  • Crew
  • *
  • Posts: 290
  • Respect: +63
Re: WiThrottle disconnect on background
« Reply #3 on: January 08, 2024, 08:53:43 PM »
0
Yes, that's examples of a background tasks, and the second link is how to implement it. It doesn't actually talk about what a background task is though. For that, let me link this page - https://developer.apple.com/documentation/backgroundtasks/choosing-background-strategies-for-your-app

It goes over all of the methods to run an app like WiThrottle in the background, and none of them are relevant. They will run sporadically, and at most for 30 seconds before being killed by the OS. There's a reason iPhones have such great battery life, and the inability to run in the background is one of the biggest reasons why.

The closest way you can run mimic an actual background process is if you play a silent audio file, which will keep the app alive and able to communicate with the internet - such as what Spotify does - but if a developer does that, the throttle will override any music you have playing. That's not a good experience.

bbunge

  • Crew
  • *
  • Posts: 234
  • Respect: +317
Re: WiThrottle disconnect on background
« Reply #4 on: January 10, 2024, 10:36:26 AM »
+1
From this user's perspective, the simple answer is to use either an old phone or ipad as the throttle.  Many have old phones just laying around, or they can be had easy enough.  I had found through experience when my phone was attached to the layout wifi, it wouldn't always get text messages.

Bob

peteski

  • Crew
  • *
  • Posts: 32958
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5341
    • Coming (not so) soon...
Re: WiThrottle disconnect on background
« Reply #5 on: January 10, 2024, 10:49:39 AM »
0
From this user's perspective, the simple answer is to use either an old phone or ipad as the throttle.  Many have old phones just laying around, or they can be had easy enough.  I had found through experience when my phone was attached to the layout wifi, it wouldn't always get text messages.

Bob

Well, I hope someone here tells me how to get WiThrottle installed on couple of almost-new perfectly serviceable iPhone5s'.  App store just says that the old iPhone is too old for the WiThrottle app and refuses to install it.  It does not offer or allow for an older compatible version of the app to be installed.

I even contacted the WiThrottle developer about this and the procedure he gave me to use did not work either.  So I still have couple of perfectly serviceable smart phones that are useless as WiThrottles!  This Apple world sucks! Seems that in this quest to only use the latest and greatest, they have the whole world by the short and curlys!
. . . 42 . . .

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: WiThrottle disconnect on background
« Reply #6 on: January 10, 2024, 10:55:30 AM »
0
From this user's perspective, the simple answer is to use either an old phone or ipad as the throttle.  Many have old phones just laying around, or they can be had easy enough.  I had found through experience when my phone was attached to the layout wifi, it wouldn't always get text messages.

This. I've been more or less "collecting" retired iPhones from family members for throttles. Yeah, you have to put up with the "no service" and "no SIM" nags when you wake them up, but if you're using them only as throttles and don't flip around to other apps, backgrounding is not an issue.

I wouldn't use an active iPhone as a throttle except for momentary testing purposes. Too many apps vie for your attention and interrupt, whether you want them to or not. Frankly, I think allowing the throttle app to run trains backgrounded is a bad idea.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: WiThrottle disconnect on background
« Reply #7 on: January 10, 2024, 11:27:39 AM »
0
Well, I hope someone here tells me how to get WiThrottle installed on couple of almost-new perfectly serviceable iPhone5s'.  App store just says that the old iPhone is too old for the WiThrottle app and refuses to install it.  It does not offer or allow for an older compatible version of the app to be installed. ...

Apple's business model since Jobs died is to twiddle with the software and support for your (expensive!) devices to make them inoperable or otherwise unusable after X years (X≅5) so you are forced to buy new ones. The App Store has you by the short-and-curlies since there is no easy - as you've found - ability to get around their gatekeeper. This is the "advantage" of Alphabet's sloppy administration of their app market, but the ability to do an end run around the Android app police also has malware consequences.

Personally, I've had plenty of time operating with WiThrottle and I don't care for it, probably because I don't like touchscreens in situations where a knob or other electromechanical operator provides tactile feedback ("haptic" is a bunch of hooey). TCS's WiFi throttles are the cat's meow - I have a UWT-50 and -100 - and I only keep the dozen or so retired iPhones in the charging rack for guest operators... provided I ever have any.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

John

  • Administrator
  • Crew
  • *****
  • Posts: 13394
  • Respect: +3255
Re: WiThrottle disconnect on background
« Reply #8 on: January 10, 2024, 12:36:02 PM »
0
Set up a session to jfrt.   Maybe they will come

dvescovoi

  • Posts: 9
  • Respect: 0
Re: WiThrottle disconnect on background
« Reply #9 on: January 10, 2024, 01:01:04 PM »
0
Having been a software developer for going on 40+ years I have heard all the political BS comments "I hate xxx because.." fill in the blank Microsoft, Apple, Google etc.

I have been using multiple phones for what I am trying to do.
By the way Loccontrol iPhone app does allow access to the camera while using the throttle. ... has other issues but better than nothing.

I have integrated small track powered spy cameras into my locomotives and live stream the video so I can get an engineers POV while operating.
All this works just fine and I can live cast the video to a big screen TV while operating.

A lot of the limitations stems from the original Android OS paradigm (of which Apple has its roots) that only one foreground app needs to run at a time. Time marches on and newer phones have slowly migrated to the PC multitasking OS paradigm for apps. Easy enough to do with today's powerful cell phone chips.

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: WiThrottle disconnect on background
« Reply #10 on: January 10, 2024, 01:32:57 PM »
0
Having been a software developer for going on 40+ years I have heard all the political BS comments "I hate xxx because.." fill in the blank Microsoft, Apple, Google etc.

I'll raise you by 10 years. I was coding for NASA in 1972. I have a Whitesmiths manual in a box somewhere (I'm long retired out of the biz). Was a big Apple supporter and developer until they deprecated QuickTime the way they did, and it went downhill from there.

Did the live-stream thing three years ago: https://vimeo.com/manage/videos/507297940

Backgrounding WiThrottle is a bad idea unless your objective is dumping $100s worth of models on the floor.

Carry on.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

C855B

  • Crew
  • *
  • Posts: 10869
  • Respect: +2418
Re: WiThrottle disconnect on background
« Reply #11 on: January 10, 2024, 01:41:36 PM »
0
Set up a session to jfrt.   Maybe they will come

I may as well live on an island. Closest potential operators (that I know and would trust) are 80-100 miles away. But nothing ventured, nothing gained, I guess. Maybe I should reprioritize MRR time to finishing some operating areas (mostly making turnouts live) on the layout and invite a session this spring.
...mike

http://www.gibboncozadandwestern.com

Note: Images linked in my postings are on an HTTP server, not HTTPS. Enable "mixed content" in your browser to view.

There are over 1000 images on this server. Not changing anytime soon.

peteski

  • Crew
  • *
  • Posts: 32958
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5341
    • Coming (not so) soon...
Re: WiThrottle disconnect on background
« Reply #12 on: January 10, 2024, 01:54:25 PM »
0
Personally, I've had plenty of time operating with WiThrottle and I don't care for it, probably because I don't like touchscreens in situations where a knob or other electromechanical operator provides tactile feedback ("haptic" is a bunch of hooey). TCS's WiFi throttles are the cat's meow - I have a UWT-50 and -100 - and I only keep the dozen or so retired iPhones in the charging rack for guest operators... provided I ever have any.

I also don't care for the smart phone throttles, but they are perfect for my NTRAK club when we run trains at model train shows. We have Digitrax DCC and their WiFi LocoNet interface.   The club doesn't own many wireless Digitrax thottles, so those iPhones would come in very handy (and cheap, as in "free").  They are also perfect to hand to some spectator kids to run a train or two.  Kids are at home with smart devices, and to be honest I also prefer a WiThrottle to the awkward Digitrax throttles with those endlessly spinning knobs and non-intuitive way to acquire locomotives.

I found a more generic throttle in the app store whiuch installs on iPhone5, but it is really sucky.  I need to  find a way to get an older version of WiThrottle to install on the iPhone5s.
« Last Edit: January 10, 2024, 05:18:14 PM by peteski »
. . . 42 . . .

dvescovoi

  • Posts: 9
  • Respect: 0
Re: WiThrottle disconnect on background
« Reply #13 on: January 10, 2024, 03:06:26 PM »
0
Quote
Backgrounding WiThrottle is a bad idea unless your objective is dumping $100s worth of models on the floor.
Thats why it should be a user settable option.  :)  ... and yes I know the battery implications.
« Last Edit: January 10, 2024, 04:39:53 PM by dvescovoi »

Carolina Northern

  • Crew
  • *
  • Posts: 222
  • Gender: Male
  • Respect: +35
Re: WiThrottle disconnect on background
« Reply #14 on: January 11, 2024, 08:49:30 AM »
+2
How about finding some old android phones and running Engine Driver? Steve updates it regularly and is open to suggestions. I don't use it often, but I like working with someone who cares about users and the way they use the app.

I recently updated the old phones my wife and I use. My Pixel 3 lasted over five years, the battery is still strong, but is out of support, so it was time for an upgrade.
In a side by side, the Pixel worked better than an iPhone 15 Pro. I was ready to switch to an iPhone just to be compatible with the majority of people in my neighborhood, but the Pixel ran circles around what I was offered. The good news is I ended up with two new throttles.

I've gotten a lot of grief from others in my friend circle for not using Apple, but I'm much happier without supporting a company that treats it's customers the way Apple does.

Just my two cents worth.

« Last Edit: January 11, 2024, 03:15:34 PM by Carolina Northern »