Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Would this be a better Roaming Option?
This thread has 9 replies. Displaying all posts.
Post 1 made on Thursday September 16, 2010 at 19:42
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
At the moment the Roaming on Pronto is done via a timer set by the user , most set it to 1 minute to look for a stronger connection.

But how about this.

Would it be better to do a script to check say when the Signal strength falls below 3 Bars ( on the Wifi icon) .

Comments ?
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
Post 2 made on Friday September 17, 2010 at 00:10
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Yes using the system event lisstener which was not available in prior releases you can do exctly what you state and it would be better if you consider event driven better than polled a a model for handling conditions (I do)
OP | Post 3 made on Friday September 17, 2010 at 01:03
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
so this would be the

system.getNetLinkStataus(level)

If level = "wifi-level3" or "wifi-level4"
wifiEnabled = false
Popup wiget // notify getting better wifi connection
// delay

wifiEnabled = true

would this code have to go into every Device or is there a way of making it golbal?
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
Post 4 made on Friday September 17, 2010 at 10:51
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
gopronto,

You have quite a few syntax errors above, especially in your if clause. Have you, by chance, consulted the web for logical 'or' in if clauses? Flanagan also discusses this.

The better approach is to add a System event listener (see the latest dev guide for an example).

You would add an event listener and when that event is raised and is something other than level 3 or level 4 you would turn off wifienabled.

You might want to do this in a library that using a checkbox on the system level, you could add to every activity.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 5 made on Friday September 17, 2010 at 23:41
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
Hi Lyndel

wasn't so much the code, but the theory on how it would work and if it would work :)
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
Post 6 made on Saturday September 18, 2010 at 03:33
PsyenceFact
Lurking Member
Joined:
Posts:
June 2010
8
I've just had a bit of a play with this and it all seems to work as expected. However, it does raise the question of how to deal with the situation of being in a low signal region and not having an alternative connection.

Adding an event listener as suggested by Barry results in a call to the specified function every time the network status changes. The function argument is a string containing the network interface status, exactly as would be returned by System.getNetlinkStatus(). You may then choose to restart the network if the signal is low as demonstrated by gopronto's quality code (although I believe you'd do so on wifi-level1 or wifi-level2).

If the signal is still low on reconnection, the event listener gets called again and the network gets restarted again...and so it goes on.

I suppose a timer could be added to the event listener to check how long since the last restart and only do another if it's been (for example) more than a minute.

Any other ideas on how to deal with this?

Andy
Post 7 made on Sunday September 19, 2010 at 00:38
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Andy,

That issue of timers is another thing that has been discussed more than once in this forum. if the remote is left undocked and can go to sleep. During sleep, the CPU is put to sleep and only wakes up every 50 or so seconds.

I suspect for a robust solution, you might want to use Activity.onSleep/onWake as well.

On another note: I have not done any testing to see if the network events are generated just prior to sleep or immediately after wakeup or even while unit is indeed asleep at which time wakeup is ONLY to keep network conn active.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 8 made on Sunday September 19, 2010 at 02:28
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
Andy

Itd much easer to over lap WiFi networks, so if the level are set in such a way that when you move to another room or outdoors, the wifi signal could be checked.
A timer would be A good option.

check sigal level if > than L2 // do nothing
if =< L2 wait for n Seconds check again // n could be a user setting
If signal still < L2 , Wifi Disable/enable
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
Post 9 made on Sunday September 19, 2010 at 07:49
PsyenceFact
Lurking Member
Joined:
Posts:
June 2010
8
Lyndel,

It doesn't look like network events are generated just prior to sleep or on wake-up. However, they do seem to occur if the network status changes during sleep. Presumably when the CPU periodically wakes the status is checked and an event fired if appropriate.

I suspect the most robust solution is to ensure you have good wifi coverage in the first place, but it's nice to know that there are options.

Andy
OP | Post 10 made on Monday September 20, 2010 at 19:04
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
On September 19, 2010 at 07:49, PsyenceFact said...
Lyndel,

It doesn't look like network events are generated just prior to sleep or on wake-up. However, they do seem to occur if the network status changes during sleep. Presumably when the CPU periodically wakes the status is checked and an event fired if appropriate.

I suspect the most robust solution is to ensure you have good wifi coverage in the first place, but it's nice to know that there are options.

Andy

Hi Andy

Good Wifi coverage isn't the problem, take this for example.

Large open plan house made of concrete, you can only put the access point in one place to cover:-
Area 1 Lounge , dinning room and Kitchin,
Area 2 Movie room next door with own AP,

Signal level in area 1 all good ( 4 to 5 bars) but taking the remote from area 1
in to Area 2 there is still enough signal to be connnect to Area 1 but will get command fail messages now again. , you can not use the reconnect when connection is lost , as connection isn't lost and if you do check connection every minute , you increase the "command fail" message.
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse