wenxin app版本:8.0.47
nfcTag = nfcAdapter.getIsoDep();
var frameStr = "3004";
var frame = HexUtils.hexToByteArray(frameStr);
console.log(HexUtils.byteArrToHex(frame));
nfcTag.transceive({
data: frame.buffer,
success: res => {
console.log("数据写入成功" + JSON.stringify(res));
console.log("-------" + HexUtils.byteArrToHex(res.data.buffer));
},
fail: error => {
console.log("数据写入失败");
console.log(error);
},
complete: res => {
}
})
连接设备成功
index.js:157 hahahahahahhahaha-------testcmd_1
index.js:163 setTimeout suc{"errno":0,"errMsg":"setTimeout:ok"}
index.js:118 30 04
index.js:123 数据写入成功{"errno":0,"errMsg":"transceive:ok","data":{},"__wx_dont_hook_sdk_inner_variable_packkeys_otherwise_you_will_regret_and_occur_bug__":["data"]}
index.js:124 -------NULL