Transmit Method
Collapse the table of content
Expand the table of content

SecureElementChannel.Transmit Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Transmit an APDU (Application Protocol Data Unit) command to the Secure Element. The system ensures that only one APDU is sent to the Secure Element at a time.

Namespace:  Microsoft.Phone.SecureElement
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

public byte[] Transmit(
	byte[] command


Type: System.Byte []
The command to be transmitted to the Secure Element. Maximum size, including header, is 261 bytes.

Return Value

Type: System.Byte []
The response APDU from the Secure Element. This has a maximum length of 255 bytes.


Unable to communicate with the Secure Element.


Unable to communicate with the Secure Element.


The length of the command byte array is less than 4 bytes.


The length of the APDU is not coherent with the length of the command.


The channel is not open and cannot be used.


The command is not allowed.

The returned byte array is the APDU response from the Secure Element. The last two bytes are sw1 and sw2, the status code bytes.

When using the Transmit method, please note the following:

  • The MANAGE_CHANNEL command is not allowed and will throw an exception.

  • SELECT by DF Name commands are not allowed and will throw an exception.

  • CLA bytes with channel numbers are de-masked

Windows Phone OS

Supported in: 8.1, 8.0

© 2017 Microsoft