# Blink Link and Activity LED

**URL:** https://forums.digi.com/t/blink-link-and-activity-led/3583
**Category:** NET+OS
**Tags:** ethernet-led-activit, led-blink
**Created:** [August 25, 2009, 3:27pm UTC](https://forums.digi.com/t/blink-link-and-activity-led/3583 "2009-08-25T15:27:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![adamp](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@adamp](https://forums.digi.com/u/adamp)
#### Post date: [August 25, 2009, 3:27pm UTC](https://forums.digi.com/t/blink-link-and-activity-led/3583/1 "2009-08-25T15:27:34Z")

</div>

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

---

<div class="post-metadata">

### Author: ![charliek](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@charliek](https://forums.digi.com/u/charliek)
#### Post date: [August 25, 2009, 6:41pm UTC](https://forums.digi.com/t/blink-link-and-activity-led/3583/2 "2009-08-25T18:41:17Z")

</div>

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;  
}  
}

---

<div class="post-metadata">

### Author: ![adamp](https://avatars.discourse-cdn.com/v4/letter/a/b19c9b/32.png) [@adamp](https://forums.digi.com/u/adamp)
#### Post date: [August 26, 2009, 9:03am UTC](https://forums.digi.com/t/blink-link-and-activity-led/3583/3 "2009-08-26T09:03:15Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![charliek](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@charliek](https://forums.digi.com/u/charliek)
#### Post date: [September 5, 2009, 6:09pm UTC](https://forums.digi.com/t/blink-link-and-activity-led/3583/4 "2009-09-05T18:09:31Z")

</div>

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.
