acybx609 发表于 2022-4-5 13:14:19

netETH_ReceiveRaw函数来数据不被回调

自己加的netETH_ReceiveRaw函数来数据不被回调,进不来,正常只要网络有数据包进来应该被RL_NET底层调用吗?

eric2013 发表于 2022-4-5 16:51:26

这个是我之前做的测试。

像使用串口一样使用以太网,STM32H7的原始以太网数据包收发速度11.9MB/S,实用价值也很高(2020-12-05)
https://www.armbbs.cn/forum.php?mod=viewthread&tid=101966&fromuid=58
(出处: 硬汉嵌入式论坛)

acybx609 发表于 2022-4-6 08:17:09

eric2013 发表于 2022-4-5 16:51
这个是我之前做的测试。

像使用串口一样使用以太网,STM32H7的原始以太网数据包收发速度11.9MB/S,实用 ...

我用电脑和咱家板子通讯,是不是这个回调函数也应该被调用,但一直进不去,是RL_TCPNET配置那个项目没有打开吗?

eric2013 发表于 2022-4-6 08:49:14

acybx609 发表于 2022-4-6 08:17
我用电脑和咱家板子通讯,是不是这个回调函数也应该被调用,但一直进不去,是RL_TCPNET配置那个项目没有 ...

我是两个板子之间测试的。

电脑发的话,你也可以试试,测试注意源MAC地址和目标MAC地址一定要配置对,也就是你板子的和电脑的MAC地址。

acybx609 发表于 2022-4-6 09:59:54

eric2013 发表于 2022-4-6 08:49
我是两个板子之间测试的。

电脑发的话,你也可以试试,测试注意源MAC地址和目标MAC地址一定要配置对, ...

你好,刚看资料he user function netETH_ReceiveRaw is called by the Ethernet interface to provide raw Ethernet frames to the user. The data contains Ethernet header and payload data. This allows the users to implement additional Ethernet protocols, which are not supported by the network library.
The network library calls this function, if the Ethernet Type is not supported. For supported Ethernet Types: ARP (0x0806), IPv4 (0x0800) and IPv6 (0x86dd), the function is not called.
The argument if_num specifies the Ethernet Interface which received the frame.
The argument buf points to a buffer containing the received Ethernet frame data.
The argument len specifies the number of received data bytes.
这个函数如果配置ARP IPV4 IPV6 协议,将不会回调,你测试是没有配其他协议吗?

eric2013 发表于 2022-4-6 10:29:50

acybx609 发表于 2022-4-6 09:59
你好,刚看资料he user function netETH_ReceiveRaw is called by the Ethernet interface to provide ra ...

这个我忘了,具体你自己测试下吧,我就不再找出例子,调试下载了。
页: [1]
查看完整版本: netETH_ReceiveRaw函数来数据不被回调