code: public void setPin(int pin, boolean active) {
          Buffer buffer = new Buffer();
          buffer.writeIntLe(pin);
          buffer.writeByte(active ? 1 : 0);
          sendMessage(BeanMessageID.BT_SET_PIN, buffer);
      }
docs: Set the Bean's security code.
  
  @param pin    the 6 digit pin as a number, e.g. <code>123456</code>
  @param active true to enable authenticated mode, false to disable the current pin