DLINK DIR-320 USB/PRINTER BUILD

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Post Reply
chico
Posts: 10
Joined: Tue May 03, 2011 5:03 am

DLINK DIR-320 USB/PRINTER BUILD

Post by chico »

First, thanks for your great job in gorgoyle.
Looking around in the forum i decided to build gargoyle for DIR-320.
It works with standard build gargoyle_1.3.x-brcm47xx-squashfs.trx but missing USB/PRINTER support and unstable.
So...
---Builded on ubuntu 11.04 X64---

# use the following on a 32 bit system:
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev subversion flex

# Or for a 64 bit system:
sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev ia32-libs lib32gcc1 libc6-dev-i386 subversion flex

git clone git://gargoyle-router.com/gargoyle.git
cd gargoyle
make custom CUSTOM_TEMPLATE=brcm47xx

# Select these settings:
# Dont forget to UNCHECK b43 legacy

Kernel modules --->
Filesystems --->
<*> kmod-fs-ext3..................................... EXT3 filesystem support
USB Support --->
<*> kmod-usb-core............................................ Support for USB
<*> kmod-usb-ohci............................... Support for OHCI controllers
<*> kmod-usb-printer.................................... Support for printers
<*> kmod-usb-storage..................................... USB Storage support
<*> kmod-usb2................................... Support for USB2 controllers
Wireless Drivers --->
<*> kmod-b43.................................. Broadcom 43xx wireless support --->
--- kmod-b43.................................. Broadcom 43xx wireless support
Configuration --->
b43 firmware version (Firmware 508.1084 from driver 5.10.56.27) --->
[*] Remove unnecessary firmware files
(13) Core revisions to include
(LP) PHY types to include
[ ] Enable debug output and debugfs for b43 (NEW)

# Flash/update the router with image "gargoyle_1.3.x-brcm47xx-squashfs.trx"

### USB PRINTER ###
# In router
# Edit file /etc/opkg.conf
# http://downloads.openwrt.org/snapshots/backfire/10.03.1-RC5-testing/brcm47xx/packages
opkg update

# Install
opkg install p910nd

# Configure
uci set p910nd.@p910nd[0]=p910nd
uci set p910nd.@p910nd[0].port=0
uci set p910nd.@p910nd[0].bidirectional=1
uci set p910nd.@p910nd[0].enabled=1
uci commit p910nd

# Start daemon
/etc/init.d/p910nd restart

# Set to Auto Start
/etc/init.d/p910nd enable

### Litle FIX ###
Web interface "Status >Connected Hosts" and "Connection >Wake on Lan"
does not show any info caused by an error in output of define_host_vars.sh
So edit file /usr/lib/gargoyle/define_host_vars.sh
Near line 23, look for:
iw $ap station dump | awk ' /^Station/ { printf "wifiLines.push(\""$2" " ;} /signal/ {printf ""$2" "} /bitrate/ {print ""$3"\");"}'
and change to:
iw $ap station dump | awk ' /^Station/ { printf "wifiLines.push(\""$2" " ;} /signal:/ {printf ""$2" "} /rx bitrate/ {print ""$3"\");"}'
### END ###

Now please, if possible, make the necessary changes to include DIR-320 with USB/printer to the supported/official build.
Info:
http://www.gargoyle-router.com/wiki/dok ... umentation
http://wiki.openwrt.org/toh/d-link/dir-320
Last edited by chico on Thu May 19, 2011 8:46 am, edited 2 times in total.

chico
Posts: 10
Joined: Tue May 03, 2011 5:03 am

Re: DLINK DIR-320 USB/PRINTER BUILD

Post by chico »

--Update--
If after the initial boot, wireless fail with :
"PHY for wifi device radio0 not found"
This is simply because option macaddr in /etc/config/wireless is wrong.
Set macaddr in /etc/config/wireless to the value of the command
'cat /sys/class/ieee80211/phy0/macaddress' , and the wireless is up again.

Info:
OpenWRT Ticket #7102
DLink DIR-320 1.3.X (custom latest brcm47xx)

Post Reply