Load Suica on Ubuntu + Identiv Cloud 3701 F (preliminary note)

What is this?

A collection of rambling notes and links.

Installation

sudo apt-get install pcscd
sudo apt-get install libusb-0.1.4
sudo apt-get install opensc

Download the driver for Linux from Identiv Support (https://support.identiv.com/3700f/). Copy the entire directory scmccid.bundle to/usr/lib/pcsc/drivers.

Start pcscd

For the time being, start it on the front end and output a debug message.

/usr/sbin/pcscd -d -f

APDU command structure

field Explanation
CLA Instruction class
INS Instruction code
P1 Parameter 1
P2 Parameter 2
LC Data length
Data data
LE Response length

Various patterns

No data or response

CLA INS P1 P2

Data available, no response

CLA INS P1 P2 LC Data
CLA INS P1 P2 0x00 LC1 LC2 Data

No data, with response

CLA INS P1 P2 0x00 LE1 LE2

There is data, there is response

CLA INS P1 P2 LC Data LE
CLA INS P1 P2 LC Data LE1 LE2
CLA INS P1 P2 0x00 LC1 LC2 Data LE
CLA INS P1 P2 0x00 LC1 LC2 Data LE1 LE2

Common APDU commands

This is a common APDU command. CLA is fixed to FF.

INS command
A0 Search binaries
A2 Search record
A4 Select files
B0 Read binary
B1 Read binary (with encryption checksum)
B2 Read record
B6 Read record (with encryption checksum)
CA Type-Length-Value Reading coded data
F2 Status of the selected file

Cloud 3701 F virtual APDU command

This is a quote from the Identiv Manual.

command CLA INS P1 P2 P3 DATA
Pass through FF FE 00 00 Data length data
Felica REQC FF 40 00 00 04 System code(2 bytes)、将来用予約(1バイト)、タイムスロットナンバー(2 bytes)の合計4バイト
Felica REQ Service FF 42 Number of services or areas 00 P1 × 2 List of services or areas
Felica REQ Response FF 44 00 00 00 -
Felica Read Block FF 46 Number of services Number of blocks (P1 + P2) × 2 List of services or blocks
Felica Write Block FF 48 Number of services Number of blocks (P1 + P2) × 2 + P2 × 16 List of services or blocks, block data
Felica REQ SYSTEM CODE FF 4A 00 00 00 -

Felica APDU command

In the case of Felica, CLA, INS, P1 and P2 may be fixed? Or maybe you put in a fixed value for each card reader? Maybe I put the command defined in Felica in Data?

CLA INS P1 P2 LE Data
FF ? ? ? Data length Felica commands and data

Suica service code

service code
history of using(20 records) 09 0F
Type and balance 00 8B
Entry / exit history 10 8F

Suica APDU command (for Pasori?)

I'm trying, but I'm not getting any results with an INS error. Shouldn't it be Pasori? ?? ??

command CLA INS P1 P2 LC DATA LE
File selection FF A4 00 01 02 0F 09 -
Read history FF B0 00 00 - - 00 FF FF

Link

Recommended Posts

Load Suica on Ubuntu + Identiv Cloud 3701 F (preliminary note)
Load Suica on Ubuntu + Identiv Cloud 3701 F (preliminary note 3)
Load Suica on Ubuntu + Identiv Cloud 3701 F (preliminary note 2)
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install Realtek network driver on Ubuntu Note
How to install NVIDIA driver on Ubuntu 18.04 (Note)