Topic: DIR-300 B1 LEDs

Hello,
my DIR-300B1 was unable to control WAN led indicator, so I decided to fix this.
The only bad thing after patch - it dosnt light WAN led on cable plug at all, you need to set it manually via  /sys/class/leds/d-link:amber:wan/brightness or  /sys/class/leds/d-link:green:wan/brightness via script or luci leds triggers.

...
#define DIR_300B_GPIO_LED_WAN_AMBER    14
#define DIR_300B_GPIO_LED_WAN_GREEN    12
...

...
    , {
        .name        = "d-link:amber:wan",
        .gpio        = DIR_300B_GPIO_LED_WAN_AMBER,
        .active_low    = 1,
    }, {
        .name        = "d-link:green:wan",
        .gpio        = DIR_300B_GPIO_LED_WAN_GREEN,
        .active_low    = 1,
    },
...

these changes go to https://dev.openwrt.org/browser/trunk/t … 300-revb.c
sorry, I dont know how to exactly create a patch, so I'll post just changes and somebody maybe formalize if find it useful.

Re: DIR-300 B1 LEDs

This is a bit lengthy and concentrates on GIT, but I think there was a small section for the program "patch" as well in it:

http://www.youtube.com/watch?v=LLBrBBImJt4

(You dont need flash to watch it, there is 720p WebM version of the video: http://www.youtube.com/html5)

Re: DIR-300 B1 LEDs

Oh, thats how unix-way works - you watch 40minutes lecture to make one 1kb patch.. tongue
I know how to diff two files, but no idea how the resulting patch will fit in openwrt's own building infrastructure.
Anyways, thank you.

Re: DIR-300 B1 LEDs

http://patchwork.midlink.org/project/openwrt/list/

I am sure there is better introduction/manual for "patch" then this video, it' simply something that popped into my head.

Re: DIR-300 B1 LEDs

why the dir-300 revb developer doesn't repair this led issue.
i cannot understand! they do not brower form?

DIR-300 B1G
RT3050F
4M Flash
32M RAM

Re: DIR-300 B1 LEDs

There are more important issues than making the shiny leds blink, like making stuff work at all.
If there is no ticket yet, make one. If there is one already then wait.

Re: DIR-300 B1 LEDs

I included the fix in my local trunk and ran "make". After that I upgraded my router with the latest build, but I can not control the wan leds:

root @ OpenWrt /sys/class/leds # ll
drwxr-xr-x    2 root     root           0 Jan  1  1970 .
drwxr-xr-x   17 root     root           0 Jan  1  1970 ..
lrwxrwxrwx    1 root     root           0 Jan  1  1970 d-link:amber:status -> ../../devices/platform/leds-gpio/leds/d-link:amber:status
lrwxrwxrwx    1 root     root           0 Jan  1  1970 d-link:blue:wps -> ../../devices/platform/leds-gpio/leds/d-link:blue:wps
lrwxrwxrwx    1 root     root           0 Jan  1  1970 d-link:green:status -> ../../devices/platform/leds-gpio/leds/d-link:green:status
lrwxrwxrwx    1 root     root           0 Jan  1  1970 rt2800pci-phy0::assoc -> ../../devices/platform/rt2800_wmac.0/leds/rt2800pci-phy0::assoc
lrwxrwxrwx    1 root     root           0 Jan  1  1970 rt2800pci-phy0::quality -> ../../devices/platform/rt2800_wmac.0/leds/rt2800pci-phy0::quality
lrwxrwxrwx    1 root     root           0 Jan  1  1970 rt2800pci-phy0::radio -> ../../devices/platform/rt2800_wmac.0/leds/rt2800pci-phy0::radio

Do I need to include special packages into my image to make this work?

Re: DIR-300 B1 LEDs

Has somebody tried this fix? Are there any other results then mine?