This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Help for USB2.0 understanding

Other Parts Discussed in Thread: OMAPL138

Hi All ,

I am working on USB 2.0 driver side for the first time and hence finding it extremely difficult to get the clear picture of members involved. I have worked only with CHARACTER driver interface.

Request to please guide me for the below mentioned points :-

a) What are these GADGET drivers for USB [Gadget Ethernet & Gadget Serial etc]

I have an driver experience where in the driver and application were one to one i.e.driver for an DMA engine have the stuff related particular engine So what is the role and need to have these Gadget Driver's ?

b) The USB is planned to be connected to WINDOWS host machine

1. Why is it essential to have only (GADGET ETHERNET )RnDIS driver on windows ?

2. On Windows HOST machine is the basic ENUMERATION of USB device identical for Gadget Ethernet and Gadget Serial ? i.e If the Device gets detected on Windows host machine using Gadget Serial , can i say that just switching to Gadget Ethernet the device should be again properly detected And Vice-versa ?

c) What is the difference in CDC gadget ether net and RnDIS gadget Ethernet ? Do we have CDC based Gadget ethernet driver on Windows side [XP or 7] ?

d)Can we have Device with CDC Gadget Ethernet and Host with RnDIS Gadget Ethernet ?

I have just statrted understanding the USB protocol and different terminology using USB2.0 standard spec's ...from past 4-5 days .So i am bit confused of all these qweries and hence cant get an clear pictuer of what actually is happening in USB2.0 Request you guys to please provide some valuable inputs ..

Thank You,

Ashish Mishra

  • Hi Ashish,

    Ashish says said:
    a) What are these GADGET drivers for USB [Gadget Ethernet & Gadget Serial etc]

    I have an driver experience where in the driver and application were one to one i.e.driver for an DMA engine have the stuff related particular engine So what is the role and need to have these Gadget Driver's ?

    In general, the USB OTG controller Hardware in the EVM can be configured as either USB Host or USB Gadget.

    USB Host:

    When we say that it acts as a USB Host, the USB ports of the hardware board are configured in such a way that it detects,enumerates and communicates with the USB slave devices ( USB Slave devices like Pen drive, card readers, mouse, USB-LAN etc ) connected to it provided that the kernel has its appropriate USB device class drivers enabled.

    USB Gadget:

    When we say that it acts as a USB Gadget, the USB ports of the hardware board are configured in such a way that the hardware board now will acts as a peripheral i.e, as a slave device. When you connect the hardware board to a host PC, either to a Linux machine or to a windows machine, the PC will enumerate the hardware board as a USB device and loads its appropriate device class driver to communicate with it. Now, if USB ethernet gadget is anabled, the hardware will act as a ethernet USB peripheral. If the host is a linux machine, it requires CDC device class driver. If the host is Windows machine, it requires RNDIS driver to communicate with the hardware board.Thus, you have to enable the Gadget drivers according to your needs.

    Ashish says said:

    b) The USB is planned to be connected to WINDOWS host machine

    1. Why is it essential to have only (GADGET ETHERNET )RnDIS driver on windows ?

    For Linux Host machine, the USB network drivers are sufficient but for Windows RNDIS driver is essential as I heard that the windows uses the frame encapsulation through RNDIS and its' own RPC protocol. And also, in general we know that the peripheral drivers for both the OS are not the same always.

    Ashish says said:

    c) What is the difference in CDC gadget ether net and RnDIS gadget Ethernet ? Do we have CDC based Gadget ethernet driver on Windows side [XP or 7] ?

    Actually, I don't know the answer for this. When I looked into the kernel configuaration through menuconfig for OMAPL138 EVM, when "The Ethernet gadget ( with CDC support ) is enabled, by default the "RNDIS support is enabled". As these USB drivers are part of Linux drivers, you can post this question to Linux forum or probably you may get the difference either by browsing through the www.usb.org or downloading the CDC gadget driver and RnDIS driver and doing a code walk through.

    Ashish says said:

    d) Can we have Device with CDC Gadget Ethernet and Host with RnDIS Gadget Ethernet ?

    If the device is going to be OMAPL138, when the CDC gadgt ethernet driver is enabled, the RnDIS Gadget Ethernet is also enabled. So, it should work. Please try it out and let me know whether it worked for you.

     

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Thanks Shankari , 

    1.  As i am starting the USB work , i was extremely  confused with all these terms 

         Thanks a lot for your reply. 

    2. We are building an custom board with Hawk as reference . Hence i am trying to understand how the USB of    

        Hawk board works . 

    3. Can you share some pointer w.r.t LINK to understand the the USB2.0 related code and behavior

        [ethernet gadget driver , usb controller ]. My primary aim is to understand the enumeration and basic data    

         communication between HAWK board and PC [with LINUX and windows]

        Our final goal is to have the custom board communicate with Windows as Host system .

    Thanks a lot,

    Ashish Mishra 

  • Hi Ashish,

    The USB gadget drivers are part of DaVinci PSP 03.22.00.06 ( Linux kernel version 3.3 ) which can be downloaded from the below link.

    http://processors.wiki.ti.com/index.php/DaVinci_%28ARM9%29_PSP_Releases#DA850.28Spectrum_Digital_EVM.29.2C_DA830.28Spectrum_Digital_EVM_and_Spectrum_Digital_WiFi_EVM.29_and_OMAP-L138.28_Logic_PD_EVM_and_LCDK.29

     and you will find the gadget drivers at directory path: ../linux-davinci/drivers/usb/musb or linux-davinci/drivers/usb/.

     

    Regards,

    Shankari.

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------