完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在编写一个自定义应用程序,将传感器信息的字节从我自己的自定义板传输到我基于ST25SDK(特别是V1.2.0)的应用程序。我的应用程序无法通过RF通道读取邮箱(是的,已启用),未通过“ST25SDK:传输完成并显示错误消息”。
当我下载ST25AndroidApp并从源代码编译时,我在尝试从标签读取数据传输时也遇到了同样的错误消息。在查看我的调试输出时,它似乎试图读取比我在嵌入式应用程序中写入少1个字节。 更多细节:所以我的应用程序将18个字节的数据写入快速邮箱。当我调试Read from Tag命令时,以下行显示为读取嵌入式(I2C)应用程序写入的18个字节。 INT 长度= mST25DVTag .readMailboxMessageLength(); 但是,进一步关闭该功能,当我进一步进入函数并进入mST25DVTag.readMialboxMessage时...... tmpBuffer = mST25DVTag .readMailboxMessage((字节 )偏移, 尺寸); 我最终从库中遇到了以下行(FastTransferModeCommand.class); 归还这个 .mIso15693CustomCommand.readMsg((字节 )mbAddress,这个 .computeMsgLengthParam(大小), 国旗,这个 .mUid); this.computeMsgLengthParam(size)取消我的18字节消息框长度,减去1并从消息框中只读取17个字节。 题: 有人能帮助我理解为什么会这样吗? 这可能是我的'传输完成错误'消息的来源吗? #st25dv04k #NFC#st25sdk 以上来自于谷歌翻译 以下为原文 I am writing a custom application that transfers bytes of sensor information from my own custom board to an app I am basing off of the ST25SDK (specifically V1.2.0). My application was failing to read the mailbox (yes, it's enabled) through the RF channel, failing with an 'ST25SDK: transfer finished with error message'. When I download the ST25AndroidApp and compile from source, I also ran into this same error message when attempting to read a Data transfer from the tag. In looking at my debug output, it appears to be trying to read 1 less byte than I write in my embedded application. More details: So my application writes 18 bytes of data into the Fast Mailbox. When I debug the Read from Tag command, the following line appears to read my 18 bytes written by the embedded (I2C) app. int length = mST25DVTag .readMailboxMessageLength(); However, further down that function, when I step further into the function and enter into mST25DVTag.readMialboxMessage ... tmpBuffer = mST25DVTag .readMailboxMessage((byte ) offset, size); I eventually run into the following line from within the library (FastTransferModeCommand.class); return this .mIso15693CustomCommand.readMsg((byte )mbAddress, this .computeMsgLengthParam(size), flag, this .mUid); this.computeMsgLengthParam(size) takes my 18 byte message box length, subtracts 1 and reads only 17 bytes from the message box. Question: Can someone help me understand why this is the case? Could this be the source of my 'transfer finished with error' message? #st25dv04k #nfc #st25sdk |
|
相关推荐
2个回答
|
|
嗨凯文,
感谢您抽出宝贵时间撰写如此详尽的问题。 readMailBoxMessage API将第二个参数作为从邮箱中读取的字节数。 但是,ST25DV标记的低级读取消息RF命令返回(数字+ 1)个字节,最多可读取256个字节(参见 https://www.st.com/resource/en/datasheet/st25dv04k.pdf )。这个转换(以及size = 0的棘手处理)由computeMsgLengthParam()方法管理。所以这不应该是你的问题的根源。 你能否确认tmpBuffer的内容与I2C发送的数据相匹配? 该 “ 传输完成并出现错误'消息来自ST25 Android应用程序的Transfer Task的状态机。它可能发生在数据传输之后,计算CRC时。如果嵌入式固件与应用程序之间的值不匹配,则会出现此类错误。尝试绕过checkCrc步骤,看看是否删除它。 问候, 达米安 以上来自于谷歌翻译 以下为原文 Hi Kevin, thank you for taking the time to write such a well documented question.
The readMailBoxMessage API takes as second parameter the number of bytes to read from the mailbox. However, the low level Read Message RF command for the ST25DV tag returns (number + 1) bytes, to be able to read up to 256 bytes (See https://www.st.com/resource/en/datasheet/st25dv04k.pdf ). This translation (and tricky handling of size = 0) is managed by the computeMsgLengthParam() method.So this should not be the source of your problem. Can you confirm that the content of tmpBuffer matches the data sent from the I2C? The ' transfer finished with error' message comes from the Transfer Task's state machine of the ST25 Android application.It could occur after the data transfer, when computing CRC. If values do not match between your embedded firmware and the application, then you will get such an error. Try to bypass the checkCrc step and see if this removes it. Regards, Damien |
|
|
|
嗨凯文,
资源并不总是很容易找到。希望您的问题对其他开发人员也有帮助。 问候, 达米安 以上来自于谷歌翻译 以下为原文 Hi Kevin, resources are not always easy to find. Hopefully your question will be helpful to other developers as well. Regards, Damien |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2646 浏览 1 评论
3209 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1784 浏览 1 评论
3613 浏览 6 评论
5992 浏览 21 评论
942浏览 4评论
1318浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
588浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1305浏览 3评论
1365浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-26 22:42 , Processed in 1.234063 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号