title: Getting Issues while connecting device with serial Bluetooth
body: <p>I am facing 2 problems related to regular Bluetooth.Here is my code.</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
      [NSTimer scheduledTimerWithTimeInterval:3.0 target:self    selector:@selector(showElements) userInfo:nil repeats:NO]; 
  [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(accessoryConnected:) name:EAAccessoryDidConnectNotification object:nil];
      [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(accessoryDisconnected:) name:EAAccessoryDidConnectNotification object:nil];    
      [[EAAccessoryManager sharedAccessoryManager]registerForLocalNotifications];
  }
  
  -(void)showElements{
      [[EAAccessoryManager sharedAccessoryManager] showBluetoothAccessoryPickerWithNameFilter:nil completion:^(NSError *error) {
          if (error) {
              NSLog(@"error :%@", error);
          }
          else{
              NSLog(@"Its Working");
          }
      }];    
  }
  
  - (void)accessoryConnected:(NSNotification *)notification
  {    
      EAAccessory *connectedAccessory = [[notification userInfo] objectForKey:EAAccessoryKey];
  
  }
  </code></pre>
  
  <p>1) I am getting this error after connection got established.</p>
  
  <pre><code>error :Error Domain=EABluetoothAccessoryPickerErrorDomain Code=1 "(null)"
  </code></pre>
  
  <p>Here is the full log:-</p>
  
  <pre><code>BTM: attaching to BTServer
  BTM: setting pairing enabled
  BTM: found device "ESGAA0010" 00:04:3E:95:BF:82
  BTM: disabling device scanning
  BTM: connecting to device "ESGAA0010" 00:04:3E:95:BF:82
  BTM: attempting to connect to service 0x00000080 on device "ESGAA0010" 00:04:3E:95:BF:82
  BTM: connection to service 0x00000080 on device "ESGAA0010" 00:04:3E:95:BF:82 succeeded
  BTM: setting pairing disabled
  error :Error Domain=EABluetoothAccessoryPickerErrorDomain Code=1 "(null)"
  </code></pre>
  
  <p>you can see the last line of log, its showing error. As i searched and found that apple documentation says the error means device not found(<code>EABluetoothAccessoryPickerResultNotFound</code>), but how come in log it shows its connected if its not found.</p>
  
  <p>2) <code>accessoryConnected:</code> method not getting called. Its most probably because of first issue. But i thought its worth mentioning here.</p>
  
  <p>I have added ExternalAccessory framework and device is MFI compliant.
  Help me to fix these. Thanks</p>