收藏
回答

NFC无法发送数据

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug NFCA 微信安卓客户端 7.0.15 2.11.2
                  let str = "10001";
                  let buf = new ArrayBuffer(str.length); // 每个字符占用2个字节
                  let bufView = new Uint8Array(buf);
                  for (var i=0, strLen=str.length; i<strLen; i++) {
                    bufView[i] = str.charCodeAt(i);
                  }
                  console.log(buf);
                  nfcA.transceive({
                    data:buf,
                    success:function(res){
                      console.log("transceive success");
                      console.log(res);
                    },
                    fail:function(res){
                      console.log("transceive fail");
                      console.log(res);
                    },
                    complete:function(res){
                      console.log("transceive complete");
                      console.log(res);
                    }
                  });


https://developers.weixin.qq.com/miniprogram/dev/api/device/nfc/NfcB.transceive.html

错误信息:{errMsg: "transceive:fail:system internal error", errCode: 13017}

NFC的文档是否完善一下,完全靠自己摸索

回答关注问题邀请回答
收藏

3 个回答

  • 仰望星空
    仰望星空
    2020-07-03

    微信官方的文档是否能完善一下,实在不敢恭维!

    我调用了IsoDep.transceive方法,返回{"errMsg":"transceive:ok","data":{}},提示成功了,啥数据也没返回

    2020-07-03
    有用
    回复
  • nico
    nico
    2020-07-01

    13017, 应该是指令错误. 我试了下NTAG213的卡, 指令为 0x30, 0x03 读取CC file 都是OK的.

    2020-07-01
    有用
    回复 3
    • 盛蹦蹦
      盛蹦蹦
      2020-07-17
      能贴个代码给我吗??
      2020-07-17
      回复
    • 书栋
      书栋
      2020-09-17
      请问能说明下apdu指令的具体写法吗,一直没搞明白
      2020-09-17
      回复
    • nico
      nico
      2021-03-22回复书栋
      apdu 是type4 的卡的指令通道, 有些卡不支持apdu
      2021-03-22
      回复
  • 灵芝
    灵芝
    2020-06-23

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    另外,请复现问题后在手机微上传日志: 我->设置->帮助与反馈右上角有个上报日志的入口,提供出现问题的微信号,出现问题的时间点(具体到分钟)

    2020-06-23
    有用
    回复
登录 后发表内容
问题标签