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 2011-05-01 05:43:00

tyj82
Member
Registered: 2010-11-06
Posts: 9

PowerOff USB port

I need some command so I can turn off the USB port for DNS 323.

The reason for this is when my internet connection loss, DNS 323 will shutdown the power on the USB port. Power back on 30 second later

This will poweroff the router and reboot the router. I think if there is a way to power off the USB port. I can write a script to monitor and reboot the router.

Offline

 

#2 2011-05-01 21:19:21

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: PowerOff USB port

tyj82 wrote:

The reason for this is when my internet connection loss, DNS 323 will shutdown the power on the USB port. Power back on 30 second later

Do you really mean what you typed here? If your router loses the internet connection to your ISP, then the DNS powers down the USB port? Sounds impossible to me.

Do you mean that when the DNS323 drops the lan connection, that it powers down the USB port? This also sounds improbable, but I guess it may do that since in theory it can't be accessed.

Last edited by FunFiler (2011-05-01 21:20:03)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#3 2011-05-04 06:14:38

eastpole
Member
Registered: 2009-10-02
Posts: 9

Re: PowerOff USB port

tyj82 wrote:

I need some command so I can turn off the USB port for DNS 323.

I know what you want to do here. I believe it is impossible or very difficult.
A while ago I looked at using a USB interface to turn a light (a USB LED lamp) on and off with a program. It turned out, though, that many motherboards do not let you shut off the power to the USB. If the machine is up, then so is the USB. Perhaps you can turn the current up or down, though -- this is expected in the USB2 spec, I think.

I'd be OK if I'm wrong, since I'd like to do it!
And I'd be really OK if the dns-323 is the exception and can shut off power to the USB port.

Let us know your outcome, tyj82

Last edited by eastpole (2011-05-04 06:16:38)

Offline

 

#4 2011-05-15 10:40:55

tyj82
Member
Registered: 2010-11-06
Posts: 9

Re: PowerOff USB port

eastpole wrote:

tyj82 wrote:

I need some command so I can turn off the USB port for DNS 323.

I know what you want to do here. I believe it is impossible or very difficult.
A while ago I looked at using a USB interface to turn a light (a USB LED lamp) on and off with a program. It turned out, though, that many motherboards do not let you shut off the power to the USB. If the machine is up, then so is the USB. Perhaps you can turn the current up or down, though -- this is expected in the USB2 spec, I think.

I'd be OK if I'm wrong, since I'd like to do it!
And I'd be really OK if the dns-323 is the exception and can shut off power to the USB port.

Let us know your outcome, tyj82

I try rebooting the dns 323 using do_reboot and usb is not losing its power at all. I am working with my friend to create electronic circuit to do the job.

Now the question is can i echo the command directly to /dev/ttyS0
eg

echo "power on 3" > /dev/ttyS0. (assuming 3 is the powerswitch port)

How do i monitor the reply. I device suppose to respond "ok"

Offline

 

#5 2011-05-15 13:15:36

ivan1
Member
Registered: 2011-05-02
Posts: 17

Re: PowerOff USB port

tyj82 wrote:

I need some command so I can turn off the USB port for DNS 323.

The reason for this is when my internet connection loss, DNS 323 will shutdown the power on the USB port. Power back on 30 second later

This will poweroff the router and reboot the router. I think if there is a way to power off the USB port. I can write a script to monitor and reboot the router.

I am unable to understand what you want to do for several reasons.

1)  How does the DNS323 know if the router has lost the internet connection?

2)  It would be better to monitor the router for the information you want and use that to trigger a relay to reboot the router.

In regards to 1) I don't think there is any way that the 323 can monitor the internet connection except by sending a ping to an external site and if you do that with any frequency you could find yourself in trouble for trying a DOS attack.

It would be much better if you monitored the router in some way for the information you require - read the router manual to see if it can supply that information in some way.

Finally, is it necessary to reboot the router if your ISP drops the connection?  I have had that happen on odd occasions here and the router has picked up the connection when it came back up with out problems.

Offline

 

#6 2011-05-15 16:17:49

tyj82
Member
Registered: 2010-11-06
Posts: 9

Re: PowerOff USB port

ivan1 wrote:

tyj82 wrote:

I need some command so I can turn off the USB port for DNS 323.

The reason for this is when my internet connection loss, DNS 323 will shutdown the power on the USB port. Power back on 30 second later

This will poweroff the router and reboot the router. I think if there is a way to power off the USB port. I can write a script to monitor and reboot the router.

I am unable to understand what you want to do for several reasons.

1)  How does the DNS323 know if the router has lost the internet connection?

2)  It would be better to monitor the router for the information you want and use that to trigger a relay to reboot the router.

In regards to 1) I don't think there is any way that the 323 can monitor the internet connection except by sending a ping to an external site and if you do that with any frequency you could find yourself in trouble for trying a DOS attack.

It would be much better if you monitored the router in some way for the information you require - read the router manual to see if it can supply that information in some way.

Finally, is it necessary to reboot the router if your ISP drops the connection?  I have had that happen on odd occasions here and the router has picked up the connection when it came back up with out problems.

Ivan1, thanks for look into the this issue.

1) yes i will be ping www.google.com and www.yahoo.com every 10 min. 4 ping will do. if no result send another ping in next 5min.
if still fail reboot the router.

2) i totaly forgot about this. I can just send snmp as second verification. BTW when the router hang, i still can ping it.

Finally if the ISP drop connection, usually it will restore in 5minutes, my router takes about 2min to establish the DSL connection.

If it does not pick up let it reboot the router and hope it restore.

Last advice do not by TP-Link router. i started this idea because my tp-link keep hanging especially when i connect from the internet.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB