Dim per As NativeObject = manager.GetPeripheralObject
Dim central As NativeObject = Me
central.RunMethod("GetRSSIVal:", Array(per))
#IF OBJC
#import <CoreBluetooth/CoreBluetooth.h>
#import <CoreBluetooth/CBPeripheral.h>
#import <CoreBluetooth/CBCentralManager.h>
- (void)GetRSSIVal:(CBPeripheral*)peripheral {
// CBPeripheral *peripheral = [CBPeripheral manager:retrieveConnectedPeripherals];
peripheral.delegate = self;
[peripheral readRSSI];
NSLog(@"Peripheral %@", peripheral.name);
}
- (void)peripheral:(CBPeripheral *)peripheral
didReadRSSI:(NSNumber *)RSSI
error:(NSError *)error {
NSLog(@"RSSI returned %@", [RSSI stringValue]);
// [self.bi raiseEvent:nil event:@"some_sub:" params:@[RSSI]];
}
#End If