Linux USB Gadget Network Experience

Source: Internet
Author: User

Platform: Mini2440

System: linux-2.6.32.2

Host: Windows

When configuring Usbnet in the USB gadget feature, the main task is to load the G_ Ether.ko module, but tried several times to plug into the computer, are not responding, Windows can not identify the device, check the data only to know is the USB interface pull-up problem, mini2440 through the GPC5 to pull the USB interface, only so that the host to identify the device and prompted to install the device. After the integration of the information, the problem is resolved, the steps:

Open mach-mini2440.c Add code:

static void S3c2410_udc_pullup (enum s3c2410_udc_cmd_e cmd) {        switch (cmd) {case        s3c2410_udc_p_enable:                S3c2410_gpio_cfgpin (S3C2410_GPC (5), s3c2410_gpio_output);                S3c2410_gpio_setpin (S3C2410_GPC (5), 1);                break;        Case s3c2410_udc_p_disable:                s3c2410_gpio_setpin (S3C2410_GPC (5), 0);                break;        Case S3c2410_udc_p_reset: Break                ;        Default: Break                ;        }}
static struct S3c2410_udc_mach_info s3c2410_udc_cfg __initdata = {. udc_command= s3c2410_udc_pullup,};
Inadd a sentence to the Mini2440_machine_init function:
static void __init Mini2440_machine_init (void) {#if defined (lcd_width) s3c24xx_fb_set_platdata (&mini2440_fb_info ); #endifs3c_i2c0_set_platdata (NULL); S3c2410_gpio_cfgpin (S3C2410_GPC (0), s3c2410_gpc0_lend); S3c_device_ Nand.dev.platform_data = &friendly_arm_nand_info;s3c_device_sdi.dev.platform_data = &mini2440_mmc_cfg; S3c24xx_udc_set_platdata (&S3C2410_UDC_CFG); Add Platform_add_devices (Mini2440_devices, Array_size (mini2440_devices)); S3c_pm_init ();}
Save close after adding # include <plat/udc.h> header files at the beginning of the program.

Make Menuconfig configuration kernel: Device drivers-usb support-usb Gadget Support

Configuration

Note the cursor configuration, easy to ignore, select s3c2410 USB Device Controller

Configuration complete save exit, make Zimage, start Linux with the new kernel.

Configuration command: Ifconfig usb0 172.20.21.88 up

Connect the D-type interface and the Windows host with USB to prompt for device installation:

Drive: http://download.csdn.net/detail/wu20093346/7914915


Install from a list or a specified location


After installation, a new local connection, modify IP, should be able to and mini2440 board Ping Pass:


Linux USB Gadget Network Experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.