» »

Asus WL500gP, dd-wrt, printer and disk sharing

Asus WL500gP, dd-wrt, printer and disk sharing

Mate ::

Najprej vsem en lep pozdrav. Že dolgo nisem ničesar napisal na ta forum, včeraj pa sem končno usposobil printer in disk sharing na Asusovem routerju WL500gP. Na router imam preko USBja priklopljen tiskalnik Canon Pixma iP5200 in WDjev 1TB disk. Na router sem namestil dd-wrt v23 SP2 firmware in se lotil konfiguriranja. Za vse skupaj sem porabil kar precej časa, ker se z linuxom nisem nikoli ukvarjal. Zato sem celotna navodila napisal in jih objavljam tukajle. Napisana so v angleščini in upam, da bodo še komu pomagala.


Installing printer support, USB disk sharing and swap partition on Asus WL500G-Premium using dd-wrt v23 SP2. Lines beginning with ~ # represent a command, that should be sent to router using telnet or SSH. While typing the command, do not include ~ #. You can telnet to your router using putty.

Before following these instructions read them first.

If you want something configured differend, reffer to links under Literature. If something does not work, reffet to links under Literature. I have spent quite a few hours configuring the whole thing. Linux expert would have done it in less than half an hour, if the disk was ready.


Literature:
1) http://www.dd-wrt.com/wiki/index.php/Jf...
2) http://www.dd-wrt.com/wiki/index.php/Ip...
3) http://www.dd-wrt.com/wiki/index.php/US...
4) http://www.dd-wrt.com/wiki/index.php/Pr...
5) http://www.dd-wrt.com/wiki/index.php/Op...
6) http://www.dd-wrt.com/wiki/index.php/Li...


0.) You have to have your router up and running dd-wrt, and you have to be able to access it via telnet. Also connect both, printer and USB disk to your router. I have configured my disk as follows:
Partition 1: 128MB, Swap
Partition 2: 1GB, Ext3 (Router software)
Partition 3: All other place, Ext3 (Storage)


1.) Enable and clean JFFS. [1]
Access router via web interface, choose administration, management. Find JFFS2 Support group, choose JFFS2 enable and Clean JFFS2 enable, save settings, wait for router to reboot. After reboot settings should be: JFFS2 enabled, Clean JFFS2 disabled.


2.) Prepare IPKG. [3]
Telnet/SSH to router,
Create folder for ipkg:
~ # mkdir -p /jffs/tmp/ipkg
Update IPKG:
~ # ipkg update


3.) Install various modules using ipkg. [3,4]
USB drivers. For USB 1.1 support read literature [3].
~ # ipkg -force-depends install kmod-usb-core
~ # ipkg -force-depends install kmod-usb2
USB Storage support.
~ # ipkg -force-depends install kmod-usb-storage
FAT/EXT/XFS file system support.
~ # ipkg install kmod-vfat
~ # ipkg install kmod-ext2
~ # ipkg install kmod-ext3
~ # ipkg install kmod-xfs
Printer support.
~ # ipkg -force-depends install kmod-usb-printer
Printer driver.
~ # ipkg install p910nd


4.) Create a startup file to load all modules at startup. [3,4]
create /jffs/etc/config/ directory and file usb.startup.
~ # mkdir /jffs/etc/config
~ # vi /jffs/etc/config/usb.startup
You are now in VI text editor.

List of commands you might/will need:
i - insert (To exit insert mode press ESC)
dd - delete line
:q - quit
:wq - write to file and quit

Edit file. (Support for Ext2, FAT and XFS is commented out, uncomment it, if you need it) File content is between the two dashed lines, enter it using insert command (i).
-------------------------------------------
# USB support.
insmod /jffs/lib/modules/2.4.30/usbcore.o
insmod /jffs/lib/modules/2.4.30/ehci-hcd.o

# Storage support.
insmod /jffs/lib/modules/2.4.30/scsi_mod.o
insmod /jffs/lib/modules/2.4.30/usb-storage.o
insmod /jffs/lib/modules/2.4.30/sd_mod.o

# Filesystems support.
# Ext2
#insmod /jffs/lib/modules/2.4.30/ext2.o
# Ext3
insmod /jffs/lib/modules/2.4.30/jbd.o
insmod /jffs/lib/modules/2.4.30/ext3.o
# FAT
#insmod /jffs/lib/modules/2.4.30/fat.o
#insmod /jffs/lib/modules/2.4.30/vfat.o
# XFS
#insmod /jffs/lib/modules/2.4.30/xfs.o

# Printer support.
insmod /jffs/lib/modules/2.4.30/printer.o
---------------------------------------------
Exit insert mode (ESC), write to file and quit (:wq).

Make the file executable.
~ # chmod +x /jffs/etc/config/usb.startup

Reboot router.
~ # reboot


5.) Find installed USB devices.
Find your storage device.
~ # dmesg | grep scsi
Find a line like this:
(6) /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3
This tells you, where your disk is, and its partitions.

Find your printer.
~ # dmesg | grep usb
Find a line like this:
(6)printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04A9 pid 0x10A5
This tells you, printer is accessible at /dev/usb/lp0

If you are unable to find connected device, read literature to find help.


6.) Edit usb.startup to have your devices ready at startup.
~ # vi /jffs/etc/config/usb.startup
Add lines at the end (i).
--------------------------------------------

# Wait a little.
sleep 10

# Mount disk.
# Partition for Optware.
mount /dev/scsi/host0/bus0/target0/lun0/part2 /opt
sleep 2
# Partition for Storage.
mount /dev/scsi/host0/bus0/target0/lun0/part3 /mnt
sleep 2

# Canon pixma iP5200.
/jffs/usr/sbin/p910nd -f /dev/usb/lp0 0
---------------------------------------------
Be sure, to use values from step 5.
/dev/scsi/host0/bus0/target0/lun0 for disk. part2 and part3 means the second and the third partition.
/dev/usb/lp0 for printer. [4]

Write to file and quit (ESC)(:wq).

Reboot router.
~ # reboot

Now you have your printer installed and ready to print.
Disk is mounted, but not yet accessible from the network.

7.) Install Optware and configure swap and Samba on newly mounted disk to enable storage access from the network. [6]
Create Temp folder on disk, to preserve internal flash memory.
~ # mkdir /mnt/Temp

Download Optware.
~ # wget http://www.wlan-sat.com/boleo/optware/o... -O - | tr -d '\r' > /mnt/Temp/optware-install.sh
Install Optware.
~ # sh /mnt/Temp/optware-install.shcd

Install busybox.
~ # /opt/bin/ipkg-opt install busybox


Install Samba2
~ # /opt/bin/ipkg update
~ # /opt/bin/ipkg remove samba
~ # /opt/bin/ipkg install samba2

Note: You can also install xinetd, but it did not work for me. Try it because configuration will be easier, manual at [5]. I will continue describing my way of configuring Samba.

Configure Samba2, so that it suits your needs.
I have added next text at the end of Samba configuration file, and commented out all other predefined shares. Read smb.conf carefully and find some instructions to edit it.
~ # vi /opt/etc/samba/smb.conf

Added lines at the end:
---------------------------------------
[Shared]
comment = Shared files
path = /mnt
public = yes
writable = yes
only guest = yes
printable = no
---------------------------------------
This creates a new share, that shares the whole /mnt folder, which is the third partition on the disk. Share is accessible for everyone within specified IPs in smb.conf.

Write to file and quit (ESC)(:wq).


Set swap partition, and run Samba at startup. Edit usb.startup to have your swap file and Samba shares ready at startup.
~ # vi /jffs/etc/config/usb.startup
Add lines at the end (i).
---------------------------------------
# Set swap partition.
/opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part1

# Run Samba
/opt/etc/init.d/S80samba start
---------------------------------------

Write to file and quit (ESC)(:wq).

Reboot router.
~ # reboot

Things should now be working.
Printer is accessible via IP port 192.168.1.1 (Your router IP), port 9100, RAW.
Disk is accessible at \\192.168.1.1\ (Your router IP).


Veliko sreče! :D
Hum?....

ssandi ::

se opravičujem, ker nekaj me zanima predvem pa ali je potrebno zunanji disk razdeliti na particije , da ima router dovolj prostora za svoj software, ali se lahko tiskalnik priključi brez zunannjega diska, hvala za odgovor.

Mate ::

Če želiš uporabljati samo USB tiskalnik, ne potrebuješ zunanjega diska. Asus WL500gP ima 8MB svojega flasha, kar je zadosti za gonilnike za USB in tiskalnik - če imaš na tem routerju third-party firmware. Asusov firmware že sam omogoča uporabo USB tiskalnika.

Če imaš Asusa WL500gP z dd-wrt firmwareom v23 sp2 sledi navodilom do konca koraka 6, spusti pa korake kjer nastavljaš stvari za disk in tiskalnik ti bo delal.

Še en dodatek h gornjim navodilom.

Dd-wrt nima uporabnika nobody, zato je treba po namestitvi Sambe2 (sredi koraka 7) spremeniti sambin zagonski file:

~ # vi /opt/etc/init.d/S80samba
spremeni vsebino v:
-----------------------
#!/bin/sh
[ -d /tmp/samba ] || mkdir /tmp/samba
grep -q nobody /etc/passwd || echo "nobody:*:65534:65534:nobody:/var:/bin/false" >> /etc/passwd
killall smbd
killall nmbd
/opt/sbin/nmbd -D
/opt/sbin/smbd -D
------------------------

Potem pa res dela ;)
Hum?....

Zgodovina sprememb…

  • spremenil: Mate ()

Invictus ::

a zadeva dela, če imaš na zunanjem disku ntfs?

lp I.

Mate ::

Obstaja podpora branja za NTFS, ne da se pa na disk pisat.

Za uporabo diska tako, kot sem opisal v navodilih, je obvezen operacijski sistem EXT3 (Morda tudi 2, FAT ali NTFS nista vredu) Disk lahko enostavno formatiraš v EXT3 s kakšno live distribucijo Linuxa.
Hum?....

ssandi ::

g. Mate imam vprašanje lepo gre zadeva do 4. koraka pri text editor pa se pojavi stoplpec tehle ~ znakov in že ne vem kako naprej ker še nikoli nisem uporabljal ukazov za linux. Če prav razumem navodilo zadev med črtama, ki so od # USB Support do # Print support ni potrebno vnašati in kaj predstavljajo te vrstice ali lahko nadaljujem po tem kar z krejiranjem izvršilnega deriktorija ~# chmod +x/jff...
ali obstaja kakšna razlaga osnovnih ukazov linux s primeri uporabe
Hvala za odgovor Sandi

Mate ::

Čer, g. pred imenom kar spusti, nisem še tako star :P

Najprej spisek linux ukazov:

Sicer pa Google: "linux commands".

Še spisek ukazov za vi. Vi je program za urejanje teksta v linuxu.


Vrstica, ki se v navodilih začne z ~ # pomeni ukaz, ki ga je potrebno vpisati v konzolo. Tekst med dvema črtama pa je potrebno vpisati oziroma skopirati v vi.

Če prav razumem, tebe zanima tale del:
-------------------------------------------
# USB support.
insmod /jffs/lib/modules/2.4.30/usbcore.o
insmod /jffs/lib/modules/2.4.30/ehci-hcd.o

# Storage support.
insmod /jffs/lib/modules/2.4.30/scsi_mod.o
insmod /jffs/lib/modules/2.4.30/usb-storage.o
insmod /jffs/lib/modules/2.4.30/sd_mod.o

# Filesystems support.
# Ext2
#insmod /jffs/lib/modules/2.4.30/ext2.o
# Ext3
insmod /jffs/lib/modules/2.4.30/jbd.o
insmod /jffs/lib/modules/2.4.30/ext3.o
# FAT
#insmod /jffs/lib/modules/2.4.30/fat.o
#insmod /jffs/lib/modules/2.4.30/vfat.o
# XFS
#insmod /jffs/lib/modules/2.4.30/xfs.o

# Printer support.
insmod /jffs/lib/modules/2.4.30/printer.o
---------------------------------------------

Tekst med obema črtama je potrebno vpisati v file /jffs/etc/config/usb.startup. Če teksta ne boš vpisal v ta file, se ob naslednjem zagonu gonilniki ne bodo namestili in stvari ne bodo delale.
Če na primer nimaš zunanjega diska, lahko dele pod # Storage support. in # Filesystems support. spustiš. Če teh delov ne boš vključil, tudi nekateri predhodni koraki niso potrebni, prav tako pa nekateri naslednji ne bodo potrebni.

Če želiš stvari bolje razumeti, si preberi strani, katerih linki so pod literaturo.
Hum?....

Mate ::

Od prejšnje konfiguracije dd-wrtja je minilo 2 leti. Predvčerajšnjim sem se nekaj igral z routerjem in včeraj zjutraj ni več delal. Čudno. Krivi sem svoje igračkanje in se sprijaznil z dejstvom, da bom moral na novo skonfigurirati vse skupaj.

Namestil sem nov dd-wrt v24 pre sp2 in nstavil bistvene reči. Kljub temu, se je router še vedno sesuval. Ugotovil sem, da je bil zanič kondenzator (10V 1200uF) v napajalniku od routerja. Po zamenjavi router dela stabilno in po občutku hitreje kot z v23 SP2.

Ker je postopek za neveščega uporabnika (jaz) kar precej zapleten, sem si tudi tokrat naredil nekaj zapiskov, ki jih objavljam tukajle. Če drugega ne, je prejšnja objava pomagala meni pri zdajšnji konfiguraciji.

DD-WRT Installation for Asus WL500gP.

Literature:

Default wiki site:
http://www.dd-wrt.com/wiki/index.php/In...

Use this Peacock thread:
http://www.dd-wrt.com/phpBB2/viewtopic....

Samba 3 wiki:
http://www.dd-wrt.com/wiki/index.php/Sa...


Basic steps:

Download appropriate firmware. Check online, which is the latest and the most stable.

a.Set your computer to a static IP of 192.168.1.8. (or to whatever subnet the router is on) Disable all firewalls and security. Disable wireless on your computer and only have the router connected to the flashing computer by the ethernet cable between the two.
b. Hard reset prior to flashing. Wait. Check for password page on re-login and change password.
c. Flash firmware. You should use the dd-wrt webgui upgrade page except if you have a belkin router. (For belkin use tftp.exe to flash)
d. Wait...at least three minutes. Lights should return to normal. See important2, below. Failing to wait is how most people brick their routers.
e. Do a power cycle of the router. (Unplug the cord, count to 30 and plug it back in.)
f. Wait for the lights to return to normal usually about 2 minutes.
g. HARD reset again. Wait. Check for the password page and re-login to change the password. Then you can reconfigure your settings manually.
h. Once configured set your computer back to autoIP and autoDNS.

Important: This 30-30-30 hard reset works fine for Asus router, but you do have to power cycle after the reset.


Setting up router (just notes, for not the obvious things)
1.) Printer sharing: v24 preSP2 (build 14929): [Services; USB] Just enable needed USB supports and USB Printer support.
2.) File sharing:v24 preSP2 (build 14929):
[Services; USB] Enable needed USB supports and USB Storage support including the required File System Support.

Check location of USB disk:
~ # dmesg | grep scsi
Find a line like this:
(6) /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3
This tells you, where your disk is, and its partitions.

Create new folder:
~ # mkdir config

Create and edit new usb.startup file:
~ # vi /jffs/etc/config/usb.startup

Instructions from here on require the disk to have 3 partitions as described in: Asus WL500gP, dd-wrt, printer and disk sharing on 4. sep 2008, 08:45:34.

Add lines at the end (i).
--------------------------------------------

#!/bin/sg

# Wait a little.
sleep 10

# Mount disk.
# Partition for Optware.
mount /dev/scsi/host0/bus0/target0/lun0/part2 /opt
sleep 5
# Partition for Storage.
mount /dev/scsi/host0/bus0/target0/lun0/part3 /mnt
sleep 5

---------------------------------------------

Write to file and quit (ESC)(:wq).

Make script executable
~ # chmod +x /jffs/etc/config/usb.startup

Tell the router to execute that script (it should be executed byitself because of its position, but for unknown reason it isn't). Web gui, Administration, Commands, paste:
sh /jffs/etc/config/usb.prewall
click save startup.

Reboot router.
~ # reboot

Check if mounts have been successful.

Download Optware.
~ # wget http://www.wlan-sat.com/boleo/optware/o... -O - | tr -d '\r' > /opt/tmp/optware-install.sh
Install Optware.
~ # sh /opt/tmp/optware-install.sh

(Busybox maybe)

Enable swap. Add these lines to usb.startup
--------------------------------------------
mkswap /dev/scsi/host0/bus0/target0/lun0/part1
swapon /dev/scsi/host0/bus0/target0/lun0/part1
--------------------------------------------

Install samba 3.
~ # wget -O /opt/tmp/ConfSamba3.usb http://www.dd-wrt.com/phpBB2/download.p...
~ # chmod +x /opt/tmp/ConfSamba3.usb
~ # sh /opt/tmp/ConfSamba3.usb

This is the installatio package to upgrade from samba2, but ignore the first warnings considering the "old" samba 2 installation and let it proceed to the end. Be careful about the warnings later on, there shouldn't be any.

After installation run SWAT tool to configure your shares. Use commit changes, stop nmbd, stop pmbd, start smbd, start nmbd, check if shares are working.

That's it :)
Hum?....

klebsiela ::

Mate, zdravo! Sem se preusmeril po tvojem nasvetu iz druge teme.(Zdravo, mi lahko kdo pomaga pri nastavitvah za LAN TO WAN filter. Na ASUS WL500GgP imam več računalnikov in zdaj bi rad nastavil, da recimo nekateri ne bi v določenem času mogli dostopati do interneta. Poskusil sem ze vse mozne kombinacije pa ne dela.... Sicer pa imam Oleg's firmware 1.9.2.7-10.).

Hvala za natancen opis glede diska in printerja. Jaz tudi nimam pojma o Linuxu in se tega najbrz sploh ne bom lotil. Ne vem. Zdi se mi blazno zapleteno. Sicer pa tu nisi opisal, kako bi omejil dostop do interneta do posameznih racunalnikov v razlicnih obdobjih dneva, kar je mene zanimalo. Tu pa bi verjetno rabil iptablice. Te pa so sele komplicirane....

LP
Bojan

coyotee ::

Pozdrav!
Imam sledeč problem:

Router A (Level1) priklopljen na NET (IP 192.168.0.1)
Router B (WL500gp, oleg firmware ) v drugem prostoru priklopljen na Canon pixmo. (IP še po defaultu)

Če sem na netu preko routerja A, ne morem dostopati do printerja, če pa to želim, se morem konektati na Asusa.

Kako naj uredim nastavitve, da bom lahko istočasno na routerju A in da bo možno printanje na router B.

Lp, Bojan


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

[Router] Asus WL500g Premium FAQ (strani: 1 2 3 410 11 12 13 )

Oddelek: Omrežja in internet
61981630 (13391) brez-imenko
»

Asus RT-N16 DD-WRT print server

Oddelek: Omrežja in internet
61064 (954) errhec
»

Media box (strani: 1 2 )

Oddelek: Zvok in slika
5313841 (8495) bikec
»

kako mountat USB ključ v linuxu

Oddelek: Operacijski sistemi
492413 (1920) Senzacionale
»

Linux RH9 NTFS, ISDN

Oddelek: Operacijski sistemi
122057 (1914) Loki

Več podobnih tem