Jump to content
Sign in to follow this  
jaja714

Firewire power toggle

Recommended Posts

I have a Firewire device tightly fit in a cabinet that I needed to "reboot" once in a while.  It is a pain to always grab the firewire cable, pull it out, wait 5 seconds, and then plug it back in a few times a day.

Are there any AutoIT solutions so that I can programmatically shut down power to the Firewire port, wait 5 seconds and then restore it?

Share this post


Link to post
Share on other sites

The only way I have done so is with the DevCon utility. However, depending on the device, a "hard stop" of simply disabling the port may not be a good idea.

http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707(v=vs.85).aspx

Share this post


Link to post
Share on other sites

http://support.microsoft.com/kb/311272

devcon disable *MSLOOP

Disables all devices that have a hardware ID that ends in "MSLOOP" (including "*MSLOOP").

 


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Look here for a list of commands: http://msdn.microsoft.com/en-us/library/windows/hardware/ff544766(v=vs.85).aspx

It would be something akin to...

ShellExecuteWait("devcon.exe", "/m:\\computer /r <command> <args>")
; Or
RunWait("devcon.exe /m:\\computer /r <command> <args>")

The help file can help you with the params for either ShellExecuteWait or RunWait

Share this post


Link to post
Share on other sites

duh sorry ... I knew that!

anyway, when I try "devcon disable *MSLOOP", devcon says "no devices disabled" and when I try "devcon enable *MSLOOP", it says "no devices enabled".

Share this post


Link to post
Share on other sites

I am running it from the command line.  Once it works, I can incorporate it into AutoIt.  Unfortunately *MSLOOP does not work for any devcon command

Share this post


Link to post
Share on other sites

Well, until someone shows that they have successfully used devcon to disable, enable, and restart devices, it is safe to assume that devcon does not work.
 
I finally found that *MSLOOP is really just some sort of example and has nothing to do with firewire.  My firewire port shows up in device manager as IEEE_* but that doesn't work with devcon either.  With a devcon list classes command I see that firewire was actually class 1394.  When I show devices in that class, I get the device id.  When I show that device id, is shows the driver is running.  When I try to disable that device id, devcon cannot.  Yes, I am running CMD as admin.
 

 

C:>devcon listclass 1394
Listing 1 device(s) for setup class "1394" (IEEE 1394 Bus host controllers).
PCI\VEN_1106&DEV_3044&SUBSYS_30441106&REV_46\5&36BEC05D&0&0800E4: VIA 1394 OHCI Compliant Host Controller

C:>devcon status "@PCI\VEN_1106&DEV_3044&SUBSYS_30441106&REV_46\5&36BEC05D&0&0800E4"
PCI\VEN_1106&DEV_3044&SUBSYS_30441106&REV_46\5&36BEC05D&0&0800E4
    Name: VIA 1394 OHCI Compliant Host Controller
    Driver is running.
1 matching device(s) found.

C:>devcon disable "@PCI\VEN_1106&DEV_3044&SUBSYS_30441106&REV_46\5&36BEC05D&0&0800E4"
PCI\VEN_1106&DEV_3044&SUBSYS_30441106&REV_46\5&36BEC05D&0&0800E4: Disable failed


No devices disabled.
Edited by jaja714

Share this post


Link to post
Share on other sites

bump ... after a few years ... I am still seeking a solution for this ;)I'm tired of bumping my head every day unplugging and plugging this thing in!

Perhaps someone has new insight into how best to control certain ports on a pc with AutoIt?

Edited by jaja714

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...