code: func (d *Device) Scan(ctx context.Context, allowDup bool, h ble.AdvHandler) error {
  	d.advHandler = h
  	if err := d.sendCmd(d.cm, 29, xpc.Dict{
  		// "kCBMsgArgUUIDs": uuidSlice(ss),
  		"kCBMsgArgOptions": xpc.Dict{
  			"kCBScanOptionAllowDuplicates": map[bool]int{true: 1, false: 0}[allowDup],
  		},
  	}); err != nil {
  		return err
  	}
  	<-ctx.Done()
  	if err := d.stopScanning(); err != nil {
  		return errors.Wrap(ctx.Err(), err.Error())
  	}
  	return ctx.Err()
  }
docs: // Scan ...