How to Debug App stuck in Communicating

General support questions and discussions.

How to Debug App stuck in Communicating

Postby me_rubin » Sat Mar 01, 2014 12:07 pm

HELP.. MyDoorOpener App gets Stuck Communicating...

For the most part, my opener is working. I've now got it working inside and outside my local wifi with the port forwarding now all figured out thanks to this support team! :)
Now I'm working to get it more robust.

Sometimes at startup, it misses the first press to Open. Normally this is right after I have uploaded the arduino. (pressing it again it seems to get it on the second try)

The most annoying thing that happens after sometimes just 5-15 minutes of time with the app on it gets stuck in the
"Communicating" cycle. The app never times out but just stays there circling around.
Image

The only way to stop is the kill the process (hit home twice) and whisks away, then restart. Once this restarts, the app seems to reset and show normal communication.

Since it does not happen all the time, I'm at a loss as how to troubleshoot the App. Are there any diagnostics I can turn on to see what it is waiting for? When it is hung up, I've tried pressing all the buttons and putting my fingers on the config button but nothing happens. The open/close buttons again never appear just hung.

I've looked at the my router's log to see if the app is sending anything while in this mode by looking for inbound packets destined for Port 81 which is what I'm using.

Normally I see a packet sent every 10 seconds when it runs. Once it gets into this mode the packets stop sending. So it stuck and locked up.
Anyway; has anyone had this issue? How do you debug the App side? Thanks for your help!

Mike
me_rubin
 
Posts: 7
Joined: Sat Jan 25, 2014 9:04 am

Re: How to Debug App stuck in Communicating

Postby support » Sun Mar 02, 2014 11:20 am

Hi Mike,

That behaviour is odd, because we use a 15 seconds timeout value to avoid just that ... Never experienced
this before. Unfortunately, iOS is kinda closed, so there isn't much that can be done on your side to "debug"
the app workflow, but ... out of curiosity, do you have:

a) multiple controllers configured ?
b) live web cameras configured ?

If you do, would it be possible for you to change your configuration and remove those (one at a time) to
to see if you can isolate the cause for this behaviour.

Thanks,
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: How to Debug App stuck in Communicating

Postby me_rubin » Sun Mar 02, 2014 12:06 pm

I have One controllers and 2 devices 2 camera's. The app does not talk to the camera's it only gets pictures from a site. The URL I have linked is one of my shares up on a hosted website.
The camera's FTP an image up to my FTP site on a godaddy server. The refresh on the camera image is every 5 seconds. since the app is going to another server I don't see that packet pass back to my home router.

I run the app from both my ipad and Iphone.
I am going to do a better job of documenting what I have in the projects section now that it is finished. Also I have an IPAD and a IPHONE.

I can have them both running at the same time opening up one door with one and closing it with the other and my iphone might hang up but the ipad keeps working. It is strange. I have not seen a pattern.

I guess the question are for you when the communicating box appears. Is there some other watchdog timer waiting for a hang to cause it to reset? I really only get a time-out when my arduino is not turned on.

I will do some test with various combinations of one or two devices. and disconnect the link to the images.

Thanks,

Mike
me_rubin
 
Posts: 7
Joined: Sat Jan 25, 2014 9:04 am

Re: How to Debug App stuck in Communicating

Postby support » Mon Mar 03, 2014 9:05 am

Even though the images are not being obtained from the Arduino, they are fetched using another iOS thread
and that might be what's causing that HUD (Communicating...) not to come down (for some reason?) ...

Thanks. Keep us posted on your findings.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm

Re: How to Debug App stuck in Communicating

Postby FACE » Thu Mar 13, 2014 9:32 am

I'm not sure if this will 100% apply to your problem, but I had a similar issue where it would hang the same as yours.
In the MDO app, you have the ability to set the time on when you want it to refresh the door status; 1,2,3,4 seconds, etc.
At first, I had it set to 5 seconds for no particular reason as at the time, I didn't know what it was even for exactly.
What was happening, is I would hit the OPEN door button and the door would start to open. While it was physically opening,
because I had the refresh set to 5 seconds, it would hang at that point like yours. What I ended up doing is timing the door to see
exactly how long it takes to open or close. It took 11 seconds. So at that point I changed the refresh time to 12 seconds.
Once I did that, I had no more hanging of the app. Again, I don't know if this will apply to your problem, but it was a similar
situation to what I had and this is how I fixed mine. I hope I didn't make this to confusing.. :)
FACE
 
Posts: 24
Joined: Thu Jan 02, 2014 9:14 pm

Re: How to Debug App stuck in Communicating

Postby me_rubin » Mon Mar 17, 2014 2:30 am

support wrote:Even though the images are not being obtained from the Arduino, they are fetched using another iOS thread
and that might be what's causing that HUD (Communicating...) not to come down (for some reason?) ...

Thanks. Keep us posted on your findings.

Could the system either lock file for exclusive use or rename to another file prior to using to download?
What I'm thinking is the camera is trying to upload another picture while you after downloading from iOS
me_rubin
 
Posts: 7
Joined: Sat Jan 25, 2014 9:04 am

Re: How to Debug App stuck in Communicating

Postby support » Mon Mar 24, 2014 7:29 pm

First off, sorry for the delay in getting back ...

Agree with FACE. You should set your auto-refresh delays to values that aren't too small. If you have values
that are too small, you may end up in situations where a first refresh isn't completed while a second one is
initiated and that could (in some odd cases) produce application hangs although there is some built-in logic
that should prevent this from happening. But just to be sure/safe, don't put values that are too aggressive/low.
support
Site Admin
 
Posts: 384
Joined: Thu Aug 22, 2013 7:30 pm


Return to Support



cron