User talk:Oxo

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:20, 22 September 2006 (edit)
Oxo (Talk | contribs)
m (ssh)
← Previous diff
Current revision (13:04, 23 June 2007) (edit) (undo)
PqkR4s (Talk | contribs)
m
 
(12 intermediate revisions not shown.)
Line 1: Line 1:
=Setup= =Setup=
-* dd-wrt v23 sp2+* Between garden shed home and my oldest sons flat
** WDS ** WDS
* 2 Asus Premium * 2 Asus Premium
 +** OpenWrt - rc5
** USB HD ** USB HD
* 1 Lynksys v5 - for sale, preferably swap for Asus Premium :) * 1 Lynksys v5 - for sale, preferably swap for Asus Premium :)
 +** dd-wrt v23 SP2
** JTAG cable ** JTAG cable
- 
-Between garden shed home and my oldest sons flat 
=Basic alterations= =Basic alterations=
Line 21: Line 21:
Needed for ipkg and others (rw filesystem) Needed for ipkg and others (rw filesystem)
- nvram set sys_enable_jffs2=1+nvram set jffs_mounted=1 <br>
- nvram set sys_clean_jffs2=1+nvram set enable_jffs2=1 <br>
- nvram set jffs_mounted=1+nvram set sys_enable_jffs2=1 <br>
- nvram commit+nvram set clean_jffs2=1 <br>
- reboot+nvram set sys_clean_jffs2=1 <br>
-=/jffs/etc/config/*.startup=+nvram commit <br>
 + 
 +reboot
 + 
 += dd-wrt specific=
 +==/jffs/etc/config/*.startup==
v23 starts executable files in /jffs/etc/config/*.startup v23 starts executable files in /jffs/etc/config/*.startup
-===/jffs/etc/config/S10modules.startup===+====/jffs/etc/config/S10modules.startup====
ipkg sometimes make modules.d files: like for USB. So make the following to insmod these modules ipkg sometimes make modules.d files: like for USB. So make the following to insmod these modules
<pre> <pre>
Line 38: Line 43:
</pre> </pre>
-===/jffs/etc/config/S90init.startup===+====/jffs/etc/config/S90init.startup====
ipkg sometimes make init.d files ipkg sometimes make init.d files
<pre> <pre>
Line 45: Line 50:
</pre> </pre>
-=USB=+==USB==
-==USB Core==+===USB Core===
Install the folowing modules for USB Install the folowing modules for USB
# #
Line 53: Line 58:
ipkg install kmod-usb2 ipkg install kmod-usb2
-==USB HD==+===USB HD===
Install the folowing modules for filesystems: Install the folowing modules for filesystems:
Line 61: Line 66:
ipkg install kmod-ext3 ipkg install kmod-ext3
-== Mounting ==+=== Mounting ===
Unfortunatly, dd-wrt doesn't seem to look for a /jffs/etc/fstab ( [http://www.tuxfiles.org/linuxhelp/fstab.html fstab referenceh] ) Unfortunatly, dd-wrt doesn't seem to look for a /jffs/etc/fstab ( [http://www.tuxfiles.org/linuxhelp/fstab.html fstab referenceh] )
-===/jffs/etc/config/S30mount.startup===+====/jffs/etc/config/S30mount.startup====
#!/bin/sh #!/bin/sh
Line 77: Line 82:
fi fi
sleep 1 sleep 1
- i=$(expr $i + 1)+ i=$(expr $i 1)
done done
}</jffs/etc/fstab }</jffs/etc/fstab
-==USB Diverse==+===USB Diverse===
In order to use a multislot card reader, you must add the following parameter to the scsi_mod in the file /jffs/etc/modules.d/60-usb-storage: In order to use a multislot card reader, you must add the following parameter to the scsi_mod in the file /jffs/etc/modules.d/60-usb-storage:
Line 88: Line 93:
(I don't know what this means but I put it in: I haven't tested it (I don't know what this means but I put it in: I haven't tested it
-==USB Printer==+===USB Printer===
Suk! Suk!
- no /dev/usb/lp0 in the standard dd-wrt. - no /dev/usb/lp0 in the standard dd-wrt.
Line 143: Line 148:
loose hair loose hair
-http://www.dd-wrt.com/phpBB2/viewtopic.php?t=4778 newmedia missing: touch and chmod +x+http://www.dd-wrt.com/phpBB2/viewtopic.php?t=4778 newmedia missing: touch and chmod x
Many "cannot execute binary file" compile again (only using development how to as help, not running scripts) Many "cannot execute binary file" compile again (only using development how to as help, not running scripts)
Just found: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2638 Just found: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2638
 +* not v.23 sp2
* wasn't able to apt-add uml-utilities * wasn't able to apt-add uml-utilities
* BUT IT WORKS!!! * BUT IT WORKS!!!
Line 153: Line 159:
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3668 http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3668
 +
 +Never got it to compile: now using Open Wrt which compiled first time
 +
 +==OpenWRT==
 +
 +I now use OpenWrt on ASUS due to printer support and the source code can compile first time...
=Future ..= =Future ..=
Line 163: Line 175:
==Optware== ==Optware==
[[Optware]] [[Optware]]
-==OpenWRT== 
- 
-Hmm, dd-wrt is so easy... 
- 
-But I need /dev/usb/lpt0 so I'll try and make one with the source. Suk!- have to get a Linux running (probably Ubuntu on VMWare) 
- 
=A funny thing happened after I dd-wrt'ed my boxes= =A funny thing happened after I dd-wrt'ed my boxes=
Line 189: Line 195:
[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2507 Had to short pins in the end] [http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2507 Had to short pins in the end]
-[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3935&highlight=asus A typical brick discussion with "what to do"]+[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3935
- +
-I believe I had bricked my router and was pressing resets etc, whereas I should have been patient and checked with a wired connection first and not just wireless.+
- +
-=ASUS dmesg=+
-<pre>+
-DD-WRT v23 SP2 std (c) 2006 NewMedia-NET GmbH+
-Release: 09/13/06 (SVN revision: 3927:3929)+
- +
-DD-WRT-asus login: root+
-Password:+
-==========================================================+
- +
- ____ ___ __ ______ _____ ____ _____+
- | _ \| _ \ \ \ / / _ \_ _| __ _|___ \|___ /+
- || | || ||____\ \ /\ / /| |_) || | \ \ / / __) | |_ \+
- ||_| ||_||_____\ V V / | _ < | | \ V / / __/ ___) |+
- |___/|___/ \_/\_/ |_| \_\|_| \_/ |_____|____/+
- +
- DD-WRT v23 SP2+
- http://www.dd-wrt.com+
- +
-==========================================================+
- +
- +
-DD-WRT VeryBusyBox v1.2.1 (2006.09.13-18:23+0000) Built-in shell (ash)+
-Enter 'help' for a list of built-in commands.+
- +
-~ # dmesg+
-<0>CPU revision is: 00029006+
-<0>Linux version 2.4.34-pre2 (root@linux) (gcc version 3.4.6 (OpenWrt-2.0)) #160 Wed Sep 13 20:27:16 CEST 2006+
-<0>Setting the PFC value as 0x15+
-<0>Determined physical RAM map:+
-<0> memory: 02000000 @ 00000000 (usable)+
-<0>On node 0 totalpages: 8192+
-<0>zone(0): 8192 pages.+
-<0>zone(1): 0 pages.+
-<0>zone(2): 0 pages.+
-<0>Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200+
-<0>CPU: BCM4704 rev 9 at 264 MHz+
-<0>Using 132.000 MHz high precision timer.+
-<0>Calibrating delay loop... 263.78 BogoMIPS+
-<6>Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)+
-<6>Inode cache hash table entries: 2048 (order: 2, 16384 bytes)+
-<6>Mount cache hash table entries: 512 (order: 0, 4096 bytes)+
-<6>Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)+
-<0>Page-cache hash table entries: 8192 (order: 3, 32768 bytes)+
-<0>Checking for 'wait' instruction... unavailable.+
-<0>POSIX conformance testing by UNIFIX+
-<0>PCI: Fixing up bus 0+
-<0>PCI: Fixing up bridge+
-<7>PCI: Setting latency timer of device 01:00.0 to 64+
-<0>PCI: Fixing up bus 1+
-<0>Initializing RT netlink socket+
-<0>Starting kswapd+
-<6>devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)+
-<6>devfs: boot_options: 0x1+
-<6>squashfs: version 3.0 (2006/03/15) Phillip Lougher+
-<0>pty: 256 Unix98 ptys configured+
-<6>Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled+
-<6>ttyS00 at 0xb8000300 (irq = 3) is a 16550A+
-<6>ttyS01 at 0xb8000400 (irq = 3) is a 16550A+
-<6>Software Watchdog Timer: 0.05, timer margin: 60 sec+
-<7>PCI: Setting latency timer of device 00:01.0 to 64+
-<7>PCI: Setting latency timer of device 00:02.0 to 64+
-<6>imq driver loaded.+
-<6>Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky+
-<7>Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0+
-<7>Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0+
-<7>Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0+
-<5> Amd/Fujitsu Extended Query Table v1.3 at 0x0040+
-<5>number of CFI chips: 1+
-<5>cfi_cmdset_0002: Disabling fast programming due to code brokenness.+
-<5>Flash device: 0x800000 at 0x1c000000+
-<5>Physically mapped flash: squashfs filesystem found at block 823+
-<5>Creating 5 MTD partitions on "Physically mapped flash":+
-<5>0x00000000-0x00040000 : "pmon"+
-<5>0x00040000-0x007f0000 : "linux"+
-<5>0x000cde58-0x003967d5 : "rootfs"+
-<0>mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only+
-<5>0x007f0000-0x00800000 : "nvram"+
-<5>0x003a0000-0x007f0000 : "ddwrt"+
-<6>Initializing Cryptographic API+
-<6>IP Protocols: ICMP, UDP, TCP, IGMP+
-<6>IP: routing cache hash table of 512 buckets, 4Kbytes+
-<6>TCP: Hash tables configured (established 2048 bind 4096)+
-<0>ip_conntrack version 2.1 (512 buckets, 4096 max) - 336 bytes per conntrack+
-<0>ip_tables: (C) 2000-2002 Netfilter core team+
-<6>IPP2P v0.8.1_rc1 loading+
-<0>ipt_random match loaded+
-<0>netfilter PSD loaded - (c) astaro AG+
-<6>ipt_osf: Startng OS fingerprint matching module.+
-<0>ipt_IPV4OPTSSTRIP loaded+
-<0>ip_conntrack_rtsp v0.01 loading+
-<0>ip_nat_rtsp v0.01 loading+
-<6>NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.+
-<6>802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>+
-<6>All bugs added by David S. Miller <davem@redhat.com>+
-<0>VFS: Mounted root (squashfs filesystem) readonly.+
-<6>Mounted devfs on /dev+
-<6>diag boardtype: 0000042f+
-<7>PCI: Setting latency timer of device 01:02.0 to 64+
-<0>PCI: Enabling device 01:02.0 (0004 -> 0006)+
-<0>eth2: Broadcom BCM4318 802.11 Wireless Controller 3.90.39.0+
-<5>JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB.+
-<7>vlan0: add 01:00:5e:00:00:01 mcast address to master interface+
-<6>vlan0: dev_set_promiscuity(master, 1)+
-<6>device eth0 entered promiscuous mode+
-<6>device vlan0 entered promiscuous mode+
-<6>device eth2 entered promiscuous mode+
-<6>device wds0.49153 entered promiscuous mode+
-<6>device wds0.49154 entered promiscuous mode+
-<0>vlan1: Setting MAC address to 00 13 06 62 00 00.+
-<7>vlan1: add 01:00:5e:00:00:01 mcast address to master interface+
-<6>Journalled Block Device driver loaded+
-<6>usb.c: registered new driver usbdevfs+
-<6>usb.c: registered new driver hub+
-<6>usb.c: registered new driver usblp+
-<6>printer.c: v0.13: USB Printer Device Class driver+
-<6>SCSI subsystem driver Revision: 1.00+
-<6>Initializing USB Mass Storage driver...+
-<6>usb.c: registered new driver usb-storage+
-<6>USB Mass Storage support registered.+
-<6>uhci.c: USB Universal Host Controller Interface driver v1.1+
-<0>PCI: Enabling device 01:03.0 (0000 -> 0001)+
-<6>uhci.c: USB UHCI at I/O 0x100, IRQ 2+
-<6>usb.c: new USB bus registered, assigned bus number 1+
-<6>hub.c: USB hub found+
-<6>hub.c: 2 ports detected+
-<0>PCI: Enabling device 01:03.1 (0000 -> 0001)+
-<6>uhci.c: USB UHCI at I/O 0x120, IRQ 2+
-<6>usb.c: new USB bus registered, assigned bus number 2+
-<6>hub.c: USB hub found+
-<6>hub.c: 2 ports detected+
-<0>PCI: Enabling device 01:03.2 (0000 -> 0002)+
-<6>ehci_hcd 01:03.2: PCI device 1106:3104+
-<6>ehci_hcd 01:03.2: irq 2, pci mem c0141000+
-<6>usb.c: new USB bus registered, assigned bus number 3+
-<6>ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4+
-<6>hub.c: USB hub found+
-<6>hub.c: 4 ports detected+
-<3>hub.c: connect-debounce failed, port 1 disabled+
-<6>hub.c: new USB device 01:03.2-1, assigned address 2+
-<6>scsi0 : SCSI emulation for USB Mass Storage devices+
-<0> Vendor: IC25N030 Model: ATDA04-0 Rev: DA4O+
-<0> Type: Direct-Access ANSI SCSI revision: 02+
-<0>Attached scsi disk sda at scsi0, channel 0, id 0, lun 0+
-<0>SCSI device sda: 58605121 512-byte hdwr sectors (30006 MB)+
-<6>Partition check:+
-<6> /dev/scsi/host0/bus0/target0/lun0: p1+
-<7>WARNING: USB Mass Storage data integrity not assured+
-<7>USB Mass Storage device found at 2+
-<6>hub.c: new USB device 01:03.0-2, assigned address 2+
-<6>printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 1 proto 2 vid 0x03F0 pid 0x1004+
-</pre>+
- +
-=Diverse=+
-==ssh==+
-* ssh <some host>+
-** ~/.ssh structure created+
-* ssh-keygen -t dsa+
-** id_dsa and id_dsa.pub created+
-** use code for private key (id_dsa) when medium is unsafe+
-*** make sure id_dsa is only rw for user or else use code for private key (medium is unsafe)+
-* add id_dsa.pub to hosts that you want to connect to (~/.ssh/authorized_keys2)+

Current revision

Contents

[edit] Setup

  • Between garden shed home and my oldest sons flat
    • WDS
  • 2 Asus Premium
    • OpenWrt - rc5
    • USB HD
  • 1 Lynksys v5 - for sale, preferably swap for Asus Premium :)
    • dd-wrt v23 SP2
    • JTAG cable

[edit] Basic alterations

[edit] Asus 32MByte

mem ok with 32Mbyte (without the following, less memory)

nvram set sdram_init=0x0009 
nvram set sdram_ncdl=0 
nvram commit 
reboot

[edit] JFFS

Needed for ipkg and others (rw filesystem)

nvram set jffs_mounted=1
nvram set enable_jffs2=1
nvram set sys_enable_jffs2=1
nvram set clean_jffs2=1
nvram set sys_clean_jffs2=1
nvram commit

reboot

[edit] dd-wrt specific

[edit] /jffs/etc/config/*.startup

v23 starts executable files in /jffs/etc/config/*.startup

[edit] /jffs/etc/config/S10modules.startup

ipkg sometimes make modules.d files: like for USB. So make the following to insmod these modules

#!/bin/sh
for module in $(cat /jffs/etc/modules.d/*);do
  /sbin/insmod /jffs/lib/modules/2.4.30/$module.o
done

[edit] /jffs/etc/config/S90init.startup

ipkg sometimes make init.d files

#!/usr/bin/sh
$(/jffs/etc/init.d/S* start)

[edit] USB

[edit] USB Core

Install the folowing modules for USB

 #
 ipkg install kmod-usb-uhci // this is for USB 1.1
 ipkg install kmod-usb-core
 ipkg install kmod-usb2

[edit] USB HD

Install the folowing modules for filesystems:

 ipkg install kmod-usb-storage
 ipkg install kmod-vfat
 ipkg install kmod-ext2
 ipkg install kmod-ext3

[edit] Mounting

Unfortunatly, dd-wrt doesn't seem to look for a /jffs/etc/fstab ( fstab referenceh )


[edit] /jffs/etc/config/S30mount.startup

#!/bin/sh
{
  read MOUNT_DEVICE MOUNT_POINT FS DUMP FSK
  i=0
  while [ $i -le 15 ];do
    if [ -e $MOUNT_DEVICE ];then
      mount $MOUNT_DEVICE $MOUNT_POINT
      break
    fi
    sleep 1
    i=$(expr $i   1)
  done
}</jffs/etc/fstab

[edit] USB Diverse

In order to use a multislot card reader, you must add the following parameter to the scsi_mod in the file /jffs/etc/modules.d/60-usb-storage:

scsi_mod max_scsi_luns=8

(I don't know what this means but I put it in: I haven't tested it

[edit] USB Printer

Suk! - no /dev/usb/lp0 in the standard dd-wrt.

One need's to mknode and it is not included..

Otherwise, if the /dev/usb/lp0 could be made (recompile or ..) the How-to for OpenWrt and printer would work

[edit] Download Master Functionality

Not yet started.

[edit] Serial/UART

Waiting for the max3232 ... Circuit made and Diagram comming here One should maybe install a serial board: helps with new firmware and maybe helps with not having to short pins (to be proven: don't know if it is true...) Anyway, it's a nice feeling with a console cable.

[edit] MAXIM MAX3232

http://www.dd-wrt.com/phpBB2/files/max3232_428.jpg

[edit] Hennings-Electronic: Sejs, Denmark

My friendly local electronics supplier

[edit] Asus

Solder points for ttl output:
http://www.dd-wrt.com/phpBB2/files/asus_ttl_111.jpg The object here is to remove the solder in the holes and solder in a connector. Go carefully.

[edit] Check Software

Ok, the connector is soldered on, so now we need to check software.

  • start for example minicom and connect to ...UART2
  • check that there is no echo of characters
  • connect UART2 tx to rx
  • check that there IS echo of characters
  • connect UART2 tx to UART1 rx and UART2 rx to UART1 tx
  • try and connect to prompt...

[edit] The board

[edit] Developement

Development

[edit] Firmware Modification Kit

started

[edit] dd-wrt from source

My only chance for lp0???

Download Ubuntu and run in vmware

add-apts

collect sw

loose hair

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=4778 newmedia missing: touch and chmod x

Many "cannot execute binary file" compile again (only using development how to as help, not running scripts)

Just found: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2638

  • not v.23 sp2
  • wasn't able to apt-add uml-utilities
  • BUT IT WORKS!!!

Now for v23 sp2 ...

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3668

Never got it to compile: now using Open Wrt which compiled first time

[edit] OpenWRT

I now use OpenWrt on ASUS due to printer support and the source code can compile first time...

[edit] Future ..

[edit] Bluetooth

"Cool": someone has hooked bluetooth to Asus...

  • Nice with PBX sw and a bluetooth headset (how to ring out ...hmm)
  • Internet access for Mobil...
  • GPS

Playtime

[edit] Optware

Optware

[edit] A funny thing happened after I dd-wrt'ed my boxes

You have probably NOT bricked your router if you continually loose wireless to it while going thru the panels.

Every time I left a dd-wrt www interface panel, with ping router and using wireless, I "lost" contact with the router. Repair wireless solved the problem until I moved between panels again.

This has happened on both the routers.

Be patient.

Enable 32MByte memory.

The problem will go away.

(Needs more analysing)

[edit] Brick

After first dd-wrt attempt: none since Had to short pins in the end

[http://www.dd-wrt.com/phpBB2/viewtopic.php?t=3935