I am having some difficulties getting ExternalAccessory running for my ipod...
I have a bluecove bluetooth listener running on my computer (mac, Mountain Lion) in java (Code for that here: http://pastebin.com/j6Eu0H66), and I have successfully paired my ipod with my computer. However, when I have my ipod list out:
[[EAAccessoryManager sharedAccessoryManager] connectedAccessories];
I get nothing but crickets. I am assuming this is because I did not set any valid accessories in my info.plist -- but the problem is, I have no idea what I should enter!
Does anyone have any ideas on why I can't find my computer via the EAAccessoryManager and does anyone have any idea what classifies as a valid protocol? I can find no documentation on what to actually write as a protocol.
P.S. As an earlier part of this project, I was trying to pair my computer with my NXT via lejos, however I ran into this problem:
https://groups.google.com/forum/?fromgroups=#!topic/bluecove-users/7jWv1V1GC-4
As a result, I used the hack posted a couple comments after the first, and replaced my Mountain Lion IOBluetooth.framework with a Lion IOBluetooth.framework. I am not sure if that has a huge impact on the iOS side of things, but I figured I should let you guys know.
P.S.S. The code I am using to print out the list of accessories: Note that it does not return anything yet, nor does it use protocolString yet.
I get the "Testing123" log, but not the "Device!" log
- (EASession *)openSessionForProtocol:(NSString *)protocolString
{
NSLog(@"Testing123");
NSArray *accessories = [[EAAccessoryManager sharedAccessoryManager]
connectedAccessories];
EAAccessory *accessory = nil;
EASession *session = nil;
for (EAAccessory *obj in accessories)
{
NSLog(@"Device!");
/*
if ([[obj protocolStrings] containsObject:protocolString])
{
accessory = obj;
break;
}
*/
}
return NULL;
}
Also, here is a screenshot of my info.Plist: