SONY製のNFCカードリーダ RC-S620/S をイニシエータとして使用し、NFC Type-A/Bと通信するライブラリです。FeliCaとは通信できません。(This library can't communicate with FeliCa! Only for NFC Type-A/B.)

Dependents:   DLC_STARTER

Committer:
hmizuno
Date:
Sat Jun 13 01:57:30 2020 +0000
Revision:
2:08ccf5062b69
Parent:
0:16a4197a4dfb
Add timeout retry when UART communication fails

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hmizuno 0:16a4197a4dfb 1 ★★★★★★★★★★★★★★★★★ 重要 ★★★★★★★★★★★★★★★★★★★
hmizuno 0:16a4197a4dfb 2
hmizuno 0:16a4197a4dfb 3 このライブラリはNFC Type-A/B 用に作成したもので、
hmizuno 0:16a4197a4dfb 4 FeliCaとの通信には使用できません!
hmizuno 0:16a4197a4dfb 5
hmizuno 0:16a4197a4dfb 6 具体的には、リトライ回数を1にする等のFeliCaとの通信に必要な設定をしません。
hmizuno 0:16a4197a4dfb 7
hmizuno 0:16a4197a4dfb 8 FeliCaと通信するライブラリは、メーカー公式Arduino向けライブラリをベースに
hmizuno 0:16a4197a4dfb 9 SwitchScience様が作成した神ライブラリが既にあります!
hmizuno 0:16a4197a4dfb 10
hmizuno 0:16a4197a4dfb 11 FeliCa用ライブラリ:https://os.mbed.com/users/okini3939/code/RCS620S/
hmizuno 0:16a4197a4dfb 12
hmizuno 0:16a4197a4dfb 13
hmizuno 0:16a4197a4dfb 14 Type-A/Bと通信するため、簡易版リファレンスには記載のない
hmizuno 0:16a4197a4dfb 15 inDataExchangeを使用しています。自己責任でご使用ください。
hmizuno 0:16a4197a4dfb 16
hmizuno 0:16a4197a4dfb 17 ※inDataExchangeについては、コマンド互換性のあるPN532の
hmizuno 0:16a4197a4dfb 18  ユーザーマニュアルに基づき実装しています。
hmizuno 0:16a4197a4dfb 19
hmizuno 0:16a4197a4dfb 20
hmizuno 0:16a4197a4dfb 21 !!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!
hmizuno 0:16a4197a4dfb 22
hmizuno 0:16a4197a4dfb 23 This library can't communicate with FeliCa! Only for NFC Type-A/B!
hmizuno 0:16a4197a4dfb 24 If you want to communicate with FeliCa,
hmizuno 0:16a4197a4dfb 25 please use library below made by SwitchScience.
hmizuno 0:16a4197a4dfb 26
hmizuno 0:16a4197a4dfb 27 https://os.mbed.com/users/okini3939/code/RCS620S/
hmizuno 0:16a4197a4dfb 28
hmizuno 0:16a4197a4dfb 29 To communicates with Type-A/B, I used inDataExchange command
hmizuno 0:16a4197a4dfb 30 which is not described in the simplified version reference.
hmizuno 0:16a4197a4dfb 31 Please use this library at your own risk!
hmizuno 0:16a4197a4dfb 32
hmizuno 0:16a4197a4dfb 33 *The implementation of inDataExchange is
hmizuno 0:16a4197a4dfb 34 based on the command compatible PN532's user manual.
hmizuno 0:16a4197a4dfb 35
hmizuno 0:16a4197a4dfb 36 ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
hmizuno 0:16a4197a4dfb 37
hmizuno 0:16a4197a4dfb 38 SONY製NFC ICカードリーダライタ RC-S620/S をイニシエータ(in)として使用するライブラリです。
hmizuno 0:16a4197a4dfb 39 DLCstarterでICカード免許証(NFC Type-B)を扱うために作成したもので、
hmizuno 0:16a4197a4dfb 40 コマンドは免許証との通信に必要な分しか登録していません。
hmizuno 0:16a4197a4dfb 41
hmizuno 0:16a4197a4dfb 42 ※const uint8_t 配列で有線/無線コマンドを定義しておけば、
hmizuno 0:16a4197a4dfb 43 本ライブラリを使って任意なコマンドを投げることができます。
hmizuno 0:16a4197a4dfb 44  コマンド部は RCS620S_command.h に分割しておりますので編集してご使用ください。
hmizuno 0:16a4197a4dfb 45
hmizuno 0:16a4197a4dfb 46 無線コマンドについては、inDataExchangeコマンド自動組み立て機能付きです。
hmizuno 0:16a4197a4dfb 47 無線コマンド部分のみを用意しておけば面倒なチェックサムの計算等は自動でやってくれます。
hmizuno 0:16a4197a4dfb 48
hmizuno 0:16a4197a4dfb 49 ※mbed.orgで検索すると"RCS620S”というライブラリがヒットしますが、
hmizuno 0:16a4197a4dfb 50 メーカーが配布しているArduino向けライブラリをベースとしたFeliCaに特化したもので、
hmizuno 0:16a4197a4dfb 51 免許証の読み取りには使えませんでした。
hmizuno 0:16a4197a4dfb 52
hmizuno 0:16a4197a4dfb 53 /*************************************************************************/
hmizuno 0:16a4197a4dfb 54
hmizuno 0:16a4197a4dfb 55 ライセンス表記
hmizuno 0:16a4197a4dfb 56
hmizuno 0:16a4197a4dfb 57 Copyright [2020] [H Mizuno]
hmizuno 0:16a4197a4dfb 58
hmizuno 0:16a4197a4dfb 59 Licensed under the Apache License, Version 2.0 (the "License");
hmizuno 0:16a4197a4dfb 60 you may not use this file except in compliance with the License.
hmizuno 0:16a4197a4dfb 61 You may obtain a copy of the License at
hmizuno 0:16a4197a4dfb 62
hmizuno 0:16a4197a4dfb 63 http://www.apache.org/licenses/LICENSE-2.0
hmizuno 0:16a4197a4dfb 64
hmizuno 0:16a4197a4dfb 65 Unless required by applicable law or agreed to in writing, software
hmizuno 0:16a4197a4dfb 66 distributed under the License is distributed on an "AS IS" BASIS,
hmizuno 0:16a4197a4dfb 67 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
hmizuno 0:16a4197a4dfb 68 See the License for the specific language governing permissions and
hmizuno 0:16a4197a4dfb 69 limitations under the License.
hmizuno 0:16a4197a4dfb 70