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.

usb gadget driver "NCM" for DM8148 --- need help

Hi All:

       i am using DM8148EVM REV D board, and try to configure usb port to be one host and one device followed the link: http://processors.wiki.ti.com/index.php/Usbgeneralpage#One_port_as_host_and_other_port_as_Gadget_.28for_DM81XX.29

      then i back port a usb gadget dirver "NCM" from OMAP to EZSDK, the patch is here: http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/717/3704.0002_2D00_ncm_2D00_compile_2D00_ok.7z   

     i built-in a usb gadget driver "NCM" into kernel, and after boot, usb0 port will load NCM gadget driver automatically. then i connect DM8148 with PC(fedora) via USB cable, PC can recoginize NCM device, then i did below steps:

1. send command "ifconfig usb0 192.168.1.114 up" to DM8148.

2. send command "sudo ifconfig usb0 192.168.1.116 up" to PC.

3. type "ping 192.168.1.114" on PC, it woks, but the response

 

    is there anybody can review this patch?

    i think the most important thing is to verify whether the configuration in ti8148_evm_defconfig is correct for usb gadget mode.

 

Best Regards

  • Hello,

    Does ping work fine or not? Please, can you try this without the patch, so you can be sure the everything else in your setup is correct.

    BR

    Vladimir

  • Hi Vladimir:

         thank you for your reply.

         ping from PC to DM8148 works, but ping form DM8148 to PC does not work.

         without my patch, i compiled ethernet gadget for test, ping from both side works well for about 1 minute, after that the network connection will lose automatically. then PC need to up usb0 again. this seems the same as using my patch.

         can you please review my patch and see whether i set correct configuration in ti8148_evm_defconfig?

    Best Regards

     

  • Hello,

    I cannot determine is your patch correct or not. But what I can tell is that is the Ethernet USB gadget woks. I tried it myself many times. If on your side it fails after a minute, you have to review your setup before you proceed. Do you have any progress now?

    BR

    Vladimir

  • Hi Vladimir:

          thank you for your reply.

          1. i download the whole packet of EZSDK, and then install.

           2. i modified the kernel configuration file to enable USB gadget for EZSDK, but i did not change any source code of kernel.

          3. i built-in g_ether to kernel, and test with different kind of PC, the network connection on PC will lose.

          4. the PC i test are: Ubuntu 11.04, with kernel version 2.6.38-8-generic.

                                              ubuntu 12.04.1, with kernel version 3.2.0-29-generic

                                              fedora with kernel version 3.5.5-1.fc17.×86_64

     

           you said it works on your side? which EZSDK version did you test? which PC did you use for test?

           can you please upload your .config file? this is the only file i changed for this test.

     

    Best Regards

  • Hello, Yitian

    It was EZSDK 5.04 with Ubuntu 10.04, but actually I tested this on the DM816x EVM, so potentially there could be a problem here. Sorry I didn't mention that at first. I will try it  and I'll tell you know the result. I doubt that it is because of the configuration, if it was wrong it would be unlikely to progress that far.

    BR

    Vladimir

  • Hello Vladimir:

         thank you very much for your help.

         today i did more test on DM8148EVM, i use two DM8148EVM boards, one board use the default EZSDK without any change, which means this board is USB host. and the other board configured to be USB gadget. these two boards can ping each other well. i test more than 30 minutes and the network connection is stable.

         but when i configured the DM8148EVM to be USB gadget and connected with Ubuntu PC( version 11.04), the network connection will lose within 1 minute.

         i am waiting for your test result. thanks again.

    Best Regards

  • Yitian,

    Now, with Ubuntu 10.04 LTS, EZSDK 5.05, DM814x EVM, USB Ethernet gadget built-in, there is no disconnect for more then 30 minutes. No disconnect with EZSDK 5.05 on DM816x EVM also.

    BR

    Vladimir

  • OK, so maybe it is something with Ubuntu 11.04. Just to clarify: Is the 1 min disconnect appear on Ubuntu 12.04? On 10.04 LTS I have no problems.

    BR

    Vladimir

  • If it is working with 12.04 or if you have 10.04 on your disposal, you can test your patch this way and to tell me the result now. Thank you.

    BR

    Vladimir

  • Hello Vladimir:

        thank you for your test, i will test EZSDK 5.05 with Ubuntu 10.04.

        by the way, could you please also test the EZSDK 5.04 with Ubuntu 11.04 if you these environment on your hand?

        i tested Ubuntu 11.04 and 12.04, both of them has the disconnect issue. and the  fedora with kernel version 3.5.5-1.fc17.×86_64 also cannot work well.

    Best Regards

  • I have tried the scenario 10.04 LTS, EZSDK 5.04, DM816x EVM, USB Ethernet gadget built-in in the past and there was no disconnects.

    Vladimir

  • Hello, Yitian

    What happened? Do you have any success? Thank you.

    BR

    Vladimir