OpenWrt Forum Archive

Topic: D-LINK DWL2640B and registered LED ( how to free registed gpio io ? )

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi,

I try to setup I2C on my dlink,
I try insmod i2c-gpio-custom bus0=0,4,5 but i've got an error -16, my gpio lines 4 and 5 are busy.

the gpio lines are driving the ppp led in red and green.

dmesg say on boot :
Registered led device: ppp
Registered led device: ppp-fail
I do not want those leds to be registered so my gpio lines will be free.

I use trunk repository and try to modify files to release these gpio lines, but with no success.
board : brcm63xx, firmware file : openwrt-DSL2640B-B2-squashfs-cfe.bin

Which file must i modify to leave these gpio lines free for my use ?

thanks in advance.

(Last edited by Flopsoft on 14 Feb 2013, 18:20)

gpio 4 and 5 were in fact not ppp related but internet on or off

So I edited the file : openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-brcm63xx/linux-3.7.7/arch/mips/bcm63xx/boards

in the section matching my board ( board_96348_D4PW ) I remove the led definition for gpio 4 and 5.

but no result, i've got i2c-gpio: probe of i2c-gpio.0 failed with error -16....
( and always messages in boot : Registered led device: ppp, Registered led device: ppp-fail )



Noone has got a clue for me ?

edit : I also edited the file config-3.8 in trunk/target/linux/brcm63xx to put a # before CONFIG_LEDS_GPIO=y

(Last edited by Flopsoft on 15 Feb 2013, 09:03)

opkg uninstall kmod-leds-gpio

thanks for your response,

your command does not work, i tried instead : opkg remove kmod-leds-gpio

reply : no packages removed

here is the list of my installed packages :

base-files - 43.32-r29592
busybox - 1.15.3-3.4
crda - 1.1.1-1
dnsmasq - 2.55-6.1
dropbear - 0.53.1-5
firewall - 2-34.8
gpioctl - 1.0-1
hotplug2 - 1.0-beta-3
iptables - 1.4.6-3.1
iptables-mod-conntrack - 1.4.6-3.1
iptables-mod-nat - 1.4.6-3.1
iw - 0.9.22-2
kernel - 2.6.32.27-1
kmod-b43 - 2.6.32.27+2011-11-15-1
kmod-cfg80211 - 2.6.32.27+2011-11-15-1
kmod-crc-ccitt - 2.6.32.27-1
kmod-crypto-aes - 2.6.32.27-1
kmod-crypto-arc4 - 2.6.32.27-1
kmod-crypto-core - 2.6.32.27-1
kmod-ipt-conntrack - 2.6.32.27-1
kmod-ipt-core - 2.6.32.27-1
kmod-ipt-nat - 2.6.32.27-1
kmod-ipt-nathelper - 2.6.32.27-1
kmod-mac80211 - 2.6.32.27+2011-11-15-1
kmod-ppp - 2.6.32.27-1
kmod-pppoe - 2.6.32.27-1
kmod-switch - 2.6.32.27-4
libc - 0.9.30.1-43.32
libgcc - 4.3.3+cs-43.32
libip4tc - 1.4.6-3.1
libiwinfo - 18
libiwinfo-lua - 18
liblua - 5.1.4-7
libnl-tiny - 0.1-1
libuci - 12012009.7-4
libuci-lua - 12012009.7-4
libxtables - 1.4.6-3.1
lua - 5.1.4-7
luci - 0.10.0-1
luci-app-firewall - 0.10.0-1
luci-i18n-english - 0.10.0-1
luci-lib-core - 0.10.0-1
luci-lib-ipkg - 0.10.0-1
luci-lib-lmo - 0.10.0-1
luci-lib-nixio - 0.10.0-1
luci-lib-sys - 0.10.0-1
luci-lib-web - 0.10.0-1
luci-mod-admin-core - 0.10.0-1
luci-mod-admin-full - 0.10.0-1
luci-proto-core - 0.10.0-1
luci-proto-ppp - 0.10.0-1
luci-sgi-cgi - 0.10.0-1
luci-theme-base - 0.10.0-1
luci-theme-openwrt - 0.10.0-1
mtd - 13
opkg - 576-2
ppp - 2.4.4-16.1
ppp-mod-pppoe - 2.4.4-16.1
uci - 12012009.7-4
udevtrigger - 106-1
uhttpd - 28
wireless-tools - 29-4
wpad-mini - 20111103-2

(Last edited by Flopsoft on 15 Feb 2013, 13:31)

Sorry I couldn't help.
I've wondered about the different build design of BCM vs. AR7 before. I can find stuff for AR71xx via dead code analysis, but BCM seems to have profiles and all sorts of stuff that makes it difficult to read (unless you go through a compile).

openwrt/trunk/build_dir/target-mips_uClibc-0.9.33.2/linux-brcm63xx/linux-3.7.7/arch/mips/bcm63xx/boards

Is this still the edited version after you compile? Or is it replaced by a make script?

the file remain edited after I compile.

can you share the edit? (Hopefully by me commenting, someone who knows sh*t will follow up)!

Thanks for making this topic upped wink

here is the part I edited :

static struct board_info __initdata board_96348_D4PW = {
    .name                = "D-4P-W",
    .expected_cpu_id        = 0x6348,

    .has_enet1            = 1,
    .has_pci            = 1,
    .has_uart0             = 1,

    .enet1 = {
        .has_phy        = 1,
        .phy_id            = 0,
        .force_speed_100    = 1,
        .force_duplex_full    = 1,
    },

    .leds = {
        {
            .name        = "D-4P-W:green:power",
            .gpio        = 0,
            .active_low    = 1,
        },
        {
            .name        = "D-4P-W::status",
            .gpio        = 3,
            .active_low    = 1,
        },
    },

    .buttons = {
        {
            .desc        = "reset",
            .gpio        = 7,
            .active_low    = 1,
            .type        = EV_KEY,
            .code        = KEY_RESTART,
            .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
        },
    },
};

I simply removed all concerning gpio 4 and gpio 5

I think led and gpio are defined elsewhere but I don't find where, If only someone could say me how to disable all led control, it would be enough. I don't care of led !

(Last edited by Flopsoft on 15 Feb 2013, 17:35)

I bricked this router last at night....

but I retried with a DSL-2542B with image for : openwrt-DSL2640B-B2-squashfs-cfe.bin
( I had modified option to remove all wifi related stuff and ppp support )

and it works.

I will try to unbrick the other router so as to try with all ppp packages uninstalled.

Flopsoft: are you posting in the right thread?
How is this relevant?

robthebrew wrote:

Flopsoft: are you posting in the right thread?
How is this relevant?

Don't know if this is the right thread !
The main question were to know which file modifying so I can use I2C. This is a question for developpers ?

My last post says that the problem can be related to wireless or ppp packages.

The discussion might have continued from here.