ISO/IEC 7816-4:2013 Specific APDU Commands for Logical Channel Management

There are two ISO-specific APDU commands that you can use to work with logical channels in a smart card:

  • SELECT FILE — This command selects the specified applet on the specified channel number. The channel number can be from 0 to 3 and is specified in the lower two bits of the CLA byte. If the channel is closed, it is opened and the specified applet is selected on the channel. SELECT FILE commands are forwarded to the newly selected applet.

  • MANAGE CHANNEL — This command can be used to open a new channel from another channel or close it. It allows you to specify the channel to be used or to allow the smart card to select the channel. Like SELECT FILE, this command uses the lower two bits of the CLA byte to specify the channel number. MANAGE CHANNEL commands are not forwarded to the applet.

When you work with these commands, keep the following guidelines in mind:

  • Origin logical channel values are encoded in the two least significant bits of the CLA byte.

  • Logical channel values have a valid range of [0..19] only.

  • Logical channel 0 is known as the basic channel, and it cannot be closed.

  • At card reset, the basic channel (channel 0) is open. All other channels (1, 2, ...19) are closed.

The MANAGE CHANNEL and SELECT FILE commands are read by the Java Card RE dispatcher, which performs the functions specified by the commands, including the following:

  • Managing logical channels

  • Deselecting applets

  • Selecting applets