--- title: "Query the PED object for device information" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/query-the-ped-object-for-device-information-jni" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/query-the-ped-object-for-device-information-jni.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/query-the-ped-object-for-device-information-jni" last_modified: "2019-04-30T11:32:00+02:00" language: "en" --- # Query the PED object for device information [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/java-native-interface-integration/key-steps-jni/process-a-basic-transaction-jni/query-the-ped-object-for-device-information-jni.md) ## Method | Name | Description | | ----------------- | --------------------------------------------------------------------- | | `refreshPedState` | Retrieves the state of the PED if connectivity with the PED was lost. | ## Parameters | Name | Description | | --------- | ----------------------------------------------------------- | | `retries` | Number of retries when attempting to refresh the PED state. | ## Callback | Name | Description | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------- | | `pedStateChangeCallback` | `refreshPedState` triggers this callback.It returns if the PED state has changed, for example, if the PED has come online. | ## PED States | State | Description | | -------------------------------------- | ----------------------------------------------------------------------------- | | `ped_state_undetected` | Incorrect IP, cannot detect the PED. This is a final state. | | `ped_state_detected` | PED detected, correct serial/IP address. | | `ped_state_identified` | Valid PED. | | `ped_state_registered` | PED is registered, final result on RegisterPED. | | `ped_state_config_synced` | PED is has synchronized its configuration. | | `ped_state_wait_reboot_ready` | PED is rebooting. | | `ped_state_wait_ready_for_transaction` | PED must complete another process before it is ready to create a transaction. | | `ped_state_not_ready` | PED is busy. This is a final state.  | | `ped_state_ready_for_transaction` | PED is ready for transaction. | | `ped_state_tender` | PED is busy with a tender. | ## Result codes | Name | Description | | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `ADYEN_LIBRARY_OK` | Everything is ok, library will poll for updated terminal state. | | `ADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_TERMINAL_ID_UNKNOWN` | Library is currently polling, call is rejected. | | `ADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_INVALID_ARGUMENTS` | Invalid Arguments specified, use a positive number of `poll_retries`. | | `ADYEN_LIBRARY_CONFIRM_QUERY_PED_STATE_INVALID_STATE` | Library is already in polling state, you will receive an `ped_state` callback when the library receives an valid state. | | `ADYEN_FAIL_MALLOC` | Cannot allocate memory, system out of memory. | | `ADYEN_INVALID_REF_OBJ` | Internal communication reference object is illegal. |