大家好,我把一些旧的多播接收代码从MAL/MLA移植到ValueV1.08上运行。它目前无法接收数据包,并且已经调试到堆栈中,我怀疑它对过滤可能不满意,因为我看不到堆栈中出现的任何组播数据包。如果有人可以查看我正在使用的代码,我会很感激…我使用PIC32 MZ启动器套件和MRF24WG0MA模块。这些数据包通过iPad通过Wi-Fi路由器(B/G)传送给PIC。该网络在基础设施模式中配置,并且安全性是WPA2-PSK。我在PC上使用WiReSARK监控Wi-Fi,并附加了一个数据包捕获到这个消息。该项目基于Micro.sample web_server_nvm_mpfs,并在所有其他方面正常工作,例如通过wi-fi和以太网接口提供网页服务。这只是多播方面的问题。iPad正在通过Wi-Fi向多播地址239.251.0.1和端口5568发送分组。这些分组的以太网目的地址是01:00:5E:7F:00:01。作为实验,我试图使用DRV_WIFI_MUL
tiCAST_ENABLE_ALL作为过滤。以下是代码:DRV_WIFI_MULTICAST_MULTICAST_MULTICAST_MULTICAST_FIFI_MULTICAST_FIFIFIFI_MULTICAST_FIFIFIST_FIFIFIFIFIFI_CONFIFIST没有改变行为。以下是代码:DRV_WIFI_WIFI_WIFI_MULTICAST_MULTICAST_CONFIFIFIFIFIFI_CONFIFIFIFIFIFIFIFIFIFIFI_FIFIFIFIFIFI_FIFIFIFIFIFIFIFIFIFIFI_1;Config.macBitMask=Config.macBitMask=0x38;memcpy(&.mac.MacBitMask=0x38;memcpy(&(配置macB)6字节,mac掩码,6);DRV_WIFI_MultiCastFilterFilterEnEnEnable();DRV_WIFI_多播过滤器集(&配置);DRV_WIFI_多播过滤器集(&;DRV_WIFI_多播过滤器集(&配置图);DRV_WIFI_多播过滤器集(&;配置图);DRV_WIFIFIFI_多播过滤器集(&;配置图);DRV_WIFIFIFI_多播过滤器集(&;配置图);DRV_DRFI_多播过滤器集(&;配置图;配置图);DRV_DRV_DRFI;配置图;配置图;配置图;配置图);char地址地址[]]]]]];char地址IP地址;如果插座!= INVALID_SOCKET){如果(TCPIP_UDP_Bind(Socket,IP_ADDRESS_TYPE_IPV4,0,0)){}}}稍后我将使用TCPIP_UDP_GetIsReady()检查接收的数据,该数据总是返回0
以上来自于百度翻译
以下为原文
Hello all,
I'm porting some old multicast receive code from MAL/MLA to run on H
ARMony v1.08. It's presently unable to receive packets and having debugged into the stack I suspect it may be unhappy with the filtering as I can't see any of the multicast packets appearing in the stack. I'd be grateful if someone could review the code I'm using below...
I'm using a PIC32MZ Starter Kit and MRF24WG0MA module. The packets are being transmitted by an iPad to the PIC via a Wi-Fi router (b/g). The network is configured in Infrastructure mode and the security is WPA2-PSK. I'm monitoring Wi-Fi using Wireshark on a PC and have attached a packet capture to this message. The project is based on the Microchip sample web_server_nvm_mpfs and is working correctly in all other respects - such as serving up webpages via both the wi-fi and ethernet interfaces. It's only the multicast side which I am having issues with.
The iPad is sending packets via Wi-Fi to the multi-cast address 239.251.0.1 and port 5568.
The Ethernet destination address of these packets is 01:00:5E:7F:00:01.
As an experiment I've tried using DRV_WIFI_MULTICAST_ENABLE_ALL as the filtering option but it didn't change the behaviour.
Here is the code:
DRV_WIFI_MULTICAST_CONFIG Config;
uint8_t macMask[] = { 0x01, 0x00, 0x5E, 0x7F, 0x00, 0x01 };
Config.action = DRV_WIFI_MULTICAST_USE_FILTERS;
Config.filterId = DRV_WIFI_MULTICAST_FILTER_1;
Config.macBitMask = 0x38;
memcpy(&(Config.macBytes), macMask, 6);
DRV_WIFI_MultiCastFilterEnable();
DRV_WIFI_MulticastFilterSet(&Config);
char Address[] = "239.255.0.1";
IP_MULTI_ADDRESS IPAddress;
TCPIP_Helper_StringToIPAddress(Address, &IPAddress.v4Add);
Socket = TCPIP_UDP_ClientOpen(IP_ADDRESS_TYPE_IPV4, 5568, &IPAddress);
if (Socket != INVALID_SOCKET)
{
if (TCPIP_UDP_Bind(Socket, IP_ADDRESS_TYPE_IPV4, 0, 0))
{
}
}
....later on I am checking for received data using TCPIP_UDP_GetIsReady() which is always returning 0
Attachment(s)
Multicast Packet.zip (0.34 KB) - downloaded 28 times