петък, 25 юни 2010 г.

wrt54g v 2.0 howto

get this:

on some linux do:
dd if=firmware.bin of=firmware.trx bs=32 skip=1

wget firmware.trx on /tmp of wrt54g

mtd -e linux -r write firmware.trx linux


root@OpenWrt:~# uci set wireless.@wifi-iface[0].encryption=psk2
root@OpenWrt:~# uci set wireless.@wifi-iface[0].key="your_password"
root@OpenWrt:~# uci commit wireless
root@OpenWrt:~# wifi

Configuration is also possible via direct editing of /etc/config/wireless

at end:
uci commit wireless

uci set wireless.@wifi-device[0].disabled=0 - can be other variable SEARCH disabled
uci show | grep disabled

and start it with


set new password for root with
password - this activate sshd after reboot and disable telnet

reenable dnsmasq and httpd and any in this dir /etc/rc.d/
/etc/rc.d/name enable
It may seems that some of them are started but it's not so enable one by one.
Because wireless work devices are connected but can't get IP.

add your rules in

opkg update
opkg upgrade
opkg list - for packages
opkg install name of package

You may need more of iptables pakages for TTL or some filtering or shaping !
They are named with "extra" at end


Add a firewall rule

This is a good example of both adding a firewall rule to forward the TCP SSH port, and of the negative (-1) syntax used with uci.

uci add firewall rule uci set firewall.@rule[-1].src=wan

uci set firewall.@rule[-1].target=ACCEPT

uci set firewall.@rule[-1].proto=tcp

uci set firewall.@rule[-1].dest_port=22

uci commit firewall

change the wan MAC address.

/etc/config/network you can run the commands below to change the wan
MAC address.
uci set network.wan.macaddr=""
uci commit network
ifdown wan && ifup wan


вторник, 8 юни 2010 г.

2.6.33 and 2.6.34 kernel suspend hibernate trouble

For 2.6.33: USB3 module is: xhci
For 2.6.34: USB3 module is: xhci_hcd

Before start suspend:

rmmod xhci_hcd ehci_hcd ohci_hcd forcedeth hangcheck-timer usbcore

After resume must:

modprobe usbcore
modprobe xhci_hcd
modprobe ehci_hcd
modprobe ohci_hcd
modprobe forcedeth
modprobe hangcheck-timer

Usually script's know for all this but not for USB3. And you will see this error:
/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: Input/output error
/usr/lib64/pm-utils/pm-functions: line 295: echo: write error: No such file or directory

or similar. This is not a bug. This is caused from:

kernel: hub 6-0:1.0: cannot reset port 1 (err = -19)
kernel: hub 6-0:1.0: cannot disable port 1 (err = -19)

PM: Device usb2 failed to freeze async: error -2
kernel: PM: Device usb2 failed to suspend async: error -2
kernel: PM: Some devices failed to suspend

It can be seen in Slackware log's after : pm-suspend
this command produce very helpful LOG.