ios - Is an iPhone being peripheral and central with connecting to several peripheral iPhones one after another doable? -
my app needs detect other iphones , connect of them 1 @ time (those iphones have same functionality). implemented both peripheral , central. try connecting phone if:
if (![_discoveredperipheral isconnected] && [[uidevice currentdevice] name] < [advertisementdata objectforkey:@"kcbadvdatalocalname"])
(i advertise name of device avoid both devices connect each other @ same time)
it works correctly, after few minutes error:
[1622:1103] corebluetooth[error] xpc connection interrupted, resetting
is problem in algorithm of connecting? or not doable peripheral , connect central @ same time?
i working same kind of application. understand trying use same device central peripheral application .you cannot . because have observe peripheral application can detected when in foreground , in same device cant run 2 program in foreground @ time . need install central , peripheral application in 2 separate devices .
Comments
Post a Comment