OpenWrt
Introduction
In January 2006 we acquired an ASUS WL500G deluxe, which is a hardware router which also comes with a builtin 4-port ethernet switch, a wlan accesspoint and - which makes it very interesting - two USB2.0 ports. We reflashed that thing with the OpenWrt firmware, which went without any problems and turned the little device into a full sized linux box.
Quicknotes
- Interfaces on ASUS WL500G Deluxe: LAN = vlan0, WAN = vlan0, WIFI = eth1
dnsmasq refuses to start
- Symptom:
Syntax error: network+192.168.1.100 - Solution:
dnsmasqexpects the dhcp-ip-range to be given as integers, not as ip-adresses, so instead ofnvram set dhcp_start 192.168.0.100 nvram set dhcp_end 192.168.0.200 nvram commit
do a
nvram set dhcp_start 100 nvram set dhcp_end 200 nvram commit
and restart
dnsmasq:/etc/init.d/S50dnsmasq
Source: OpenWrtDocs > dnsmasq
Remove bridge between wifi and lan interface
- Add to
/etc/firewall.user:WIFI=$(nvram get wifi_ifname) iptables -A FORWARD -i $WIFI -o $WAN -j ACCEPT iptables -A FORWARD -i $WIFI -o $LAN -j ACCEPT iptables -A FORWARD -i $LAN -o $WIFI -j ACCEPT
- Set the following in nvram:
lan_ifname=vlan0 lan_proto=static lan_ipaddr=192.168.0.1 lan_netmask=255.255.255.0 wifi_ifname=eth1 wifi_proto=static wifi_ipaddr=192.168.1.1 wifi_netmask=255.255.255.0
and commit it and reboot.
- Add to
/etc/dnsmasq.conf:dhcp-range=lan,192.168.0.100,192.168.0.199,2h dhcp-range=wlan,192.168.1.100,192.168.1.199,2h
and do a
killall -9 dnsmasq ; /etc/init.d/S50dnsmasq.
- Sources:
HP LaserJet 1000
- On a standard linux box of your choice:
wget http://foo2zjs.rkkda.com/foo2zjs.tar.gz && tar xvfz foo2zjs.tar.gz && cd foo2zjsmake
./getweb lj1000- Copy
sihp1000.imgto your router
- On your router:
- Install the
kmod-usb-printerkernel modules:ipkg install kmod-usb-printer - Create a new file
/etc/hotplug.d/usb/hplj1000:#!/bin/sh FIRMWARE="/data/sihp1000.img" if [ "$PRODUCT" = "3f0/517/120" ] then if [ "$ACTION" = "add" ] then logger "Sending firmware to printer..." cat $FIRMWARE > /dev/usb/lp0 logger "done." fi fi
Remember to adjust the firmware location accordingly.
- Now configure the clients from which you want to print, according to the OpenWRT docs. You're done




