PTDBeanRadioConfig Class Reference

Inherits from NSObject
Declared in PTDBeanRadioConfig.h

Overview

Represents Radio configuration for the Bean

Min Advertising Interval: 20ms Max Advertising Interval: 1285ms Min Connection Interval: 20ms Max Connection Interval: 1980ms

Example:
// sets a config
PTDBeanRadioConfig *config = [[PTDBeanRadioConfig alloc] init];
config.advertisingInterval = 100;
config.connectionInterval = 200;
config.power = PTDTxPower_4dB
config.name = @"myname";
[self.bean setRadioConfig:config];
// reads a config
[self.bean readRadioConfig];
// listens for the Bean to tell us the config
-(void)bean:(PTDBean*)bean didUpdateRadioConfig:(PTDBeanRadioConfig*)config {
    NSString *msg = [NSString stringWithFormat:@"received advertising interval:%f connection interval:%f name:%@ power:%d", config.advertisingInterval, config.connectionInterval, config.name, (int)config.power];
    PTDLog(@"%@",msg);
}

Setup

  advertisingInterval

The Bean’s bluetooth advertisting interval in ms

@property (nonatomic, readwrite) CGFloat advertisingInterval

Declared In

PTDBeanRadioConfig.h

  connectionInterval

The Bean bluetooth connection interval in ms

@property (nonatomic, readwrite) CGFloat connectionInterval

Declared In

PTDBeanRadioConfig.h

  power

The Bean bluetooth transmission power

@property (nonatomic, readwrite) PTDTxPower_dB power

Declared In

PTDBeanRadioConfig.h

  advertisingMode

The Bean advertising mode

@property (nonatomic, readwrite) PTDAdvertisingMode advertisingMode

Declared In

PTDBeanRadioConfig.h

  iBeacon_UUID

The Bean iBeacon 16-bit UUID using the base: “A495xxxx-C5B1-4B44-B512-1370F02D74DE”

@property (nonatomic, readwrite) UInt16 iBeacon_UUID

Declared In

PTDBeanRadioConfig.h

  iBeacon_majorID

The Bean iBeacon Major ID

@property (nonatomic, readwrite) UInt16 iBeacon_majorID

Declared In

PTDBeanRadioConfig.h

  iBeacon_minorID

The Bean iBeacon Minor ID

@property (nonatomic, readwrite) UInt16 iBeacon_minorID

Declared In

PTDBeanRadioConfig.h

  name

The Bean name

@property (nonatomic, strong) NSString *name

Declared In

PTDBeanRadioConfig.h

  pairingPinEnabled

A Boolean that indicates if the Bean’s pairing pin is enabled.

@property (nonatomic) BOOL pairingPinEnabled

Discussion

This property is ignored when using [PTDBean setRadioConfig:]. To enable or disable the pairing pin, use [PTDBean setPairingPin:]

Declared In

PTDBeanRadioConfig.h

  configSave

A Boolean that specifies whether or not to save radio configuration changes to NVRAM If false, configuration changes will only persist until next Bean reset.

@property (nonatomic) BOOL configSave

Declared In

PTDBeanRadioConfig.h