Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Aug 30, 2007, 03:53 PM   #1
macrumors 6502
Join Date: Jun 2005
Getting system to re-recognize an "unknown" Firewire device

I'm writing a small command line utility that does nothing but disconnect and reconnect a badly behaved FireWire device (I often have to do this physically, so I want a software equivalent that can be automated). I've gotten the disconnection down (using the firewire device interface's Seize() function), but I can't get the system to re-recognize the device. I'm told by the ADC documentation that calling Close() and IOServiceRequestProbe() after having Seize()'d the device, will '[make] it appear that the device has been "re-plugged"', but it doesn't seem to have that effect. Instead, the device shows up in SystemProfiler as "Unknown Device." It can still be accessed programmatically, but the system no longer recognizes it. Any ideas?

io_object_t aDevice;
IOCFPlugInInterface **cfPlugInInterface(0);
SInt32 theScore;
IOFireWireLibDeviceRef fwDeviceInterface(0);
bool found(false);
while (aDevice = IOIteratorNext(iterator)) {
	if ((kIOReturnSuccess == IOCreatePlugInInterfaceForService(
	) && cfPlugInInterface && (kIOReturnSuccess == (*cfPlugInInterface)->QueryInterface(
			reinterpret_cast<void **>(&fwDeviceInterface)
	)) {
		found = true;
if (found) {
	(*fwDeviceInterface)->Seize(fwDeviceInterface, NULL);
	IOServiceRequestProbe(aDevice, 0);
iPhone 5S 64㎇ 8.3 | iPad 4g 128㎇ 8.3 | WATCH 42㎜ SS | tv 3g 7.1 | TB Display | Airport
MacBook Pro 13" Retina i7 2.9㎓/8㎇/768㎇ 10.10.3 | Mac mini C2D 2.66㎓/4㎇/120㎇ SSD 10.8.2
brianus is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
"Another device is using this computer's IP address""Shared" user's slowing down Wifi mnya OS X 2 Feb 15, 2014 01:30 PM
All iPads: 128Gb Cellular iPad Air - Stolen by the "unknown signer" trevpimp iPad 25 Dec 2, 2013 04:52 AM
Website for IMEIinfo says lock status "Unknown" shankar2 iPhone 10 Sep 25, 2013 11:50 PM
"Message not found" text from unknown (with screen shot) rrandyy iPhone 17 May 4, 2013 12:55 AM
Verizon iPhone 5 "2YR Contract" vs "Device only" gMacbookPro iPhone 2 Oct 3, 2012 05:24 PM

Forum Jump

All times are GMT -5. The time now is 02:35 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC