View Full Version : Link Quality Ranger
advantage-tim
05-23-2008, 05:59 PM
Here's a link quality ranger I did for the "proto" board - it turns the green LED on (LED1) for a "power" light, then turns the amber LED (LED2) on whenever the link quality is greater than 25%; when the quality falls off it turns the LED off - useful for testing the "multi-hop" transmission capabilities.
kbanks
05-28-2008, 09:44 AM
Thanks for the contribution!
Glancing over your source code reminded me of a tip... if you use doc-strings instead of comments in certain places in your scripts, you will get automatic tool-tips within Portal.
For example, in one place in your script you have:
def remoteLQ():
#Called from remote end
global lqSum, lqCount, lqTimeout
If you did this instead...
def remoteLQ():
"""Called from remote end"""
global lqSum, lqCount, lqTimeout
...then in the "function tree" portion of the Node Info window, you would get a tooltip "Called from remote end" when you hovered the mouse over the remoteLq() function.
A similiar technique works up at the top of the script. Try adding something like the following to the top of your script:
"""
This script is an adaptation of the original LoopQualityRanger.py for the SN171 Proto Board. Since the Proto Board has no seven-segment display, blah blah blah
"""
This text will appear as a Portal tooltip when you hover the mouse over the name of the script.
danny.galyean
05-28-2008, 09:47 AM
Nice script Tim. I have already downloaded and will include in my demos!
korda
12-14-2008, 11:03 PM
Tim,
I understood that the script is intended for use on both ends?
Did you test you test it on multiple nodes? What is max number of nodes you can have pinging each other before clogging up channel?
I see that you sending mcastrpc() every 0.1 sec.
I think this code will not work for more then 10 nodes (my guess, since I do not know actual time needed to send message out).
advantage-tim
01-14-2009, 12:10 PM
I've only tested it with a couple of nodes (maybe three) ... Sorry for the delay in responding, I had lost my bookmark on this forum and forgot to check...
danny.galyean
01-14-2009, 12:19 PM
Shame on you Tim! One should never loose the bookmark to our forum - -at least that is the way we look at it. :)
The Link Quality Ranger was only designed as is, to be run between 2 devices. If you run multiple devices you will generate a lot of network traffic, and in addition, you won't know what device your are seeing the link quality of so it then becomes somewhat pointless to do mutilple devices.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.