5. Skip to content

5. FeliCa Card Conversion

5.1 Overview

When using FeliCa NFC cards (eg when using Amusement IC) the Access Code is not directly read off the card. It is instead retrieved from AiMeDB using the following set of endpoints.

There is no way to directly convert from a FeliCa ID to an Access Code. Instead, AiMeDB contains a lookup table containing every valid FeliCa ID and its corresponding access code.

FeliCa cards have an IDm, uniquely identifying the card, and a PMm, containing additional information regarding the card. The content of the IDm serial field varies based by manufacturer. The manufacturer code for AICC is always 01:2e. The structure of both are shown below, including details of the serial number for AICC.

8 bytes8 bytesFeliCa IDmFeliCa PMm2 bytes6 bytesManufac-turerSerial1 byte1 byte6 bytesChipCodeOSVer.Timing2 bytes2 bytes2 bytesProductDateSerialof day

Of these, the IDm is the only one AiMeDB ever uses for lookups. The OS Version specified in the PMm is used to select the table that the lookup should be performed against, with the other 7 bytes ignored.

The OS versions supported by AiMeDB are outlined in the following table. All other values should be rejected.

OS Version Name Treated as
06h Mobile FeliCa Ver.1.0 Mobile
10h Mobile FeliCa Ver.2.0
14h Mobile FeliCa Ver.3.0
17h Mobile FeliCa Ver.4.0
18h Mobile FeliCa Ver.4.1
20h FeliCa STD (RC-S962) Card
F0h FeliCa Lite (RC-S965)
F1h FeliCa LiteS (RC-S966)
F2h FeliCa Link LiteS (RC-S967)
F3h Unknown

5.2 Request

5.2.1 Get FeliCa ID

If the client is attempting to retrieve the access code for an existing card (ie, the player has used a physical card, usually an Amusement IC card) this endpoint should be used to retrieve the access code. This is the code that is printed on the reverse of the card.

If this is a virtual card, such as in the case of FeliCa mobile, clients should first attempt to retrieve the access code using this endpoint, then proceed to register a new FeliCa ID if that lookup fails.

8 bytes8 bytesFeliCa IDmFeliCa PMm

Parameter Detail
Command ID 1
Minimum supported client version 1.00.0
FeliCa IDm The card IDm
FeliCa PMm The card PMm

5.2.2 Register FeliCa ID

Register a new ID into the database. This endpoint is used for FeliCa Mobile support. Access Codes are allocated serially, and should be allocated with the 0103 5 prefix (reserved for AiMe Mobile). See Access Codes for details on this process.

Regardless of the PMm value, this registers a new mobile device.

8 bytes8 bytesFeliCa IDmFeliCa PMm

Parameter Detail
Command ID 2
Minimum supported client version 1.00.0
FeliCa IDm The card IDm to register
FeliCa PMm The card PMm to register (ignored)

5.3 Response

4 bytes10 bytes2 bytesFeliCa IndexAccess Code

Parameter Detail
Command ID 3
Minimum supported client version 1.00.0
FeliCa Index Internal FeliCaTable index. Not for client use.
Access Code The access code corresponding to the requested ID

The FeliCa Index value indicates the index in the table the card was located at. This is for internal use, and should not be used by the client beyond indication of success. FFFFFFFFh indicates a lookup failure; all other values indicate success.