Skip to content

Device RNDIS: Fix linux enumeration#251

Merged
fdesbiens merged 1 commit intoeclipse-threadx:devfrom
ayedm1:fix_rndis_linx_enumeration
Mar 2, 2026
Merged

Device RNDIS: Fix linux enumeration#251
fdesbiens merged 1 commit intoeclipse-threadx:devfrom
ayedm1:fix_rndis_linx_enumeration

Conversation

@ayedm1
Copy link
Copy Markdown
Contributor

@ayedm1 ayedm1 commented Feb 14, 2026

No description provided.

@ayedm1 ayedm1 force-pushed the fix_rndis_linx_enumeration branch from 21a6788 to e17f5b3 Compare February 14, 2026 19:30
@ayedm1
Copy link
Copy Markdown
Contributor Author

ayedm1 commented Feb 15, 2026

#250

@rahmanih
Copy link
Copy Markdown
Contributor

hello @ayedm1,
could you please update the merge branch to dev?

@yames-smile
Copy link
Copy Markdown

Hello, as stated in #171, should the device really respond with its own MAC address (ux_slave_class_rndis_local_node_id) to a UX_DEVICE_CLASS_RNDIS_OID_802_3_PERMANENT_ADDRESS request ?

On this documentation I cannot see any difference between the permanent address and the current address OIDs, except regarding their lifetime. So I don't think there should have one OID returning ux_slave_class_rndis_remote_node_id and the other returning ux_slave_class_rndis_local_node_id like here.

Also, when I tested, my PC took the returned MAC address as its own address, not the device address.

@fdesbiens
Copy link
Copy Markdown
Contributor

@rahmanih Can you look at @yames-smile's latest comment, please?

@fdesbiens fdesbiens moved this to In review in ThreadX Roadmap Feb 17, 2026
Copy link
Copy Markdown
Contributor

@rahmanih rahmanih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on STM32 Device.

  • before the fix :
[  +0.000005] usb 1-9: Product: STM32 RNDIS Device
[  +0.000004] usb 1-9: Manufacturer: STMicroelectronics
[  +0.000004] usb 1-9: SerialNumber: RNDIS001
[  +0.004446] rndis_host 1-9:1.0: RNDIS_MSG_QUERY(0x01010101) invalid response - off 16 len 4
[  +0.000015] rndis_host 1-9:1.0: rndis get ethaddr, -33
[  +0.000960] rndis_host: probe of 1-9:1.0 failed with error -33
  • after the fix :
[  +0.000005] usb 1-9: Product: STM32 RNDIS Device
[  +0.000004] usb 1-9: Manufacturer: STMicroelectronics
[  +0.000003] usb 1-9: SerialNumber: RNDIS001
[  +0.006858] rndis_host 1-9:1.0 eth1: register 'rndis_host' at usb-0000:00:14.0-9, RNDIS device, 00:02:02:03:00:00
[  +0.017132] rndis_host 1-9:1.0 enx000202030000: renamed from eth1

LGTM 🥇

rahmanih
rahmanih previously approved these changes Feb 24, 2026
@rahmanih
Copy link
Copy Markdown
Contributor

rahmanih commented Feb 24, 2026

@fdesbiens

this can be merged!

Not Yet , ,need further tests

@yames-smile
Copy link
Copy Markdown

Hello @rahmanih, in your test did you configure 00:02:02:03:00:00 as the host address ? As explained in my previous comment, I had to return ux_slave_class_rndis_remote_node_id instead of ux_slave_class_rndis_local_node_id in order to make my PC take the correct MAC address.

@rahmanih
Copy link
Copy Markdown
Contributor

Hello @rahmanih, in your test did you configure 00:02:02:03:00:00 as the host address ? As explained in my previous comment, I had to return ux_slave_class_rndis_remote_node_id instead of ux_slave_class_rndis_local_node_id in order to make my PC take the correct MAC address.

missed that! I'll do it right now.

@rahmanih rahmanih dismissed their stale review February 24, 2026 14:10

need further tests based latest comments.

@rahmanih
Copy link
Copy Markdown
Contributor

Hello @rahmanih, in your test did you configure 00:02:02:03:00:00 as the host address ? As explained in my previous comment, I had to return ux_slave_class_rndis_remote_node_id instead of ux_slave_class_rndis_local_node_id in order to make my PC take the correct MAC address.

missed that! I'll do it right now.

I did the test on a Linux Fedora distribution and found that both implementation is working fine, Linux Fedore is automatically self-assigning the MC address.
In the test I used both ux_slave_class_rndis_remote_node_id ux_slave_class_rndis_local_node_id is populated with the same value at init stage.
https://github.com/STMicroelectronics/x-cube-azrtos-h7/blob/c191feed5b39c4ac74763da01b625a065d3d48cf/Projects/STM32H735G-DK/Applications/USBX/Ux_Device_RNDIS/USBX/App/app_usbx_device.c#L177

https://github.com/STMicroelectronics/x-cube-azrtos-h7/blob/c191feed5b39c4ac74763da01b625a065d3d48cf/Projects/STM32H735G-DK/Applications/USBX/Ux_Device_RNDIS/USBX/App/app_usbx_device.c#L188

@ayedm1 I think it is better to use the same ux_slave_class_rndis_remote_node_id for both "CURRENT" and "PERMANENT" OID request

@ayedm1 ayedm1 force-pushed the fix_rndis_linx_enumeration branch from e17f5b3 to 4ac8fa9 Compare February 26, 2026 11:29
@ayedm1 ayedm1 force-pushed the fix_rndis_linx_enumeration branch from 4ac8fa9 to 3634023 Compare February 26, 2026 11:39
Copy link
Copy Markdown
Contributor

@rahmanih rahmanih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@rahmanih
Copy link
Copy Markdown
Contributor

@fdesbiens ready for merge.

@ayedm1 ayedm1 changed the title Fix RNDIS linux enumeration Device RNDIS: Fix linux enumeration Feb 26, 2026
@fdesbiens fdesbiens merged commit 69f3b6b into eclipse-threadx:dev Mar 2, 2026
1 check passed
@github-project-automation github-project-automation bot moved this from In review to Done in ThreadX Roadmap Mar 2, 2026
@ayedm1 ayedm1 deleted the fix_rndis_linx_enumeration branch March 2, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants