Skip to content

Device RNDIS: Fix linux enumeration#251

Open
ayedm1 wants to merge 1 commit intoeclipse-threadx:devfrom
ayedm1:fix_rndis_linx_enumeration
Open

Device RNDIS: Fix linux enumeration#251
ayedm1 wants to merge 1 commit intoeclipse-threadx:devfrom
ayedm1:fix_rndis_linx_enumeration

Conversation

@ayedm1
Copy link
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
Contributor Author

ayedm1 commented Feb 15, 2026

#250

@rahmanih
Copy link
Contributor

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

@yames-smile
Copy link

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
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
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
Contributor

rahmanih commented Feb 24, 2026

@fdesbiens

this can be merged!

Not Yet , ,need further tests

@yames-smile
Copy link

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
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
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


break;

case UX_DEVICE_CLASS_RNDIS_OID_802_3_PERMANENT_ADDRESS :
Copy link
Contributor

Choose a reason for hiding this comment

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

let's have this request exactly like the UX_DEVICE_CLASS_RNDIS_OID_802_3_CURRENT_ADDRESS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @rahmanih, Fixed

@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
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
Contributor

@fdesbiens ready for merge.

@ayedm1 ayedm1 changed the title Fix RNDIS linux enumeration Device RNDIS: Fix linux enumeration Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants