---
title: Device Management
slug: ktPG-device-management
docTags: 
createdAt: 2025-05-12T13:14:48.972Z
---

This section covers how to discover, select and inspect the Miura device the SDK transacts with. Two related topics have their own sub-pages:

- [Device Setup & Readiness](docId\:BQqtSYAoewsSP_DNWvSCA): bringing a reader into a Toro-compatible state with the single `ensureDeviceReady()` entry point.
- [TMS Updates](docId\:Tn0r90_7W15zJIWVKLzUM): how security parameters and configuration are kept current via the Terminal Management System (TMS).

## Listing available Miura devices

```swift
let devices = toro.bluetoothMiuraDevices
```

This will return a list of `EAAccessory` instances that are available to use with the `ToroSDK`. For a device to be listed, it will need to be showing as connected in the iOS Bluetooth settings.

## Selecting a device

To select the device you want to use for transactions and device management operations, set the `selectedDevice` property on your `ToroClient` instance.

```swift
toro.selectedDevice = device // where device is an EAAccessory instance
```

To unset the selected device, set the `selectedDevice` to `nil`.

```swift
toro.selectedDevice = nil
```

## Getting device information

You can get information about the selected device using the `getDeviceInfo` method on the `ToroClient` instance:

```swift
toro.getDeviceInfo { result in
    switch result {
    case .success(let deviceInfo):
        self.deviceInfo = deviceInfo
    case .failure(let error):
        self.errorMessage = error.localizedDescription
    }
}
```

This will return a `MiuraDeviceInfo` object containing information about the selected device, such as its serial number, system time, battery status, etc.

## Device session state

You can check if the device is currently in use by the Toro SDK using the `isSessionOpen` property on the `ToroClient` instance:

```swift
toro.isSessionOpen
```

This will return `true` if the device is currently in use, and `false` otherwise.

