Use enum type for connect in nfc_manager.js.