Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB ECM/RNDIS Can't receive broadcast messages #45862

Closed
Coi-l opened this issue May 22, 2022 · 1 comment · Fixed by #46067
Closed

USB ECM/RNDIS Can't receive broadcast messages #45862

Coi-l opened this issue May 22, 2022 · 1 comment · Fixed by #46067
Assignees
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@Coi-l
Copy link

Coi-l commented May 22, 2022

Describe the bug
I can't receive udp broadcast messages when using usb ecm or usb rndis.

Board: blackpill: blackpill_f411ce

To Reproduce
Code used:

   struct sockaddr server_addr;
    memset(&server_addr, 0, sizeof(server_addr));
    net_sin(&server_addr)->sin_family = AF_INET;
    net_sin(&server_addr)->sin_port = htons(DHCP_SERVER_PORT);
    net_sin(&server_addr)->sin_addr.s_addr = htonl(INADDR_ANY);

    sock = zsock_socket(server_addr.sa_family, SOCK_DGRAM, IPPROTO_UDP);

	ret = zsock_bind(sock, &server_addr, sizeof(server_addr));
	if (ret < 0) {
		LOG_ERR("Failed to bind UDP socket: %d", errno);
		ret = -errno;
	}


Expected behavior
Broadcast packets should be received

Impact
Can't continue with the current feature

Logs and console output

I get this from the usb system:
[00:00:00.475,000] usb_ecm: len 0 req_type 0x21 req 0x43 enabled 1
[00:00:00.475,000] usb_ecm: Set Interface 0 Packet Filter 0x000c not supported
[00:00:00.525,000] usb_ecm: len 0 req_type 0x21 req 0x43 enabled 1
[00:00:00.525,000] usb_ecm: Set Interface 0 Packet Filter 0x000e not supported
[00:00:00.527,000] usb_ecm: len 0 req_type 0x21 req 0x43 enabled 1

I can see the dhcp packets being sent in wireshark

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK
  • Commit SHA: Zephyr: 47850a3

Additional context
I am not sure if this is supposed to be supported and I am doing this the wrong way, missing some config option or the like. Or if the current usb system just doesn't support it.

@Coi-l Coi-l added the bug The issue is a bug, or the PR is fixing a bug label May 22, 2022
@mbolivar-nordic mbolivar-nordic added priority: low Low impact/importance bug area: USB Universal Serial Bus labels May 24, 2022
@jfischer-no
Copy link
Collaborator

For CDC ECM, SetEthernetPacketFilter, filter bitmaps PACKET_TYPE_MULTICAST and PACKET_TYPE_BROADCAST are required but not implemented by CDC ECM function, what can be considered as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants