DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-09-10 00:44:36

bas
Member
From: Russia
Registered: 2008-09-09
Posts: 5

HOWTO: use of internal USB (B1 hardware)

I have written small howto about internal USB access. I hope, it will be useful for somebody.
See updated http://dns323.kood.org/hardware:usb page.

Offline

 

#2 2008-09-18 05:21:40

jdoering
Member
Registered: 2008-04-10
Posts: 95

Re: HOWTO: use of internal USB (B1 hardware)

Excellent! I was working on using a RadioShark with my DNS-323 and needed an extra USB port. I used a small hub; but had some startup timing issues. Internal is much cleaner!

I'll have to mod mine up soon.

-Jeff

Offline

 

#3 2008-09-18 16:06:13

Mijzelf
Member / Developer
Registered: 2008-07-05
Posts: 709

Re: HOWTO: use of internal USB (B1 hardware)

The usb_data+ and usb_data- wires must not be too long, or your usb device will work incorrectly.

I think you should twist the wires.

Offline

 

#4 2008-09-18 21:37:29

bas
Member
From: Russia
Registered: 2008-09-09
Posts: 5

Re: HOWTO: use of internal USB (B1 hardware)

jdoering wrote:

Excellent! I was working on using a RadioShark with my DNS-323 and needed an extra USB port. I used a small hub; but had some startup timing issues. Internal is much cleaner!

I'll have to mod mine up soon.

-Jeff

I am glad that my article is helpful. Any questions are welcome.

Mijzelf wrote:

I think you should twist the wires.

This is a good idea

Last edited by bas (2008-09-18 21:38:56)

Offline

 

#5 2008-11-08 13:39:46

mrjeth
Member
Registered: 2006-12-19
Posts: 12

Re: HOWTO: use of internal USB (B1 hardware)

Hello
When I looked at the detailed photos for this hardware modification i couldn't recognice the details on my hardware. I guess that I have the A1 version. Is it possible to do the same usb mod on A1 and have somone done it!
Please let me know as this mod was very good.


Best regards
Tomas

Offline

 

#6 2008-11-10 09:14:43

bas
Member
From: Russia
Registered: 2008-09-09
Posts: 5

Re: HOWTO: use of internal USB (B1 hardware)

mrjeth wrote:

Hello
When I looked at the detailed photos for this hardware modification i couldn't recognice the details on my hardware. I guess that I have the A1 version. Is it possible to do the same usb mod on A1 and have somone done it!
Please let me know as this mod was very good.


Best regards
Tomas

USB outs should be pulled down with 10-15 kOhm resistors. I looked at http://dns323.kood.org/_media/11.jpg?cache=cache
It looks like R185 and R190 are those resistors, but not sure. Try to measure their resistance.

Offline

 

#7 2008-11-11 21:29:24

mrjeth
Member
Registered: 2006-12-19
Posts: 12

Re: HOWTO: use of internal USB (B1 hardware)

Hi
Thanks I'll give it a try later as my DNS-323 is occupied. What is bothering me is the fact that I have an 88F5181 and not 88F5182. Does the 88F5181 also have two USB ports?

I tried to search for it at the Internet but I could not get any details.

Best regards
Tomas

Offline

 

#8 2008-11-11 21:58:40

bas
Member
From: Russia
Registered: 2008-09-09
Posts: 5

Re: HOWTO: use of internal USB (B1 hardware)

mrjeth wrote:

What is bothering me is the fact that I have an 88F5181 and not 88F5182. Does the 88F5181 also have two USB ports?

It can easily be checked, if you have terminal/telnet access to your device. Look at /proc/bus/usb/devices. The file has a record for each USB host controller. In my case:
# grep -i host /proc/bus/usb/devices
S:  Product=EHCI Host Controller
S:  Product=EHCI Host Controller

Offline

 

#9 2008-12-03 21:31:28

mrjeth
Member
Registered: 2006-12-19
Posts: 12

Re: HOWTO: use of internal USB (B1 hardware)

bas wrote:

mrjeth wrote:

What is bothering me is the fact that I have an 88F5181 and not 88F5182. Does the 88F5181 also have two USB ports?

It can easily be checked, if you have terminal/telnet access to your device. Look at /proc/bus/usb/devices. The file has a record for each USB host controller. In my case:
# grep -i host /proc/bus/usb/devices
S:  Product=EHCI Host Controller
S:  Product=EHCI Host Controller

Thank you Bas!
I have checked the usb/devices and there is only one

Best regards
Tomas

Offline

 

#10 2008-12-08 04:17:54

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: HOWTO: use of internal USB (B1 hardware)

mrjeth wrote:

bas wrote:

mrjeth wrote:

What is bothering me is the fact that I have an 88F5181 and not 88F5182. Does the 88F5181 also have two USB ports?

It can easily be checked, if you have terminal/telnet access to your device. Look at /proc/bus/usb/devices. The file has a record for each USB host controller. In my case:
# grep -i host /proc/bus/usb/devices
S:  Product=EHCI Host Controller
S:  Product=EHCI Host Controller

Thank you Bas!
I have checked the usb/devices and there is only one

Best regards
Tomas

I'm confused - I definitely have B1 hardware but I too have only one device listed:
     S:  Product=EHCI Host Controller

Am I missing something or are there potentially different versions of B1 hardware?

Offline

 

#11 2009-07-11 01:35:50

neonpolaris
Member
Registered: 2009-06-19
Posts: 20

Re: HOWTO: use of internal USB (B1 hardware)

I've got B1 hardware (silkscreened on the board even) and I definately see two host controllers listed.

Thanks for the guide BAS, awesome work!  I took my unit apart today to do the same and then I saw how ridiculously small those resistors are!  You have skill man.  No way I'm trying that on this box.  I don't need the second USB port for anything, I just didn't want my drive sticking out so far (more likely to get my port broken).  I'll just buy one of those itty bitty flash drives. smile

Last edited by neonpolaris (2010-11-09 05:59:03)

Offline

 

#12 2010-01-15 19:55:54

ojosch
Member
Registered: 2010-01-15
Posts: 18

Re: HOWTO: use of internal USB (B1 hardware)

bas wrote:

I have written small howto about internal USB access. I hope, it will be useful for somebody.
See updated http://dns323.kood.org/hardware:usb page.

YES... Thanks a lot. This was my big break. Thanks!

I needed my main USB port for UPS shutdown feature (NUT Fun_plug), but I also wanted Fun_plug to run off of a USB stick so I can easily run e2fsckr to check file system health without having to worry about hassles with graceful unmounting of the storage drives since Fun_plug is on the USB. This how-to was my killer fix from heaven.

I just got done with it a couple hours ago and it is working nicely. I took a slightly different approach than bas though. I didn't want to disassemble a USB stick and have it all as permanent as bas has since I was worried that if mine fails I wanted to be able to swap it easily. I know that the likelihood of it failing is probably rare but I just don't want to hassle with problems down the line. So I put a receptacle on my install so you can just use a standard USB stick without having to tear it apart. I have taken a bunch of pictures just to add to the ones that are already linked to here from that Wiki how-to.

See Mine:

http://www.ojbox.com/DNS-323/DNS-323-00.JPG

http://www.ojbox.com/DNS-323/DNS-323-01.JPG

http://www.ojbox.com/DNS-323/DNS-323-02.JPG

http://www.ojbox.com/DNS-323/DNS-323-03.JPG

http://www.ojbox.com/DNS-323/DNS-323-04.JPG

http://www.ojbox.com/DNS-323/DNS-323-05.JPG

http://www.ojbox.com/DNS-323/DNS-323-06.JPG

http://www.ojbox.com/DNS-323/DNS-323-07.JPG

I just added some more detail since the original pics in the Wiki were not too clear on the power side of things. Also for USB pinout, just Google 'USB pinout' and it is easy to find the wiring. Power + is Pin#1, then Data are the middle 2 pins, and then Power - is Pin#4.

Again, thanks for this wonderful how-to. I just registered here right now, just to say this.

Also, one word of caution: If you are not experienced with soldiering, practice first on an old piece of broken hardware with similar size components so that you can get the hang of it before you attempt ruining your DNS-323 board. Make sure you have the right soldier iron with a very fine tip, and make sure you are using very thin soldier. Make sure you clean the tip (using the wet sponge) and tin the tip before attempting to soldier the wires. I had no problem doing the soldiering, but I do have a moderate level of experience. It is not something that a beginner should worry about though, I'm just saying that it might help to practice first on something you don't care about so you can make sure that you can do it with confidence. Google for 'How to properly soldier electronics' and you can find video tutorials explaining how to do it right. And the one last thing is, the 'Helping Hands' magnifying glass is a must.

Good luck to any who try this mod.

Last edited by ojosch (2010-01-15 19:59:04)

Offline

 

#13 2010-01-15 21:40:57

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: HOWTO: use of internal USB (B1 hardware)

ojosch wrote:

I needed my main USB port for UPS shutdown feature (NUT Fun_plug), but I also wanted Fun_plug to run off of a USB stick so I can easily run e2fsckr to check file system health without having to worry about hassles with graceful unmounting of the storage drives since Fun_plug is on the USB. This how-to was my killer fix from heaven.

You know you could also use a hub instead? using the second usb root hub only makes sense if you need additional bandwidth (for external hdds e.g.).

Offline

 

#14 2010-01-16 15:06:44

ojosch
Member
Registered: 2010-01-15
Posts: 18

Re: HOWTO: use of internal USB (B1 hardware)

I didn't want the hub hanging off the back of the unit. This unit I am building for my Mother and I have to be able to support it and I'll have to walk them through plugging it all in over the phone since they are 2 states away from me. I just didn't want all that clutter. I originally did set this all up using a hub and it was very tacky. I am happy that I was able to mount the flash drive all internally, so now I only have to explain to my Mother how to plug in the USB cable that goes from the APC UPS to the Dlink, and she's done. No frills, no gimmicks, just simple for her. Plus, it has a nice clean installation. It is just going to be sitting on a desk in her office. A hub is very tacky. Especially when it is so critical to the proper functioning of the unit. The USB memory stick is a mounted filesystem and if it gets bumped or unplugged while running it may well corrupt files, which then I'll have to support that while 2 states away. I like it best when this is all self-contained inside the Dlink unit. If the UPS somehow becomes unplugged while unit is running there are no harsh consequences. If this were going to be for me at my house, I'd agree with you that the USB hub would be fine, but for my Mother and rowdy little sister, I feel much better having it this way, and besides, it was not hard to mount it this way. I had maybe 5 soldiers total and a couple hours work, and I had to sacrifice a USB cable to get the parts to make it happen.

Last edited by ojosch (2010-01-16 15:08:40)

Offline

 

#15 2010-01-16 15:24:27

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: HOWTO: use of internal USB (B1 hardware)

Yeah, I understand. Connecting a usb-stick internally looks nice. but just that you know, i had to change my usb stick every 6-12 months, cause they broke.... io error, fs error & stuff.
i hope you used a high quality one which lasts long, as you said the proper functioning is critical.

Last edited by oxygen (2010-01-16 15:26:33)

Offline

 

#16 2010-01-16 18:32:32

ojosch
Member
Registered: 2010-01-15
Posts: 18

Re: HOWTO: use of internal USB (B1 hardware)

Yeah, I was originally going to run the swap and / off of the flash too, but after thinking it through I pulled the plug on that idea, because I didn't want the flash drive to be over active and swap might have been slow running off of flash because of slow writes. I was afraid that it could take life out of this setup much faster, so I never did follow through on that idea. Right now, the only thing that this flash does is run fun_plug, but even so, I am not running many fun_plugs. I run Cleanboot, which it just initially loads a couple of bins into the ramdrive for restart, and shutdown commands that will be run at shutdown or reboot to make it shutdown gracefully. Then I run the sshd fun_plug which does run as a daemon once started, but will not have any activity 95% of the time unless I ever need to log into it. And the 3rd and last fun_plug I run is the NUT tools for UPS shutdown, which I've modded that startup script to copy all the bins and conf files to the /usr/sbin and /etc ramdisk folders where they will then be started and ran from there. So my USB flash drive will just sit idle most of the time. I mainly wanted everything fun_plug to load off of the USB flash drive so that there where no file dependencies on the /mnt/HD_a2 drive so that I can simply shut down smbd and nmbd and unmount the drive without hassle so I can run the e2fsck to scan the disk when needed. I know it seems like a lot of trouble I went through to get some simple conveniences but if there is anything I've learned from supporting fellow family's IT equipment, it is like sending a satellite to orbit, it is better to have it all set up right so that once in orbit, you can remotely fix anything you need to on it with relative ease. I just don't want to have any trouble down the line. And also, if the USB fails to mount, it will just load the normal ffp directory of the storage drives as a backup method of still getting fun_plug since the .bootstrap/setup.sh file looks for the /dev location of the usb and if it isn't there, it wont keep going. If it were to hang there, I can just go to the fun_plug file in the HD_a2 folder from a Windows share and mod the file to not look for the .bootstrap/setup.sh file and then reboot it from the web GUI and it will still load the normal fun_plug ffp directory and connect all the sym links to there, so that my sshd will still work. Then if that were to happen here UPS monitoring will still work and then next time I went to visit, I would bring a spare flash drive with me and it would take less than 20 mins to change it out since I left a normal USB connector on it, it is easy to just plug a new one in. but I really doubt it will fail though, but if it were just one partition on it that failed, I still have 2 more partitions that I set on it with fdisk before I installed since I originally was going to run swap and / on it, but they they are just sitting there as spare partitions (see my above picture showing my puTTY window and you can see the other 2 partitions. I am only using 1 partition now. I could convert the swap partition back to ext2, and then just copy the ffp folders onto each of the other 2 partitions for backup. Then if I ever have problems with the current partition or cells fail and I get filesystem errors, I will just go to the setup.sh file and re-dir it to a different partition. I'm not really too worried. I have about 5 backup plans counting so far. Most of the time this thing will just be sitting in standby since my Mother will probably just use it for backing up pictures and docs from her main computers.

Last edited by ojosch (2010-01-16 18:38:11)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB