
self.lib.setConnectionType(UInt(BLE_EMV))
self.lib.setDeviceType(UInt32(MAGTEKEDYNAMO))func bleReaderStateUpdated(_ state: MTSCRABLEState) {
print("readerStateUpdated - ", state)
if (state == 0) {
// dispatch in main queue is very important
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1,
execute: {
self.lib.startScanningForPeripherals() })
})
}
} lib.stopScanningForPeripherals()
lib.setAddress(devList[selected].address)
lib.openDevice()