D-Link DIR-330

Hardware

Info

Instruction set: MIPS
Vendor: Broadcom
Bootloader: CFE
System-On-Chip: BCM5836P
CPU @Frq BMIPS3300 @264MHz
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

Photos

Casing

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

Board

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.

Installation

Flashing procedure for the DIR-330

  1. Using the serial pinout shown above, 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.
  6. Reflashing will usually take 1 to 2 minutes depending on size of the firmware.
  7. When done and CFE> prompt appears again, issue command reboot

Work in Progress

WAN port and Ethernet switch not working

The bootlog below is NOT of production-ready OpenWRT firmware. As of svn rev 30565, OpenWRT trunk firmware DOES NOT support WAN port and internal switch (used for VLANs) configuration. The following image has LAN ports disabled and eth0 assigned to WAN port, illustrating that it is still unable to handle traffic. We will keep you informed.

USB OHCI kmod problem

kmod_usb_ohci seems to cause problems, resulting in constant dmesg flooding. This testing firmware had it disabled too.

Bootlog

Bootlog for OpenWRT trunk (svn rev 30565), specially crafted to diagnose switch configuration problems (see above).

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: 264MHz 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: .. 3780 bytes read Entry at 0x80001000 Closing network. Starting program at 0x80001000 [ 0.000000] Linux version 3.0.18 (barvinok@Proto) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #6 Fri Feb 17 06:17:05 GMT 2012 [ 0.000000] CPU revision is: 00029006 (Broadcom BMIPS3300) [ 0.000000] bcm47xx: using ssb bus [ 0.000000] ssb: chipcommon status is 0x0 [ 0.000000] ssb: Initializing MIPS core... [ 0.000000] ssb: set_irq: core 0x0806, irq 4 => 4 [ 0.000000] ssb: set_irq: core 0x0806, irq 5 => 5 [ 0.000000] ssb: set_irq: core 0x0808, irq 6 => 2 [ 0.000000] ssb: set_irq: core 0x0804, irq 2 => 6 [ 0.000000] ssb: after irq reconfiguration [ 0.000000] ssb: core 0x0800, irq : 2(S) 3* 4 5 6 D I [ 0.000000] ssb: core 0x0806, irq : 2(S) 3 4* 5 6 D I [ 0.000000] ssb: core 0x0806, irq : 2(S) 3 4 5* 6 D I [ 0.000000] ssb: core 0x0808, irq : 2(S)* 3 4 5 6 D I [ 0.000000] ssb: core 0x0804, irq : 2(S) 3 4 5 6* D I [ 0.000000] ssb: core 0x0816, irq : 2(S)* 3 4 5 6 D I [ 0.000000] ssb: core 0x0807, irq : 2(S)* 3 4 5 6 D I [ 0.000000] ssb: core 0x080b, irq : 2(S)* 3 4 5 6 D I [ 0.000000] ssb: core 0x080f, irq : 2(S) 3 4 5 6 D I* [ 0.000000] found parallel flash. [ 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] Zone PFN ranges: [ 0.000000] Normal 0x00000000 -> 0x00002000 [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[1] active PFN ranges [ 0.000000] 0: 0x00000000 -> 0x00002000 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 [ 0.000000] Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 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] 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] Memory: 23952k/32768k available (2445k kernel code, 8816k reserved, 691k data, 160k init, 0k highmem) [ 0.000000] NR_IRQS:128 [ 0.000000] console [ttyS0] enabled [ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.000000] ... MAX_LOCK_DEPTH: 48 [ 0.000000] ... MAX_LOCKDEP_KEYS: 8191 [ 0.000000] ... CLASSHASH_SIZE: 4096 [ 0.000000] ... MAX_LOCKDEP_ENTRIES: 16384 [ 0.000000] ... MAX_LOCKDEP_CHAINS: 32768 [ 0.000000] ... CHAINHASH_SIZE: 16384 [ 0.000000] memory used by lock dependency info: 3695 kB [ 0.000000] per task-struct memory footprint: 1152 bytes [ 0.044000] Calibrating delay loop... 260.86 BogoMIPS (lpj=521728) [ 0.076000] pid_max: default: 32768 minimum: 301 [ 0.080000] Mount-cache hash table entries: 512 [ 0.116000] NET: Registered protocol family 16 [ 0.164000] bio: create slab at 0 [ 0.192000] Switching to clocksource MIPS [ 0.224000] ssb: PCIcore in host mode found [ 0.540000] PCI: Fixing up bridge 0000:00:00.0 [ 0.544000] PCI: Fixing up device 0000:00:00.0 [ 0.548000] PCI: Fixing latency timer of device 0000:00:00.0 to 168 [ 0.564000] pci 0000:00:01.0: BAR 0: assigned [mem 0x40000000-0x40001fff] [ 0.572000] pci 0000:00:01.0: BAR 0: set to [mem 0x40000000-0x40001fff] (PCI address [0x40000000-0x40001fff]) [ 0.596000] PCI: Enabling device 0000:00:01.0 (0000 -> 0002) [ 0.604000] PCI: Fixing up device 0000:00:01.0 [ 0.648000] ssb: chipcommon status is 0x0 [ 0.652000] ssb: SPROM offset is 0x1000 [ 0.764000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0 [ 0.780000] NET: Registered protocol family 2 [ 0.788000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.800000] TCP established hash table entries: 1024 (order: 1, 8192 bytes) [ 0.808000] TCP bind hash table entries: 1024 (order: 3, 36864 bytes) [ 0.816000] TCP: Hash tables configured (established 1024 bind 1024) [ 0.824000] TCP reno registered [ 0.824000] UDP hash table entries: 64 (order: 0, 5120 bytes) [ 0.832000] UDP-Lite hash table entries: 64 (order: 0, 5120 bytes) [ 0.844000] NET: Registered protocol family 1 [ 0.872000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.876000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.888000] msgmni has been set to 46 [ 0.892000] io scheduler noop registered [ 0.896000] io scheduler deadline registered (default) [ 0.908000] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled [ 0.936000] serial8250: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A [ 0.968000] serial8250: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A [ 1.004000] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A [ 1.036000] serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A [ 1.060000] bcm47xx_pflash: flash init: 0x1c000000 0x02000000 [ 1.064000] Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x001001 [ 1.076000] Amd/Fujitsu Extended Query Table at 0x0040 [ 1.084000] Amd/Fujitsu Extended Query version 1.3. [ 1.088000] Physically mapped flash: Swapping erase regions for top-boot CFI table. [ 1.096000] number of CFI chips: 1 [ 1.100000] bcm47xx_pflash: Flash device: 0x2000000 at 0x1fc00000 [ 1.108000] bcm47xx_part: bootloader size: 262144 [ 1.116000] bcm47xx_part: Looking for dual image [ 1.124000] bcm47xx_part: TRX offset : 0 [ 1.128000] 4 bcm47xx partitions found on MTD device Physically mapped flash [ 1.136000] Creating 4 MTD partitions on "Physically mapped flash": [ 1.144000] 0x000000000000-0x000000040000 : "cfe" [ 1.168000] 0x000000040000-0x0000007f0000 : "linux" [ 1.184000] 0x000000149800-0x0000007f0000 : "rootfs" [ 1.188000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only [ 1.216000] mtd: partition "rootfs" set to be root filesystem [ 1.220000] mtd: partition "rootfs_data" created automatically, ofs=4F0000, len=300000 [ 1.228000] 0x0000004f0000-0x0000007f0000 : "rootfs_data" [ 1.248000] 0x0000007f0000-0x000000800000 : "nvram" [ 1.272000] bcm47xx_sflash: error registering platform driver: -19 [ 1.280000] Hauke patch: invalidating instance 1 [ 1.284000] b44: probe of ssb0:0 failed with error -22 [ 1.292000] b44: b44.c:v2.0 [ 1.300000] PHYDEBUG: eth0 is on phy 30 [ 1.304000] b44 ssb0:1: eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:90:4c:4f:00:0c [ 1.320000] BCM47xx Watchdog Timer enabled (30 seconds, nowayout) [ 1.332000] TCP westwood registered [ 1.336000] NET: Registered protocol family 17 [ 1.340000] 802.1Q VLAN Support v1.8 [ 1.392000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2. [ 1.404000] Freeing unused kernel memory: 160k freed [ 6.212000] diag: Detected 'D-Link DIR-330' [ 6.320000] PHYDEBUG: eth0 is on phy 30 [ 6.392000] b44 ssb0:1: eth0: Link is up at 100 Mbps, full duplex [ 6.400000] b44 ssb0:1: eth0: Flow control is off for TX and off for RX tg3 146930 0 - Live 0x81600000 [ 8.368000] roboswitch: Probing device eth0: found a 5325! It's a 5350. - preinit - Press the [f] key and hit [enter] to enter failsafe mode - regular preinit - [ 17.568000] JFFS2 notice: (305) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 4 of xref (0 dead, 2 orphan) found. [ 19.528000] SCSI subsystem initialized [ 19.816000] usbcore: registered new interface driver usbfs [ 19.824000] usbcore: registered new interface driver hub [ 19.840000] usbcore: registered new device driver usb [ 20.140000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 20.364000] uhci_hcd: USB Universal Host Controller Interface driver [ 20.524000] Initializing USB Mass Storage driver... [ 20.528000] usbcore: registered new interface driver usb-storage [ 20.536000] USB Mass Storage support registered. switching to jffs2 - init - [ 42.388000] PHYDEBUG: eth0 is on phy 30 [ 42.388000] b44 ssb0:1: eth0: powering down PHY Please press Enter to activate this console. [ 45.380000] lib80211: common routines for IEEE802.11 drivers [ 46.240000] Compat-wireless backport release: compat-wireless-2012-01-16-14-g02166d5 [ 46.248000] Backport based on wireless-testing.git master-2012-02-06 [ 46.384000] cfg80211: Calling CRDA to update world regulatory domain [ 47.744000] NET: Registered protocol family 10 [ 47.768000] cfg80211: World regulatory domain updated: [ 47.772000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 47.780000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 47.788000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 47.796000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 47.804000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 47.812000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 50.224000] b43-phy0: Broadcom 4318 WLAN found (core revision 9) [ 50.332000] Broadcom 43xx driver loaded [ Features: PNL ] [ 50.488000] Button Hotplug driver version 0.4.1 [ 50.732000] device-mapper: ioctl: 4.20.0-ioctl (2011-02-02) initialised: dm-devel@redhat.com [ 51.064000] dm_crypt: Unknown symbol crypto_shash_update (err 0) [ 51.068000] dm_crypt: Unknown symbol crypto_alloc_ablkcipher (err 0) [ 51.076000] dm_crypt: Unknown symbol crypto_alloc_shash (err 0) [ 51.336000] loop: module loaded [ 51.796000] IPv6 over IPv4 tunneling driver [ 52.552000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 53.832000] nf_conntrack version 0.5.0 (376 buckets, 1504 max) [ 58.984000] usbcore: registered new interface driver ums-alauda [ 59.076000] usbcore: registered new interface driver ums-cypress [ 59.164000] usbcore: registered new interface driver ums-datafab [ 59.252000] usbcore: registered new interface driver ums-freecom [ 59.420000] usbcore: registered new interface driver ums-isd200 [ 59.508000] usbcore: registered new interface driver ums-jumpshot [ 59.596000] usbcore: registered new interface driver ums-karma [ 59.688000] usbcore: registered new interface driver ums-sddr09 [ 59.776000] usbcore: registered new interface driver ums-sddr55 [ 59.864000] usbcore: registered new interface driver ums-usbat [ 60.484000] usbcore: registered new interface driver usbhid [ 60.492000] usbhid: USB HID core driver starting pid 370, tty '/dev/ttyS0': '/bin/ash --login' BusyBox v1.19.3 (2012-02-12 22:48:22 GMT) built-in shell (ash) Enter 'help' for a list of built-in commands. _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ATTITUDE ADJUSTMENT (bleeding edge, r30565) ---------- * 1/4 oz Vodka Pour all ingredients into mixing * 1/4 oz Gin tin with ice, strain into glass. * 1/4 oz Amaretto * 1/4 oz Triple sec * 1/4 oz Peach schnapps * 1/4 oz Sour mix * 1 splash Cranberry juice ----------------------------------------------------- root@OpenWrt:/# ifconfig eth0 up [ 74.244000] PHYDEBUG: eth0 is on phy 30 [ 74.316000] b44 ssb0:1: eth0: Link is up at 100 Mbps, full duplex [ 74.324000] b44 ssb0:1: eth0: Flow control is off for TX and off for RX root@OpenWrt:/# ifconfig eth0 10.0.0.12 netmask 255.255.255.0 root@OpenWrt:/# ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes ^C --- 10.0.0.1 ping statistics --- 9 packets transmitted, 0 packets received, 100% packet loss root@OpenWrt:/# tcpdump -vv -i eth0 [ 101.400000] device eth0 entered promiscuous mode tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes ^C 0 packets captured 0 packets received by filter [ 360.332000] device eth0 left promiscuous mode 0 packets dropped by kernel root@OpenWrt:/#

Tags

For some Help with the Tags, please have a look here: tags

Back to top

toh/d-link/dir-330.txt · Last modified: 2014/04/24 19:43 (external edit)