# NfcB.transceive(Object object)
Start from base library version 2.11.2. Please remaining backward compatible.
with Promise style call: Not supported
Mini Program plugin: Support
Sending data
# parameter
# Object object
| attribute | type | Default values | Required | Introductions |
|---|---|---|---|---|
| data | ArrayBuffer | yes | The binary data that needs to be passed | |
| success | function | no | Interface calls the successful callback function | |
| fail | function | no | Interface calls failed callback functions | |
| complete | function | no | Interface calls the end of the callback function (call success or failure will be executed) |
# object.success callback
# parameter
# Object res
| attribute | type | Introductions |
|---|---|---|
| data | ArrayBuffer |
# error
| Error code | Error message | Introductions |
|---|---|---|
| 13000 | Device does not support NFC | |
| 13001 | System NFC switch not turned on | |
| 13010 | Unknown error | |
| 13019 | user is not authorized | User not authorized |
| 13011 | invalid parameter | Invalid parameter |
| 13012 | parse NdefMessage failed | Parsing parameters to NdefMessage failed |
| 13021 | NFC discovery already started | NFC scans have begun |
| 13018 | NFC discovery has not started | Try to stop the NFC scan when it does not start |
| 13022 | Tech already connected | Tags already connected |
| 13023 | Tech has not connected | Try to disconnect when label is not connected |
| 13013 | NFC day has not been discovered | Not scanned for NFC tag |
| 13014 | invalid tech | Ineffective Labeling Techniques |
| 13015 | unavailable tech | Failed to get the corresponding technology from the label |
| 13024 | function not support | Current tag technology does not support this feature |
| 13017 | system internal error | Related read and write operation failed |
| 13016 | connect fail | Connection failure |