# Understand PSAM Card Exceptions

### Overview

This section details the common exceptions encountered when using the SmartCardReaderDevice.open method in Q2/Q3 series devices for PSAM cards.

### Common Exception Scenarios

1. No Physical SAM Card Inserted:
   * When attempting to open the PSAM card reader without a physical SAM card inserted, the system will throw an exception.
   * Exception Details: 'Code:-6 com.cloudpos.DeviceException: Operation error! Error code = -1, Error message = Operation not permitted'.
2. Device Restart Required After PSAM Card Insertion:
   * Inserting a PSAM card into the terminal does not support hot plugging. Therefore, the device needs to be restarted after insertion.
   * If the device is not restarted, the PSAM card will not be recognized, leading to an exception.
   * Same exception details as above will apply in this scenario.

### Important Notes

* It is essential to ensure that a PSAM card is physically present in the reader before attempting to use the SmartCardReaderDevice.open method.
* Always restart the device after inserting a PSAM card to ensure proper recognition and functionality.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://smartpossdk.gitbook.io/cloudpossdk/faq/card/understand-psam-card-exceptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
