Closed susumutomita closed 7 months ago
Clone
https://github.com/lanesky/mnbcard
brew install swig
pip install pyscard
create sample program
#! /usr/bin/env python3
import logging
import sys
sys.path.append('./../mnbcard')
from reader import get_reader, connect_card
from api import *
from helper import *
# ログレベルを設定する
root = logging.getLogger()
root.setLevel(logging.DEBUG)
# ログをコンソールに出力
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
root.addHandler(handler)
# カードリーダー取得
reader = get_reader()
# カードに接続する
connection = connect_card(reader)
profile_pin = input("Please input the profile PIN: ")
# カードインスタンス作成
card = Card(connection)
# 基本4情報取得(券面補助PIN必要)
for iter in card.get_basic_info( profile_pin):
print(iter)
run
python3 example.py
Please input the profile PIN: XXXXX
Then return basic 4 information
Name
Address
Birth of date
Sex
https://docs.expo.dev/workflow/customizing/ Use Custom Native module would be resolved reding NFC typeB card in iOS.
Note is https://scrapbox.io/knocks/investigate_how_to_read_birth_of_date_from_ID