FeliCa and the Secure Element
Overview
FeliCa is a contactless RFID smart card system used in Japan for transit and payment systems. Integrating FeliCa support into Morinaga OS requires kernel modifications to handle FeliCa frames and interact with the secure element.
Kernel Modifications for FeliCa Compatibility
Enable FeliCa Protocol Support
In the kernel configuration, enable NFC and FeliCa modules:
make menuconfig
# Navigate to Device Drivers > NFC drivers
# Enable NFC core support
# Enable NFC FeliCa protocol support
Modify NFC Drivers
Update the NFC driver to correctly parse and route FeliCa frames:
// In the NFC driver source code
static int felica_recv_frame(struct nfc_dev *dev, struct sk_buff *skb) {
// Parse FeliCa frame
// Send frame to user-space via netlink or other IPC mechanisms
}
Integrate with the Secure Element
Ensure the kernel can communicate with the secure element (SE) hardware:
- Implement drivers for the SE interface (e.g., SPI, I2C).
- Expose SE functionalities to user-space applications.
User-Space Applications
Create applications or services that interface with the kernel NFC subsystem to handle FeliCa transactions:
- Listen for FeliCa events from the kernel.
- Authenticate and process payment or transit data.
- Provide feedback to the user (e.g., successful transaction notifications).
Security Considerations
- Implement secure communication channels between the kernel and user space.
- Handle sensitive data with encryption and proper access controls.