Apple Watch CoreBluetooth - Advertise as Central

I want to catch advertising data (eg. Watch name and RSSI) from another Apple Watch, over BLE. We know that using BLE on Apple Watch can only do Central. They do not need to be connected, just to catch each other advertising data and calculate distance based on RSSI. I have formula for transfering RSSI values to distance.

How to make Central on one Watch to advertise (data and RSSI) and get those data on another Watch Central that is advertising Name and RSSI?

The code below is using peripheral. How to do it with central?

// CBCentralManagerDelegate - This is called with the CBPeripheral class as its main input parameter. 
// This contains most of the information there is to know about a BLE peripheral.  
func centralManager(_ central: CBCentralManager, 
                    didDiscover peripheral: CBPeripheral, 
                    advertisementData: [String : Any], 
                    rssi RSSI: NSNumber) { 
     print("Peripheral: \(peripheral.name), RSSI: \(rssi)") 
}

Thanks in advance

Post not yet marked as solved Up vote post of SashaMilic Down vote post of SashaMilic
1.7k views

Replies

Figured that i can also use Watch to advertise data:

https://developer.apple.com/documentation/corebluetooth/cbperipheralmanager/1393252-startadvertising

Sorry to revive this, but were you able to advertise data and do you know if I could listen to this data on the iphone?