Jump to ID:
Multimedia

Project Home

Documents

Discussions

Wiki

Project Info
Forum Topic - Retrieving reason for failure of iPod connection: (5 Items)
   
 
 
Retrieving reason for failure of iPod connection  
Hi,

I have a reasonably straight-forward requirement and would like to know what's the easiest solution.  Upon a user 
connecting an iPod to the target, the connection can fail for numerous reasons (e.g. firmware update required etc) and 
as such I would like to notify the user on-screen as to the reason of failure.

Is there currently an API within the Aviage MME that allows me to easily retrieve the current connection status of an 
iPod, and upon an iPod connection failing, allowing me to retrieve the reason of failure?

Cheers,
Radek.
Re: Retrieving reason for failure of iPod connection  
> I have a reasonably straight-forward requirement and would like to know what's
>  the easiest solution.  Upon a user connecting an iPod to the target, the 
> connection can fail for numerous reasons (e.g. firmware update required etc)
> and as such I would like to notify the user on-screen as to the reason of 
> failure.

I don't think there should be any firmware update needed. Are you using serial or USB? The iPod driver should be able to
 connect to "almost" any iPod model/firmware version. The only reason I say almost is that we don't support the first 
two iPod generations from 2000/2001 (they had a different kind of connector).
 
> Is there currently an API within the Aviage MME that allows me to easily 
> retrieve the current connection status of an iPod, and upon an iPod connection
>  failing, allowing me to retrieve the reason of failure?

There are many ways to tell if the iPod is connected, but not really any easy ways to find out why it failed to connect.
 I'd like to know exactly what you are looking for, if you provide more details maybe I can comment further. We can get 
into more details once you mention the connection type, but for USB, you can tell that the iPod is plugged into the 
system, but not mounted, which would mean there was a communication failure. However, communication failures are not 
normal, so you could pop up a generic error message, but not get to the level of saying which command failed. 

Regards,
Gilles


Re: Retrieving reason for failure of iPod connection  
Hi,

I am using USB and as such the earlier generation iPods are not applicable, therefore that shouldn't be an issue.

In terms of potential reasons for failure, the main scenario that would be good to capture is iPod authentication 
failure.  Another failure reason (although not as important) is when the iPod fails to respond to the iAP command (such 
as in a low battery condition - rare but still possible). 


Regards, 
Radek.
Re: Retrieving reason for failure of iPod connection  
> I am using USB and as such the earlier generation iPods are not applicable, 
> therefore that shouldn't be an issue.

If you use USB, not all iPods support digital audio (or even the iPod communication protocol itself over USB). If it 
doesn't support the iPod communication protocol, the iPod driver won't even get launched by the system enumerator. 
Instead, the iPod will appear as a mass storage device. You can add your own utility to the system enumerator to be 
notified when an iPod is launched as mass storage (or to be notified when it isn't a HID device, which is the 
requirement for iPod protocol).

> In terms of potential reasons for failure, the main scenario that would be 
> good to capture is iPod authentication failure. 

No, there isn't an easy way to see this issue. The iPod driver will automatically attempt to re authenticate. The issue 
here is that the authentication can take some time, so the iPod gives us full access while authentication is occurring, 
so you can actually get full access before we are authenticated. Basically, the mountpoint comes up and some time after 
(it can even be a minute later) the authentication can fail. 

> Another failure reason (
> although not as important) is when the iPod fails to respond to the iAP 
> command (such as in a low battery condition - rare but still possible). 

If the iPod fails to respond to a command, the higher level caller will be returned an errno of ETIMEDOUT (i.e. if you 
try to set the random mode and there is no response).

Yet another relevant error is if the iPod supports USB but not digital audio. This means you can't play any audio on 
this device. It can be detected by using mme_device_get_config() which returns firmware info and other iPod capabilities
.

Regards,
Gilles




Re: Retrieving reason for failure of iPod connection  
Another comment, the MME is a generic multimedia control interface and as such isn't designed to have APIs for 
determining various devices states and status. This is why you may have to do work with the enumerators to catch iPods 
that don't have a HID interface for example.