D-Link DIR-330

This device is NOT RECOMMENDED for future use with OpenWrt due to low flash/ram.
DO NOT BUY DEVICES WITH 4MB FLASH / 32MB RAM if you intend to flash an up-to-date and secure OpenWrt version onto it! See 4/32 warning for details.

1) This device does not have sufficient resources (flash and/or RAM) to provide secure and reliable operation.
This means that even setting a password or changing simple network settings might not be possible any more, rendering the device effectively useless. See OpenWrt on 4/32 devices what you can do now.

2) OpenWrt support for this device has ended in 2022.
19.07.10 was the last official build for 4/32 devices.

:!: D-Link DIR-330 and ASUS WL-500gP V1 have same OpenWrt/LEDE images and almost same hardware.

Version Launch Date OpenWrt Versions Supported Download latest stable version Model Specific Notes
A1 2007 15.05 & newer 15.05.1 Asus wl-500gP V1 image Wan port not working by default, see issues section. Cpu could be overclocked to 300MHz

:!: With firmware 1.20 100% works.

  1. Downgrade firmware to 1.20 by d-link utility
  2. Rename openwrt image to DIR330A1_FW123B20.bin
  3. Flash it via MAINTENANCE → Firmware Update
  1. Using the serial pinout shown below, gain access to serial console. The easiest way is to use an USB data cable for cellphone with USB-to-serial converter inside.
  2. Setup TFTP server accessible from the router via TCP/IP.
  3. Once in, power up the device, press and hold Ctrl-C until you see cfe prompt CFE>
  4. Plug the Ethernet cable into one of LAN ports. If your network have DHCP, type ifconfig eth0 -auto, otherwise type help ifconfig to see how to setup CFE networking.
  5. To flash new firmware, type the command
    flash -noheader 192.168.0.1:/tftp/firmware.trx flash1.trx

    .

Replace 192.168.0.1 with IP of your TFTP server, /tftp/firmware.trx with FULL path to your firmware on it. Whether you should specify full name or not, depends on your TFTP server. Pay attention that you type 1 in flash1.trx, otherwise you might wipe the CFE itself and your only way will be to JTAG.

  1. Reflashing will usually take 1 to 2 minutes depending on size of the firmware.
  2. When done and CFE> prompt appears again, issue command reboot
  1. Download d-link utility
  2. Turnoff router, hold button for while connecting power. Release button after ~30 sc
  3. Set your network connection to 192.168.0.10/255.255.255.0
  4. Run d-link utility, set Device IP 192.168.0.1 and User name: admin, Password: empty
Instruction set MIPS
Vendor Broadcom
bootloader cfe
System-On-Chip BCM5836P
CPU @Frq BCM4704 @264-300MHz
Flash size 8192 KiB
Flash Chip Spansion S29GL064A
RAM size 32 MiB
RAM Chips MIRA P2S28D40CTP
Wireless BCM4318 2.4GHz 802.11b/g
switch BCM5325E (Fast Ethernet, VLAN)
USB Yes 1 x 1.1
Serial Yes
JTAG Yes

port.serial general information about the serial port, serial port cable, etc.

How to connect to the Serial Port of this specific device:
Insert photo of PCB with markings for serial port

FIXME Replace EXAMPLE by real values.

Serial connection parameters
for D-Link DIR-330
EXAMPLE 115200, 8N1

port.jtag general information about the JTAG port, JTAG cable, etc.

How to connect to the JTAG Port of this specific device:
Insert photo of PCB with markings for JTAG port

Casing

DIR-330

USB-to-Serial converter (based on ARK3116S) attached

Board

DIR-330 mainboard

Unpopulated 14 pin header (J4) is the JTAG header. Another unpopulated JTAG header for the Wi-Fi chipset (J8) with 14 pin.

You can solder a Mini-PCI connnector just between the Wi-Fi chipset and the switch controller.

Sometimes mac could be erased and set to something like 00:90:4c:4f:00:0c You could find out default mac from the back of the router

nvram set et0macaddr=00:24:01:b1:51:d2 #your mac
nvram commit
reboot

You need to change switch config

via web interface

- change switch config :

VLAN ID CPU (eth0) LAN1 LAN2 LAN3 LAN4 LAN5
1 tagged untagged untagged untagged untagged off
2 tagged off off off off untagged

- for wan and wan6 change interface from “eth1” to “eth0.2”

via config file

/etc/config/network

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 5t'

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd74:a401:7a2e::/48'

config interface 'wan'
        option proto 'dhcp'
        option ifname 'eth0.2'

config interface 'wan6'
        option proto 'dhcpv6'
        option ifname 'eth0.2'
        option reqaddress 'try'
        option reqprefix 'auto'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ifname 'eth0.1'

In openwrt kmod_usb_ohci seems to cause problems. Try lede image, looks like it works.

Warning!
Entering wrong values can BRICK your device, making it unbootable!
This instruction for DIR-330 A1 (based on BRCM4704 SoC) ONLY. Check it twice!

You can overclock DIR-330 A1 from 264 to 300 MHz. In fact some routers based on BRCM4704 SoC are running on 300MHz by default, so BRCM 4704 SoC itself is designed to operate at this frequency. However, it is recommended to install heatsink to ensure system stability, because higher frequency means more heat. This will give you about 12% extra CPU horsepower with minimal efforts.

You'll need nvram package (included in default images).
To set 300MHz CPU frequency, execute as root the following commands:

nvram set clkfreq=300,150
nvram commit
reboot

This tells boot loader to use 300MHz frequency instead.
Once your device has rebooted, you can check it runs with higher clocks:

cat /proc/cpuinfo

Make sure it contains something like:
BogoMIPS : 298.01

(original value 262,96, Default clkfreq=264,132)

Bootlog from LEDE trunk (rev 5217), with fixed vlan config and overclocked cpu.

Decompressing...........done CFE version 1.0.37 for BCM947XX (32bit,SP,LE) Build Date: Tue Jan 16 20:33:15 CST 2007 (tony@macpaul-x60) Copyright (C) 2000,2001,2002,2003 Broadcom Corporation. Initializing Arena Initializing Devices. flash_init () : boot size initialize Boot partition size = 262144(0x40000) TOP type flash .. TOP type flash .. TOP type flash .. et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.131.35.4 rndis0: Broadcom USB RNDIS Network Adapter (P-t-P) et1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.131.35.4 CPU type 0x29006: 300MHz Total memory: 32768 KBytes Total memory used by CFE: 0x80300000 - 0x803A0C90 (658576) Initialized Data: 0x80336450 - 0x80338C60 (10256) BSS Area: 0x80338C60 - 0x8033AC90 (8240) Local Heap: 0x8033AC90 - 0x8039EC90 (409600) Stack Area: 0x8039EC90 - 0x803A0C90 (8192) Text (code) segment: 0x80300000 - 0x80336450 (222288) Boot area (physical): 0x003A1000 - 0x003E1000 Relocation Factor: I:00000000 - D:00000000 Device eth0: hwaddr 00-90-4C-4E-00-0C, ipaddr 192.168.0.2, mask 255.255.255.0 gateway not set, nameserver not set Loader:elf Filesys:tftp Dev:eth0 File:192.168.0.100:vmlinux Options:(null) Loading: Failed. Could not load 192.168.0.100:vmlinux: File not found Loader:raw Filesys:raw Dev:flash0.os File: Options:(null) Loading: .. 3864 bytes read Entry at 0x80001000 Closing network. Starting program at 0x80001000 [ 0.000000] Linux version 4.9.58 (gtrtfm@debian) (gcc version 5.5.0 (LEDE GCC 5.5.0 r5217-098afa1e1b) ) #0 Tue Oct 31 02:43:10 2017 [ 0.000000] CPU0 revision is: 00029006 (Broadcom BMIPS3300) [ 0.000000] bcm47xx: Using ssb bus [ 0.000000] ssb: Found chip with id 0x4704, rev 0x09 and package 0x00 [ 0.000000] ssb: Sonics Silicon Backplane found at address 0x18000000 [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 02000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes. [ 0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x0000000000000000-0x0000000001ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x0000000001ffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff] [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 [ 0.000000] Kernel command line: noinitrd console=ttyS0,115200 [ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes) [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Memory: 28364K/32768K available (3096K kernel code, 130K rwdata, 372K rodata, 168K init, 282K bss, 4404K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:128 [ 0.000000] MIPS: machine is D-Link DIR-330 [ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 12741736309 ns [ 0.000029] sched_clock: 32 bits at 150MHz, resolution 6ns, wraps every 14316557820ns [ 0.000129] Calibrating delay loop... 298.59 BogoMIPS (lpj=1492992) [ 0.070053] pid_max: default: 32768 minimum: 301 [ 0.070438] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.070497] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.078045] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.078128] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.079866] NET: Registered protocol family 16 [ 0.081409] Can't analyze schedule() prologue at 8030316c [ 0.126716] clocksource: Switched to clocksource MIPS [ 0.433444] PCI host bridge to bus 0000:00 [ 0.433531] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff] [ 0.433589] pci_bus 0000:00: root bus resource [io 0x0100-0x07ff] [ 0.433646] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] [ 0.433700] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff] [ 0.433875] ssb: PCI: Fixing up bridge 0000:00:00.0 [ 0.433930] ssb: PCI: Fixing up device 0000:00:00.0 [ 0.433983] ssb: PCI: Fixing latency timer of device 0000:00:00.0 to 168 [ 0.435778] pci 0000:00:01.0: BAR 0: assigned [mem 0x40000000-0x40001fff] [ 0.439488] PCI: Enabling device 0000:00:01.0 (0000 -> 0002) [ 0.439548] ssb: PCI: Fixing up device 0000:00:01.0 [ 0.496898] ssb: Found chip with id 0x4318, rev 0x02 and package 0x00 [ 0.598464] can not parse nvram name pci/1/1/ag1(null) with value 255 got -34 [ 0.657794] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0 [ 0.658369] NET: Registered protocol family 2 [ 0.660550] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.660693] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.660804] TCP: Hash tables configured (established 1024 bind 1024) [ 0.661326] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.661449] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.662194] NET: Registered protocol family 1 [ 0.668799] Crashlog allocated RAM at address 0x1f00000 [ 0.673947] workingset: timestamp_bits=30 max_order=13 bucket_order=0 [ 0.696230] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.696283] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.729546] io scheduler noop registered [ 0.729601] io scheduler deadline registered (default) [ 0.730151] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled [ 0.732044] console [ttyS0] disabled [ 0.752280] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3, base_baud = 4687500) is a 16550A [ 1.166857] console [ttyS0] enabled [ 1.191460] serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3, base_baud = 4687500) is a 16550A [ 1.202148] physmap platform flash device: 02000001 at 1c000000 [ 1.208439] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x001001 [ 1.219078] Amd/Fujitsu Extended Query Table at 0x0040 [ 1.224305] Amd/Fujitsu Extended Query version 1.3. [ 1.229538] physmap-flash.0: Swapping erase regions for top-boot CFI table. [ 1.236593] number of CFI chips: 1 [ 1.259763] 3 bcm47xxpart partitions found on MTD device physmap-flash.0 [ 1.266569] Creating 3 MTD partitions on "physmap-flash.0": [ 1.272370] 0x000000000000-0x000000040000 : "boot" [ 1.285282] 0x000000040000-0x0000007f0000 : "firmware" [ 1.295917] 3 trx partitions found on MTD device firmware [ 1.301547] Creating 3 MTD partitions on "firmware": [ 1.306626] 0x00000000001c-0x000000000928 : "loader" [ 1.317053] 0x000000000928-0x00000012b000 : "linux" [ 1.327377] 0x00000012b000-0x0000007b0000 : "rootfs" [ 1.337721] mtd: device 4 (rootfs) set to be root filesystem [ 1.343519] 1 squashfs-split partitions found on MTD device rootfs [ 1.349947] 0x0000003a0000-0x0000007b0000 : "rootfs_data" [ 1.360849] 0x0000007f0000-0x000000800000 : "nvram" [ 1.376680] libphy: Fixed MDIO Bus: probed [ 1.381345] b44: Broadcom 44xx/47xx 10/100 PCI ethernet driver version 2.0 [ 1.392053] libphy: b44_eth_mii: probed [ 1.395985] b44 ssb0:0: could not find PHY at 30, use fixed one [ 1.402320] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=-1) [ 1.412317] b44 ssb0:0 eth0: Broadcom 44xx/47xx 10/100 PCI ethernet driver 00:90:4c:4e:00:0c [ 1.433385] libphy: b44_eth_mii: probed [ 1.570958] b53_common: found switch: BCM5325, rev 0 [ 1.576075] Broadcom B53 (1) 2:1e: attached PHY driver [Broadcom B53 (1)] (mii_bus:phy_addr=2:1e, irq=-1) [ 1.585888] b44 ssb0:1 eth1: Broadcom 44xx/47xx 10/100 PCI ethernet driver 00:90:4c:4f:00:0c [ 1.595686] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer) [ 1.605115] GPIO_WDT: failed to register misc device [ 1.612590] NET: Registered protocol family 10 [ 1.625434] NET: Registered protocol family 17 [ 1.630261] 8021q: 802.1Q VLAN Support v1.8 [ 1.646124] VFS: Mounted root (squashfs filesystem) readonly on device 31:4. [ 1.655425] Freeing unused kernel memory: 168K [ 1.660074] This architecture does not have kernel memory protection. [ 2.420638] init: Console is alive [ 2.424758] init: - watchdog - [ 2.527226] random: fast init done [ 3.471603] kmodloader: loading kernel modules from /etc/modules-boot.d/* [ 3.549392] usbcore: registered new interface driver usbfs [ 3.555322] usbcore: registered new interface driver hub [ 3.561187] usbcore: registered new device driver usb [ 3.580582] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 3.590944] ehci-platform: EHCI generic platform driver [ 3.603201] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 3.612265] ohci-platform: OHCI generic platform driver [ 3.617921] ohci-platform ohci-platform.0: Generic Platform OHCI controller [ 3.625158] ohci-platform ohci-platform.0: new USB bus registered, assigned bus number 1 [ 3.633694] ohci-platform ohci-platform.0: irq 2, io mem 0x18003000 [ 3.713645] hub 1-0:1.0: USB hub found [ 3.718634] hub 1-0:1.0: 2 ports detected [ 3.732466] kmodloader: done loading kernel modules from /etc/modules-boot.d/* [ 3.750941] init: - preinit - [ 6.148029] b44 ssb0:0 eth0: Link is up at 100 Mbps, half duplex [ 6.154151] b44 ssb0:0 eth0: Flow control is off for TX and off for RX Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [ 7.207532] b44 ssb0:0 eth0: Link is Up - 100Mbps/Full - flow control off [ 9.822874] jffs2: notice: (363) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. [ 9.841584] mount_root: switching to jffs2 overlay [ 9.902209] urandom-seed: Seeding with /etc/urandom.seed [ 10.022489] b44 ssb0:0 eth0: powering down PHY [ 10.069222] procd: - early - [ 10.072487] procd: - watchdog - [ 10.326824] b44 ssb0:0 eth0: Link is Down [ 10.763220] procd: - watchdog - [ 10.767614] procd: - ubus - [ 10.846390] procd: - init - Please press Enter to activate this console. [ 11.901009] kmodloader: loading kernel modules from /etc/modules.d/* [ 11.919255] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 11.952446] Loading modules backported from Linux version wt-2017-10-06-0-ga7a22fbbd1f0 [ 11.960690] Backport generated by backports.git v4.14-rc2-1-6-gedfb595c [ 11.973915] ip_tables: (C) 2000-2006 Netfilter Core Team [ 11.998065] nf_conntrack version 0.5.0 (1024 buckets, 4096 max) [ 12.123616] xt_time: kernel timezone is -0000 [ 12.491113] PPP generic driver version 2.4.2 [ 12.501767] NET: Registered protocol family 24 [ 12.614775] b43-phy0: Broadcom 4318 WLAN found (core revision 9) [ 12.710923] b43-phy0: Found PHY: Analog 3, Type 2 (G), Revision 7 [ 12.717256] b43-phy0: Found Radio: Manuf 0x17F, ID 0x2050, Revision 8, Version 0 [ 12.752083] Broadcom 43xx driver loaded [ Features: PNL ] [ 12.813561] kmodloader: done loading kernel modules from /etc/modules.d/* [ 26.618542] b44 ssb0:0 eth0: Link is up at 100 Mbps, full duplex [ 26.624661] b44 ssb0:0 eth0: Flow control is off for TX and off for RX [ 26.635365] b44 ssb0:0 eth0: Link is Up - 100Mbps/Full - flow control off [ 26.698194] br-lan: port 1(eth0.1) entered blocking state [ 26.703688] br-lan: port 1(eth0.1) entered disabled state [ 26.712549] device eth0.1 entered promiscuous mode [ 26.717538] device eth0 entered promiscuous mode [ 26.809705] br-lan: port 1(eth0.1) entered blocking state [ 26.815203] br-lan: port 1(eth0.1) entered forwarding state [ 33.386823] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07) [ 33.552765] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 33.573110] br-lan: port 2(wlan0) entered blocking state [ 33.578654] br-lan: port 2(wlan0) entered disabled state [ 33.585150] device wlan0 entered promiscuous mode [ 34.177493] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 34.184404] br-lan: port 2(wlan0) entered blocking state [ 34.189961] br-lan: port 2(wlan0) entered forwarding state BusyBox v1.27.2 () built-in shell (ash) _________ / /\ _ ___ ___ ___ / LE / \ | | | __| \| __| / DE / \ | |__| _|| |) | _| /________/ LE \ |____|___|___/|___| lede-project.org \ \ DE / \ LE \ / ----------------------------------------------------------- \ DE \ / Reboot (SNAPSHOT, r5217-098afa1e1b) \________\/ ----------------------------------------------------------- root@LEDE:/#


This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2024/02/12 08:58
  • by 127.0.0.1