硬汉嵌入式论坛

 找回密码
 立即注册
查看: 1154|回复: 5
收起左侧

[RL-TCPnet] netETH_ReceiveRaw函数来数据不被回调

[复制链接]

3

主题

4

回帖

13

积分

新手上路

积分
13
发表于 2022-4-5 13:14:19 来自手机 | 显示全部楼层 |阅读模式
自己加的netETH_ReceiveRaw函数来数据不被回调,进不来,正常只要网络有数据包进来应该被RL_NET底层调用吗?
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106622
QQ
发表于 2022-4-5 16:51:26 | 显示全部楼层
这个是我之前做的测试。

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

使用道具 举报

3

主题

4

回帖

13

积分

新手上路

积分
13
 楼主| 发表于 2022-4-6 08:17:09 | 显示全部楼层
eric2013 发表于 2022-4-5 16:51
这个是我之前做的测试。

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

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

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106622
QQ
发表于 2022-4-6 08:49:14 | 显示全部楼层
acybx609 发表于 2022-4-6 08:17
我用电脑和咱家板子通讯,是不是这个回调函数也应该被调用,但一直进不去,是RL_TCPNET配置那个项目没有 ...

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

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

使用道具 举报

3

主题

4

回帖

13

积分

新手上路

积分
13
 楼主| 发表于 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 协议,将不会回调,你测试是没有配其他协议吗?
回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106622
QQ
发表于 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 ...

这个我忘了,具体你自己测试下吧,我就不再找出例子,调试下载了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-4-27 02:46 , Processed in 0.161227 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表