For the complete documentation index, see llms.txt. This page is also available as Markdown.
Page cover

MTSCRA Function - 4.1 - 4.10

4.1 getSDKVersion

This function retrieves the SDK revision number.

(NSString *) getSDKVersion 

Parameters: None

Return Value: String containing the SDK revision number.

4.2 startScanningForPeripherals

This function retrieves a list of available Bluetooth LE devices. After calling this function to locate the device you wish to connect to, use setAddress to tell the library which device you want to connect to. Use stopScanningForPeripherals to stop the scan.

(void)startScanningForPeripherals

Parameters: None

Return Value: An array of peripherals

4.3 stopScanningForPeripherals

This function stops the scanning of available Bluetooth LE devices.

(void)stopScanningForPeripherals

Parameters: None Return Value: None

4.4 setAddress

This function sets device’s address for Bluetooth LE devices.

Parameters:

Parameter

Description

address

Address of the Bluetooth LE device to communicate with

Return Value: None

4.5 openDevice

This function opens a connection to the device.

To use this function to connect to a Bluetooth LE device, the app should follow these steps:

  1. Call startScanningForPeripherals to find the device you want to connect to.

  2. Call setAddress to tell the library which device you want to connect to.

  3. Make sure your app’s bleReaderStateUpdated function most recent status is was OK .

  4. Call openDevice.

After calling this function, call isDeviceOpened to make sure the device was successfully opened.

Parameters: None

Return Value:

  • YES = Success

  • NO = Error

4.6 closeDevice

This function closes the connection to the currently opened device. After calling this function, call isDeviceOpened to make sure the device was successfully closed.

Parameters: None

Return Value:

  • YES = Success

  • NO = Error

4.7 isDeviceConnected

This function reports whether any compatible devices are connected to the host.

Parameters: None

Return Value:

  • YES = host is connected to a device

  • NO = host is not connected to a device

4.8 isDeviceOpened

This function retrieves device opened status, which changes on successful completion of a call to startScanningForPeripherals or closeDevice.

Parameters: None

Return Value:

  • YES = Device is opened

  • NO = Device is not opened

4.9 sendCommandToDevice

This function sends a direct command to device. See MagneSafe V5 Programmer’s Reference (Commands) for details about available commands and syntax.

Parameter

Description

pData

Command to send to the device. For example, pass command string

“C10206C20503C30100” to call the Discovery command.

Return Value:

  • 0 = Success

  • 9 = Error

  • 15 = Busy

1.10 getResponseData

This function retrieves card data from a string separated by ‘|’ after a cardholder swipes a card. The host software should call it in response to the trackDataReadyNotification callback.

Parameters: None

Return Value:

A null terminated hex string for Card Data, Field separated by ‘|’.NULL value for failed.

Fields:

Device ID, Device Serial Number, Card Swipe Status, CardEncode Type, Track 1 Decode Status, Track 2 Decode Status, Track 3 Decode Status, MagnePrint Status, Track 1 Length, Track 2 Length, Track 3 Length, Masked Track 1 Length, Masked Track 2 Length, Masked Track 3 Length, MagnePrint Length, Card Data, Masked Card Data, DUKPT Session ID, DUKPT Key Serial Number, First Name, Last Name, PAN, Month, Year, Track 1 Data, Track 2 Data, Track 3 Data, Masked Track 1 Data, Masked Track 2 Data, Masked Track 3 Data, MagnePrint Data

Last updated