1

I realize it is impossible to actually utilize any external accessories that are not MFI certified with the iPhone. Is there any way to simply detect a connection? All I would like to do is acquire the serial number from a USB drive.

So far I've tried the following

- (void)pollAccessories {
    statusText.text = [NSString stringWithFormat:@"%@%@", statusText.text, @"\r\nPolling Accessories..."];

    NSArray *accessories = [[EAAccessoryManager sharedAccessoryManager] connectedAccessories];

    for (EAAccessory *obj in accessories){
        statusText.text = [NSString stringWithFormat:@"%@%@", statusText.text, @"\r\nLocated Accessory"];
        if(obj.connected)
            statusText.text = [NSString stringWithFormat:@"%@%@", statusText.text, @"\r\nConnected\r\n"];
    }
}

Seems to work in the simulator (I'm getting two accessories that are "connected"). Ran it on my phone connecting to a PC and my PS3 with no joy. Unfortunately I don't have the appropriate dongle on hand to test a proper usb drive.

UPDATE 4/27/11:

I managed to test my code on an iHome radio. It does detect the connection, so the code is working. I've ordered a USB dongle to see if I can detect a thumb drive.

RLH
  • 15,230
  • 22
  • 98
  • 182
Jason George
  • 6,992
  • 8
  • 44
  • 60

1 Answers1

1

I got my hands on a USB dongle and sadly the OS provides no indication of a connection to a non-MFI device. This is not possible without some sort of intermediary dongle that is MFI certified.

Jason George
  • 6,992
  • 8
  • 44
  • 60
  • How can i detect the non MFI register accessory to iPhone – Raj Nov 02 '11 at 11:32
  • To my knowledge, this is not currently possible. The operating system gives no indication that a device has been connected if it is not MFI certified. Your only option would be the enter the MFI program, then design and manufacture your own MFI device (which isn't much of an option for most of us). – Jason George Nov 02 '11 at 15:52