Discover SCiO Sensor
September 17, 2015

The SCiO sensor uses Bluetooth Low Energy (BLE) to communicate with the iOS device. Your mobile device must be paired to the SCiO sensor to enable the two devices to communicate with each other. To pair the iOS device with the SCiO, ensure that the Bluetooth settings on the mobile device are turned on. (This is normally done automatically when instantiating the CPScioDevice object). Then search for the Bluetooth device and retrieve its address. The BLE API provides standard functions for connecting two devices together. We recommend that you familiarize yourself with Bluetooth for Developers

Below is a  code example for how to browse for SCiO devices. 

- (void)viewWillAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    
    __weak typeof(&*self)weakSelf = self;
    [[CPScioDevice sharedInstance] browseWithRefreshBlock:^(NSArray *devices) {
        weakSelf.devices = devices;
        [weakSelf.tableView reloadData];
    }];
}

Once you have the list of all SCiO sensors your end user can select the SCiO sensor to connect to.

Leave a Reply