cancel
Showing results for 
Search instead for 
Did you mean: 

RNDIS Over USB Implementation on STM32L0

Pavan_LohiaGroup
Associate III

Board: B-L072Z-LRWAN1

MCU: STM32L072

IDE: STM32CubeIDE

I'm Trying to Implement RNDIS Over USB, Where When USB is Connected to Computer, It should get detected as USB Ethernet Adapter.

On the STM32CubeIDE, I could Implement and Test the VCP(Virtual COM Port) from the Generated Code,

I now Downloaded the Library for RNDIS From GitHub of STM32 (https://github.com/STMicroelectronics/stm32_mw_usb_device ), The Same Generated Code was Modified to use the RNDIS Library(USB_CDC Library was removed), Where I shall Pass the Respective Class/Structure/Variables of RNDIS etc. Post Compilation and Flashing of the Code, System is still detecting it as a VCP Only.

I later Referred to Various Examples from Github where Web Server using RNDIS is hosted to display a webpage on a Static webpage when connected, Which uses RTOS and it's implementation is for STM32F4, Studying the same I tried implementation of RNDIS Using RTOS for STM32L0 and Yet Still again I face the same issue of being identified as VCP. Few Links to which I referred are

  1. https://github.com/fetisov/lrndis 
  2. Others from STM32CubeIDE Example's

Not Sure About where and Why Things weren't working as intended, I moved to Try the Say for USB ECM (Ethernet Control Model) and I'm facing the same issue.

So I have now moved on trying to implement the same using Lwip Library and work is still in progress, I would be glad and happy if someone could guide me on the right path (Including and not limited to sequence of code, Functions to be invoked)and help in it's implementation with any example/references to codes etc.

Thanks in Advance.

11 REPLIES 11
Pavel A.
Evangelist III

Maybe the author of that github RNDIS project can help you, try to reach him.

Pavan_LohiaGroup
Associate III

@Hana Slimi, Kindly Help on this issue.

 

To Keep it Short and Summarize.

  • USB-RNDIS Enumeration using STM32L072 Controller
  • Attached in the Thread is the Project which uses the library stm32_mw_usb_device
  • Post Flashing of the code, Device gets Identified as Adapter(USB-Ethernet)
  • On Windows, Adapter is disabled and not getting enabled at all
  • On Mac and Linux, It is Enabled. When a Static IP is assigned to STM32(USB) and pinged it is responding back successfully(Computer was not connected to any Network)
  • I wrote a Python Script using Websockets to send data to the STM32(Both Unicast and Multicast) Scripts says It was successful but none of the ISR Rotuines are hit on STM32(Such as CDC_RNDIS_Itf_Receive)

Kindly Please Help in Fixing it..

 

All I need is, STM32 User USB should be identified as USB-Ethernet Adapter and I should be able to send Data using Computer to STM32.