Device Management
5 min
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 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 toro selecteddevice = device // where device is an eaaccessory instance to unset the selected device, set the selecteddevice to nil toro selecteddevice = nil getting device information you can get information about the selected device using the getdeviceinfo method on the toroclient instance 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 toro issessionopen this will return true if the device is currently in use, and false otherwise
