0

I have a script that turns the phone into a beacon and broadcasts its location using the iBeacons functionality. Here is the very simple code:

 //--- Start broadcasting
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"some-static-uuid"];
 self.beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid major:@"1" minor:@"2" identifier:@"com.myidentifer"];

On the SAME device, I want to listen for other beacons close by... So I have a similar script running and I star the "ranging" service.

Problem that I am running into is that it doesn't seem to work if I broadcast and listen at the same time... I have a script running that alternates the listening and broadcasting, and this seems to work "ok"... But I would really rather have these functions running simultaneously.

Is this even possible?

rckehoe
  • 1,198
  • 15
  • 16

1 Answers1

1

No, it is an hardware limitation. If the bluetooth in the device is broadcasting an ibeacon signal (peripheral mode), it is operating in a different mode and it cannot at the same time scan for ibeacons.

Sandro Machado
  • 9,921
  • 4
  • 36
  • 57
  • That makes sense and it was what I thought. Thanks for the info! Is this by any chance backed up in the documentation anywhere? – rckehoe Jul 14 '14 at 18:09
  • I dont find documentation talking about that. This guy found a way to work the two modes "at the same time", but de device cannot discover himself, so it should be work alternately http://stackoverflow.com/a/20228897/3482000 – Sandro Machado Jul 14 '14 at 18:24