How to get USB OTG port to work in Device mode?

@hyphop Iā€™d like to ask your help again for implementing the USB-OTG and RNDIS in the mainline kernel, Iā€™m still a bit of a novice in this part and I can only understand it so ever so slowly,

what I have come to understand till now:

I am testing it on my VIM3

USB peripheral mode is enabled by default in the Mainline Ubuntu/Debian kernel for the dwc2 or USB-C, and it is configured with USB-PHY already when built in fenix

when connecting to the PC however, it doesnā€™t appear as a RNDIS device, as seen on Krescue for example

Iā€™d like to know what other step need to be done to do this, and if possible please elaborately note them for me

Thank you :slightly_smiling_face:

yes need additional configuration - u can check how its doing in krescue !!

well I couldnā€™t really understand how it works in Krescue, how can I approach it ? I am unaware of which software component is responsible for it.

thank you

just start krescue goto shell

usb otg rndis network setup script there ā†’

cat /opt/usb_otg_rndis

of course u must rewrite it for yourself

good luck

Ok, Iā€™ll try it out today,
Thank you :slightly_smiling_face:

@hyphop I tried the USB-OTG on Krescue, but I unfortunately ran into this error:
image

this is after inserting the USB 1/3 in, waiting for the LED to blink, then inserting the data pinsā€¦
any idea ?

i have tested it for linux! windows every time have some surprises ; -)

yes, it does :smile:

@hyphop by any chance, will changing the VID and PID of the USB configuration present it as a more compatible device ?

we need it to appear as ā€œremote NDIS compatible deviceā€

Hi, what is the current situation today ; has fenix included all the fixes and patches in between and can build firmwares having the expected behavior ?

@ravelo most of this conversation was geared towards using it on the VIM3, I believe you want to try this for the VIM1 ?

I believe these patches werenā€™t applied yet for BSP kernel, but you could check it out and see what is the status

If I try, i ll do it on vim1, I will try from Linux x86; I understood that krescue has embedded that function for vim1-2-3

Yes, it has
I still havenā€™t got time to tinker with it and bring NDIS mode to be configured, so that it would work with both Windows and linux without a problem, but am slightly preoccupied with my other work.

Hopefully I can get it configured to work soon and share some instructions :slight_smile:

by any chance, will changing the VID and PID of the USB configuration present it as a more compatible device ?

can u get right parameters for windows

before old windows version works - but not for latest windows

I will check around to see if I can get some appropriate VID and PID configs,
It will mostly be copied from some other device, because we donā€™t have our own specific onesā€¦

@hyphop I got some VID and PID extracted from an android phone, and got this from the device manager:

Device USB\VID_0B05&PID_7774&MI_00\6&3288955f&0&0000 was migrated.

Last Device Instance Id: USB\VID_0B05&PID_7774&MI_00\6&3288955f&0&0000
Class Guid: {4d36e972-e325-11ce-bfc1-08002be10318}
Location Path: 
Migration Rank: 0x0
Present: false

from this, I guess you can take:

VID: 0B05
PID: 7774
MI: 00

VID: 0B05
PID: 7774
MI: 00

  • BIG TNX !! now rndis work again for windows !!!

Krescue will be update soon!!!

1 Like

thatā€™s awesome!
will have to try it out on my side as well soon :+1:

only for 50%
becouse work only with single network mode without storage

BUT : composite usb mode storage + network - work only storage

@hyphop were you able to fix it with the krescue v1 ?
what parameter did you use ?

YES u right ! just added :wink:

1 Like