Home/Support/Support Forum/Blink Link and Activity LED
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Blink Link and Activity LED

0 votes
Hi,

I've found the function in the NET+OS API reference NALedBlink() which is used to blink LEDs on my ConnectME 9210.

So far, the only LED I can get to blink is the green activity one at the network socket on the device itself, using BIT_2 as the 'leds' parameter of the function.

The problem with this is that any other network activity overrides the NALedBlink function and because of this, the LED appears to only blink with network activity, even though the NALedBlink function is still working.

Is there any way to temporarily disable this LED from its network activity function so as the effect of NALedBlink is visible?
And also, is it possible to use the other 'link' LED on the device with the NALedBlink function? I couldn't find the parameter for it.

Thanks
asked Aug 25, 2009 in NET+OS by adamp New to the Community (21 points)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

3 Answers

0 votes
The Link LED is tied to the Ethernet PHY, so you won't be able to use it as a custom LED.

If you want to, only temporairly, disable the Ethernet blink LED you'd need to modify the ethernet driver in src/bsp/devices/common/ethernet/eth_netos.c : naEthLEDMarkActivity and put something around the call to "NALedOn(LED_ETHERNET);"

i.E. maybe something like (where my_custom_eth_disable is declared in root.c in global space, and is initially set to zero):

extern int my_custom_eth_disable;

void naEthLEDMarkActivity(void)
{
if(!my_custom_eth_disable)
{
NALedOn(LED_ETHERNET);
eth_activity_ttl = ETH_ACTIVITY_TTL;
}
}
answered Aug 25, 2009 by charliek Veteran of the Digi Community (408 points)
0 votes
I'm a bit confused with your post.
So should I, modify src/bsp/devices/common/ethernet/eth_netos.c and change it to:

extern int my_custom_eth_disable;

void naEthLEDMarkActivity(void)
{
if(!my_custom_eth_disable)
{
NALedOn(LED_ETHERNET);
eth_activity_ttl = ETH_ACTIVITY_TTL;
}
}

and then in root.c I will be able to acess the variable my_custom_eth_disable?

Are there any other includes I would need to place in root.c?
answered Aug 26, 2009 by adamp New to the Community (21 points)
0 votes
It sounds like you got it.

In root.c all you need is:

int my_custom_eth_disable = 0;

and then just change the my_custom_eth_disable to 1 to stop the LED from working.
answered Sep 5, 2009 by charliek Veteran of the Digi Community (408 points)
...