Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Apr 2015 11:50 AM by  Rajesh Tirumala
USB device IP address
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Rajesh Tirumala
New Member
New Member
Posts:10


--
23 Apr 2015 12:31 PM

    Hi 

    We have two logicPD boards with following revisions

    Linux version 3.0.0-BSP-dm37x-2.4-2 (lpd@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #164 Thu Apr 23 01:20:28 IST 2015
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    Machine: Logic DM37x SOM LV board

    We have one board (master) act as a USB host controller and the other (slave) as a device (with g_ether module).

    master side always boots up with host controller functionality and on the slave side, g_ether is compiled as a module and I am running modprobe to install the g_ether driver.

    Right now, on the master side, I am running a script to run lsusb command and if I find a new device, then I am running "ifconfig usb0 x.x.x.x" to assign an ipaddress.

     

    My question is, is there a way to automatically detect and assign the usb0 ip address as soon as the host controller finds a new usb cdc_net class device on its bus ?  Or is the kernel build configuration to configure an ipaddress for the USB device..?

     

    Thanks in advance for your help..

     

    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    23 Apr 2015 06:49 PM
    Rajesh,

    Have you tried setting the kernel parameters?  I found that passing this string "ip=192.168.120.155:::255.255.255.0:myboard:eth1:on" using kernel parameters configured my Ethernet without having to use "ifup eth1" or "ifconfig ....".

    Here are the commands I used to set the kernel parameters while in u-boot.

    OMAP Logic # setenv otherbootargs ${otherbootargs} ip=192.168.120.155:::255.255.255.0:myboard:eth1:on

    OMAP Logic # saveenv

     

    USB device IP address.log.txt is a full log file demonstrating this change.   

    Regards,

    Brad

    Rajesh Tirumala
    New Member
    New Member
    Posts:10


    --
    24 Apr 2015 09:34 AM
    HI Brad,

    Thanks for looking into it.
    I tried it but it did not worked.. do I need to replace "myboard" with any of my device specific data..
    I am attaching the boot up log.

    I don't see the USB0 adapter until I run ifconfig for usb0.

     

    Could not attached the file, here is the dump..

     

    printenv otherbootargs 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # 
    otherbootargs=ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on
    OMAP Logic # boot
    kernel_location: nand-part, rootfs_location: /dev, rootfs_type: yaffs

    == Loading kernel from nand partition kernel to 0x81000000 ==

    Loading from nand0, offset 0x280000
       Image Name:   Linux-3.0.0-BSP-dm37x-2.4-2Eyelo
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3185940 Bytes = 3 MiB
       Load Address: 80008000
       Entry Point:  80008000

    == rootfs located in /dev/mtdblock5 ==


    == Kernel bootargs ==
    nand-ecc=hw console=ttyO2,115200n8 mem=224M@0x80000000 mpurate=600 i2c_bus=3,100 display=15 ignore_loglevel early_printk no_console_suspend ip=192.168.40.3:::255.255.255.
    0:myboard:usb0:on mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs) root=/dev/mtdblock5 rw rootfstype=yaffs2

    bootm 0x81000000

    ## Booting kernel from Legacy Image at 81000000 ...
       Image Name:   Linux-3.0.0-BSP-dm37x-2.4-2Eyelo
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    3185940 Bytes = 3 MiB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    [    0.000000] Linux version 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 (lpd@ubuntu) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #164 Thu Apr 23 01:20:28 IST 2015
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    [    0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] Machine: Logic DM37x SOM LV board
    [    0.000000] debug: ignoring loglevel setting.
    [    0.000000] Memory policy: ECC disabled, Data cache writeback
    [    0.000000] OMAP3630 ES1.2 (l2cache neon isp 192mhz_clk )
    [    0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
    [    0.000000] On node 0 totalpages: 57344
    [    0.000000] free_area_init_node: node 0, pgdat c079e494, node_mem_map c0d37000
    [    0.000000]   Normal zone: 448 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 56896 pages, LIFO batch:15
    [    0.000000] Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
    [    0.000000] Reprogramming SDRC clock to 332000000 Hz
    [    0.000000] dpll3_m2_clk rate change failed: -22
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 56896
    [    0.000000] Kernel command line: nand-ecc=hw console=ttyO2,115200n8 mem=224M@0x80000000 mpurate=600 i2c_bus=3,100 display=15 ignore_loglevel early_printk no_console_su
    spend ip=192.168.40.3:::255.255.255.0:myboard:usb0:on mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs) root=/dev/mtdblock
    5 rw rootfstype=yaffs2
    [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Memory: 224MB = 224MB total
    [    0.000000] Memory: 213800k/213800k available, 15576k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    [    0.000000]     vmalloc : 0xce800000 - 0xf8000000   ( 664 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xce000000   ( 224 MB)
    [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
    [    0.000000]       .init : 0xc0008000 - 0xc003d000   ( 212 kB)
    [    0.000000]       .text : 0xc003d000 - 0xc05e8ba4   (5807 kB)
    [    0.000000]       .data : 0xc05ea000 - 0xc07a5708   (1774 kB)
    [    0.000000]        .bss : 0xc07a572c - 0xc0d36884   (5701 kB)
    [    0.000000] NR_IRQS:396
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
    [    0.000000] Total of 96 interrupts on 1 active controller
    [    0.000000] OMAP clockevent source: GPTIMER1 at 32768 Hz
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
    [    0.000000] ... MAX_LOCKDEP_SUBCLASSES:  8
    [    0.000000] ... MAX_LOCK_DEPTH:          48
    [    0.000000] ... MAX_LOCKDEP_KEYS:        8191
    [    0.000000] ... CLASSHASH_SIZE:          4096
    [    0.000000] ... MAX_LOCKDEP_ENTRIES:     16384
    [    0.000000] ... MAX_LOCKDEP_CHAINS:      32768
    [    0.000000] ... CHAINHASH_SIZE:          16384
    [    0.000000]  memory used by lock dependency info: 3951 kB
    [    0.000000]  per task-struct memory footprint: 2304 bytes
    [    0.000793] Calibrating delay loop... 594.49 BogoMIPS (lpj=2322432)
    [    0.093811] pid_max: default: 32768 minimum: 301
    [    0.094299] Security Framework initialized
    [    0.094604] Mount-cache hash table entries: 512
    [    0.098815] CPU: Testing write buffer coherency: ok
    [    0.109893] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_core
    [    0.109924] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_per
    [    0.109924] omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_wkup
    [    0.110351] omap_hwmod: gpt12_fck: missing clockdomain for gpt12_fck.
    [    0.116333] print_constraints: dummy: 
    [    0.116729] cpufreq_core_init:1887
    [    0.117950] NET: Registered protocol family 16
    [    0.118682] GPMC revision 5.0
    [    0.122680] omap_device: omap_gpio.0: new worst case activate latency 0: 91552
    [    0.124786] OMAP GPIO hardware version 2.5
    [    0.126342] OMAP GPIO hardware version 2.5
    [    0.127746] OMAP GPIO hardware version 2.5
    [    0.129150] OMAP GPIO hardware version 2.5
    [    0.130584] OMAP GPIO hardware version 2.5
    [    0.131958] OMAP GPIO hardware version 2.5
    [    0.134033] omap_mux_init: Add partition: #1: core, flags: 0
    [    0.242462] omap3torpedo_fix_pbias_voltage:1326 PKUP_CTRL 0x40
    [    0.243927] Setup pinmux and enable UART A
    [    0.244445] omap_device: omap_uart.0: new worst case activate latency 0: 30517
    [    0.245178] Setup pinmux and enable UART B
    [    0.246185] omap_device: omap_uart.1: new worst case deactivate latency 0: 30517
    [    0.246398] Setup pinmux and enable UART C
    [    0.247772] Can't setup SPIDEV SPI1/CS1 as McSPI1_CS1 not available on LV SOM
    [    0.247802] Can't setup SPIDEV SPI1/CS2 as McSPI1_CS2 not available on LV SOM
    [    0.247802] Can't setup SPIDEV SPI1/CS3 as McSPI1_CS3 not available on LV SOM
    [    0.248779] _nand_init: id 0 nand_cs 0
    [    0.251007] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.304870] Switched to new clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz
    [    0.305541] OMAP DMA hardware revision 5.0
    [    0.329040] bio: create slab at 0
    [    0.332061] SCSI subsystem initialized
    [    0.332977] omap_device: omap2_mcspi.1: new worst case activate latency 0: 30517
    [    0.334777] omap_device: omap2_mcspi.1: new worst case deactivate latency 0: 30517
    [    0.339141] usbcore: registered new interface driver usbfs
    [    0.339477] usbcore: registered new interface driver hub
    [    0.339996] usbcore: registered new device driver usb
    [    0.341644] omap_device: omap_i2c.1: new worst case activate latency 0: 30517
    [    0.341857] omap_i2c omap_i2c.1: bus 1 rev4.0 at 2600 kHz
    [    0.377410] twl4030: PIH (irq 7) chaining IRQs 368..375
    [    0.377685] twl4030: power (irq 373) chaining IRQs 376..383
    [    0.380432] print_constraints: VUSB1V5: 1500 mV normal standby
    [    0.382232] print_constraints: VUSB1V8: 1800 mV normal standby
    [    0.384033] print_constraints: VUSB3V1: 3100 mV normal standby
    [    0.388610] Setting A idle...
    [    0.394989] twl4030_usb twl4030_usb: Initialized TWL4030 USB module
    [    0.397033] print_constraints: vdd_mpu_iva: 600 <--> 1450 mV normal 
    [    0.398681] print_constraints: vdd_core: 600 <--> 1450 mV normal 
    [    0.400604] print_constraints: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby
    [    0.402465] print_constraints: VDAC: 1800 mV normal standby
    [    0.404388] print_constraints: VDVI: 1800 mV normal standby
    [    0.406158] print_constraints: VMMC2: 1850 <--> 3150 mV at 2600 mV normal standby
    [    0.408142] print_constraints: VAUX1: 3000 mV normal standby
    [    0.409912] print_constraints: VAUX3: 2800 mV normal standby
    [    0.410736] omap_device: omap_i2c.1: new worst case deactivate latency 0: 30517
    [    0.422058] omap_i2c omap_i2c.2: bus 2 rev4.0 at 400 kHz
    [    0.437683] omap_i2c omap_i2c.3: bus 3 rev4.0 at 100 kHz
    [    0.439758] Advanced Linux Sound Architecture Driver Version 1.0.24.
    [    0.442504] Switching to clocksource 32k_counter
    [    0.445678] Switched to NOHz mode on CPU #0
    [    0.548919] musb-hdrc: version 6.0, pio, host
    [    0.549346] omap_device: musb-omap2430.-1: new worst case activate latency 0: 30517
    [    0.549560] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [    0.549591] musb-hdrc: MHDRC RTL version 1.800 
    [    0.549621] musb-hdrc: setup fifo_mode 4
    [    0.549652] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [    0.549743] musb-hdrc musb-hdrc: MUSB HDRC host driver
    [    0.550109] musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1
    [    0.551055] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.551055] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.551086] usb usb1: Product: MUSB HDRC host driver
    [    0.551086] usb usb1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 musb-hcd
    [    0.551116] usb usb1: SerialNumber: musb-hdrc
    [    0.554626] hub 1-0:1.0: USB hub found
    [    0.554992] hub 1-0:1.0: 1 port detected
    [    0.613067] musb-hdrc musb-hdrc: USB OTG mode controller at fa0ab000 using PIO, IRQ 92
    [    0.613708] NET: Registered protocol family 2
    [    0.614288] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.616271] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.616699] TCP bind hash table entries: 8192 (order: 6, 360448 bytes)
    [    0.621002] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.621093] TCP reno registered
    [    0.621124] UDP hash table entries: 128 (order: 1, 12288 bytes)
    [    0.621459] UDP-Lite hash table entries: 128 (order: 1, 12288 bytes)
    [    0.622680] NET: Registered protocol family 1
    [    0.624877] RPC: Registered named UNIX socket transport module.
    [    0.624908] RPC: Registered udp transport module.
    [    0.624938] RPC: Registered tcp transport module.
    [    0.624938] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.625030] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.782989] VFS: Disk quotas dquot_6.5.2
    [    0.783081] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.786041] JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
    [    0.786956] yaffs: yaffs built Jan  6 2015 02:11:52 Installing.
    [    0.787109] msgmni has been set to 417
    [    0.792816] io scheduler noop registered
    [    0.792846] io scheduler deadline registered
    [    0.792999] io scheduler cfq registered (default)
    [    0.795318] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [    0.800628] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
    [    0.802551] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
    [    0.803497] omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
    [    1.760437] console [ttyO2] enabled
    [    1.765533] omap_device: omap_i2c.1: new worst case activate latency 0: 61035
    [    1.798461] brd: module loaded
    [    1.813385] loop: module loaded
    [    1.822357] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.829345] omap2-nand driver initializing
    [    1.834259] ONFI flash detected
    [    1.837677] ONFI param page 0 valid
    [    1.841430] Maddy:ChipSize = 1073741824
    [    1.845916] nand_get_flash_type: disturb cdb00000 chipsize 1073741824 erasesize 131072
    [    1.854339] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xa3 (Micron MT29F8G08ADBDAH4)
    [    1.862854] NAND ECC: HW_CHIP
    [    1.866119] 6 cmdlinepart partitions found on MTD device omap2-nand.0
    [    1.872955] Creating 6 MTD partitions on "omap2-nand.0":
    [    1.878601] 0x000000000000-0x000000080000 : "x-loader"
    [    1.891082] 0x000000080000-0x000000220000 : "u-boot"
    [    1.901611] 0x000000220000-0x000000280000 : "u-boot-env"
    [    1.911132] 0x000000280000-0x000000780000 : "kernel"
    [    1.925018] 0x000000780000-0x000001b80000 : "ramdisk"
    [    1.952301] 0x000001b80000-0x000040000000 : "fs"
    [    2.875579] usb 1-1: new high speed USB device number 2 using musb-hdrc
    [    2.891479] smsc911x: Driver version 2008-10-21
    [    2.902313] smsc911x-mdio: probed
    [    2.906341] smsc911x smsc911x.0: eth0: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=0:01, irq=-1)
    [    2.918273] smsc911x smsc911x.0: eth0: MAC Address: 3e:0c:3c:c6:cc:f3
    [    2.934448] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
    [    2.943450] i2c /dev entries driver
    [    2.949890] Linux media interface: v0.10
    [    2.954376] Linux video capture interface: v2.00
    [    2.959808] omap_device: omap_wdt.-1: new worst case activate latency 0: 30517
    [    2.969146] OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
    [    2.975616] omap_device: omap_wdt.-1: new worst case deactivate latency 0: 30517
    [    2.984374] twl4030_wdt twl4030_wdt: Failed to register misc device
    [    2.991302] twl4030_wdt: probe of twl4030_wdt failed with error -16
    [    2.998168] SoftDog: cannot register miscdev on minor=130 (err=-16)
    [    3.006408] omap_sr_disable: omap_sr struct for sr_mpu_iva not found
    [    3.013183] voltdm_scale: No voltage scale API registered for vdd_mpu_iva
    [    3.020294] omap_sr_enable: omap_sr struct for sr_mpu_iva not found
    [    3.026916] platform mpu.0: omap_target: unable to scale voltage up.
    [    3.034179] cpuidle: using governor ladder
    [    3.038543] cpuidle: using governor menu
    [    3.047515] OMAP3 Logic DM37x/OMAP35x SOM LV/Torpedo SoC init
    [    3.134735] asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
    [    3.152404] ALSA device list:
    [    3.155578]   #0: omap3logic
    [    3.158599] oprofile: hardware counters not available
    [    3.163909] oprofile: using timer interrupt.
    [    3.168701] nf_conntrack version 0.5.0 (3340 buckets, 13360 max)
    [    3.176513] ip_tables: (C) 2000-2006 Netfilter Core Team
    [    3.182800] TCP cubic registered
    [    3.186248] Initializing XFRM netlink socket
    [    3.190887] NET: Registered protocol family 17
    [    3.195709] NET: Registered protocol family 15
    [    3.200714] Bridge firewalling registered
    [    3.205291] Registering the dns_resolver key type
    [    3.210784] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    3.218902] ThumbEE CPU extension supported.
    [    3.244323] smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
    [    3.253540] smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
    [    3.262359] SmartReflex Class3 initialized
    [    3.266693] sr_start_vddautocomp: sr->srid 1
    [    3.271331] omap_device: smartreflex.1: new worst case activate latency 0: 122070
    [    3.279235] sr_start_vddautocomp: sr->srid 0
    [    3.335388] clock: disabling unused clocks to save power
    [    3.344268] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [    3.351379] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [    3.358917] usb 1-1: Product: RNDIS/Ethernet Gadget
    [    3.364013] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [    3.373657] regulator_init_complete: VAUX3: incomplete constraints, leaving on
    [    3.381591] regulator_init_complete: VAUX1: incomplete constraints, leaving on
    [    3.390472] regulator_init_complete: VDVI: incomplete constraints, leaving on
    [    3.400543] regulator_init_complete: VDAC: incomplete constraints, leaving on
    [    3.408416] regulator_init_complete: VMMC1: incomplete constraints, leaving on
    [    3.418975] twl_rtc twl_rtc: setting system clock to 2015-04-24 14:26:05 UTC (1429885565)
    [    5.390808] usb 1-1: USB disconnect, device number 2
    [    8.122619] usb 1-1: new high speed USB device number 3 using musb-hdrc
    [    8.281127] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [    8.288208] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [    8.295745] usb 1-1: Product: RNDIS/Ethernet Gadget
    [    8.300872] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [   15.525970] yaffs: dev is 32505861 name is "mtdblock5" rw
    [   15.531738] yaffs: passed flags ""
    [   15.535308] yaffs: yaffs: Attempting MTD mount of 31.5,"mtdblock5"
    [   15.542053] yaffs: oobavail(16) <= 28; forcing "tags-ecc-off"
    [   21.817810] usb 1-1: USB disconnect, device number 3
    [   24.658935] usb 1-1: new high speed USB device number 4 using musb-hdrc
    [   25.158721] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [   25.165832] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   25.173370] usb 1-1: Product: RNDIS/Ethernet Gadget
    [   25.178527] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [   26.154937] yaffs: yaffs_read_super: is_checkpointed 0
    [   26.160766] VFS: Mounted root (yaffs2 filesystem) on device 31:5.
    [   26.167480] Freeing init memory: 212K
    Mounting /proc and /sys 
    Starting the hotplug events dispatcher mdev
    Starting the hotplug events dispatcher udevd
    Synthesizing initial hotplug events
    [   28.388824] udevd (60): /proc/60/oom_adj is deprecated, please use /proc/60/oom_score_adj instead.
    [   29.691253] cdc_subset: probe of 1-1:1.0 failed with error -22
    [   29.718902] cdc_subset 1-1:1.1: usb0: register 'cdc_subset' at usb-musb-hdrc-1, Linux Device, 56:b7:ec:52:1d:89
    [   29.729919] usbcore: registered new interface driver cdc_subset
    Starting devfsd: 
    devfsd: can't open '.devfsd': No such file or directory
    Run depmod to create modules.dep.bin
    Mounting filesystems
    mount: mounting usbfs on /proc/bus/usb failed: No such file or directory
    ln: /debug/debug: Operation not permitted
    Starting syslogd and klogd
    Enabling SmartReflex: 
    Starting inetd: 
    Running sysctl
    Setting up networking on loopback device: 
    Setting up networking on eth0: 
    Setting up MAC address for eth0 with 00:50:C2:ED:C0:86
    [   34.889801] smsc911x smsc911x.0: eth0: MAC Address: 00:50:c2:ed:c0:86
    udhcpc (v1.20.2) started
    [   35.201385] smsc911x smsc911x.0: eth0: SMSC911x/921x identified at 0xce876000, IRQ: 225
    Sending discover...
    [   37.209503] eth0: link up, 100Mbps, full-duplex
    Sending discover...
    Sending select for 192.168.1.7...
    Lease of 192.168.1.7 obtained, lease time 28800
    [   38.275604] usb 1-1: USB disconnect, device number 4
    [   38.283599] cdc_subset 1-1:1.1: usb0: unregister 'cdc_subset' usb-musb-hdrc-1, Linux Device
    Deleting routers
    adding dns 192.168.1.1
    Starting the ssh server: 
    Starting SMB services: /etc/rc.d/init.d/smb: line 6: nmbd: command not found
    /etc/rc.d/init.d/smb: line 8: smbd: command not found
    no /usr/sbin/dhcpd!
    IPTABLES_INTERNAL_INTERFACE not set!
    Starting hostapd: 
    Configuration file: /etc/hostapd.conf
    nl80211: 'nl80211' generic netlink not found
    nl80211 driver initialization failed.
    LCD panel file is not found
    Starting the watchdog daemon: 
    [   41.021301] omap_device: omap_wdt.-1: new worst case activate latency 0: 91552
    Restoring ALSA state for soundcard omap3logic
    [   41.143554] usb 1-1: new high speed USB device number 5 using musb-hdrc
    [   41.407135] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [   41.414276] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   41.421813] usb 1-1: Product: RNDIS/Ethernet Gadget
    [   41.426910] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [   41.468719] cdc_subset: probe of 1-1:1.0 failed with error -22
    [   41.486145] omap_device: omap_i2c.1: new worst case activate latency 0: 91552
    [   41.497039] cdc_subset 1-1:1.1: usb0: register 'cdc_subset' at usb-musb-hdrc-1, Linux Device, 56:b7:ec:52:1d:89
    Enabling PM off mode: 
    Starting dbus system daemon: 
    ****************************
    starting eyeLock application
    ****************************


            Welcome to the LTIB Embedded Linux Environment

    !!!!! WARNING !!!!!!!

    The default password for the root account is: root
    please change this password using the 'passwd' command
    and then edit this message (/etc/issue) to remove this message.

    To enable DHCP on ethernet, type "ifup eth0"

    nanonxt139 login: root
    Password: 
    root@nanonxt139:~# 
    root@nanonxt139:~# 
    root@nanonxt139:~# 
    root@nanonxt139:~# ifconfig 
    eth0      Link encap:Ethernet  HWaddr 00:50:C2:ED:C0:86  
              inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:369 errors:0 dropped:10 overruns:0 frame:0
              TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:33636 (32.8 Kb)  TX bytes:698 (698.0 b)
              Interrupt:225 

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

    root@nanonxt139:~# 
    root@nanonxt139:~# [   54.747619] usb 1-1: USB disconnect, device number 5
    [   54.755004] cdc_subset 1-1:1.1: usb0: unregister 'cdc_subset' usb-musb-hdrc-1, Linux Device
    [   57.513183] usb 1-1: new high speed USB device number 6 using musb-hdrc
    [   57.664337] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [   57.671600] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   57.679138] usb 1-1: Product: RNDIS/Ethernet Gadget
    [   57.684265] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [   57.715728] cdc_subset: probe of 1-1:1.0 failed with error -22
    [   57.749877] cdc_subset 1-1:1.1: usb0: register 'cdc_subset' at usb-musb-hdrc-1, Linux Device, 56:b7:ec:52:1d:89

    root@nanonxt139:~# [   71.230712] usb 1-1: USB disconnect, device number 6
    [   71.238250] cdc_subset 1-1:1.1: usb0: unregister 'cdc_subset' usb-musb-hdrc-1, Linux Device
    [   73.989776] usb 1-1: new high speed USB device number 7 using musb-hdrc
    [   74.140899] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [   74.148010] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   74.155548] usb 1-1: Product: RNDIS/Ethernet Gadget
    [   74.160644] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [   74.192077] cdc_subset: probe of 1-1:1.0 failed with error -22
    [   74.225830] cdc_subset 1-1:1.1: usb0: register 'cdc_subset' at usb-musb-hdrc-1, Linux Device, 56:b7:ec:52:1d:89

    root@nanonxt139:~# [   79.865020] omap_device: omap_i2c.1: new worst case activate latency 0: 213623
    [   87.714782] usb 1-1: USB disconnect, device number 7
    [   87.722259] cdc_subset 1-1:1.1: usb0: unregister 'cdc_subset' usb-musb-hdrc-1, Linux Device
    [   90.481964] usb 1-1: new high speed USB device number 8 using musb-hdrc
    [   90.641235] usb 1-1: New USB device found, idVendor=0525, idProduct=a4a2
    [   90.648376] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   90.655883] usb 1-1: Product: RNDIS/Ethernet Gadget
    [   90.661010] usb 1-1: Manufacturer: Linux 3.0.0-BSP-dm37x-2.4-2Eyelock_NXT_3.0.1 with
    [   90.692413] cdc_subset: probe of 1-1:1.0 failed with error -22
    [   90.726135] cdc_subset 1-1:1.1: usb0: register 'cdc_subset' at usb-musb-hdrc-1, Linux Device, 56:b7:ec:52:1d:89

    root@nanonxt139:~# ifconfig usb0 192.168.40.1
    root@nanonxt139:~# 
    root@nanonxt139:~# ifconfig usb0 192.168.40.1                 ls -l    ifconfig 
    eth0      Link encap:Ethernet  HWaddr 00:50:C2:ED:C0:86  
              inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1391 errors:0 dropped:42 overruns:0 frame:0
              TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:125021 (122.0 Kb)  TX bytes:698 (698.0 b)
              Interrupt:225 

    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

    usb0      Link encap:Ethernet  HWaddr 56:B7:EC:52:1D:89  
              inet addr:192.168.40.1  Bcast:192.168.40.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:17 errors:0 dropped:0 overruns:0 frame:0
              TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:844 (844.0 b)  TX bytes:670 (670.0 b)

    root@nanonxt139:~# ping 192.168.40.2
    PING 192.168.40.2 (192.168.40.2): 56 data bytes
    64 bytes from 192.168.40.2: seq=0 ttl=64 time=2.533 ms
    64 bytes from 192.168.40.2: seq=1 ttl=64 time=1.129 ms
    64 bytes from 192.168.40.2: seq=2 ttl=64 time=1.038 ms
    64 bytes from 192.168.40.2: seq=3 ttl=64 time=0.977 ms

    --- 192.168.40.2 ping statistics ---
    4 packets transmitted, 4 packets received, 0% packet loss
    round-trip min/avg/max = 0.977/1.419/2.533 ms
    root@nanonxt139:~# 
    root@nanonxt139:~# 
    root@nanonxt139:~# 

    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    27 Apr 2015 01:13 PM
    Rajesh,

     

    In looking at your log file I discovered the following.  Your log file appears to be using USB OTG has a host controller.  My example earlier was using the USB Host controller, not USB OTG. 

    I made the following changes to my BSP and verify that the IP address is automatically getting assisted using Ethernet over USB when connected to the USB OTG host controller.  Below is a link to a full boot log file.

     

    Here are the configuration settings needed:

    1. CONFIG_MUSB_PIO_ONLY=y
    2. CONFIG_USB_INVENTRA_DMA is not set
    3. CONFIG_MUSB_USE_SYSTEM_DMA_WORKAROUND is not set
    CONFIG_USB_ETH=y

     

    CONFIG_USB_FILE_STORAGE is not set

    By changing the Ethernet Gadget from a module to a build-in driver I was then able to automatically assign the IP address using the kernel command-line parameters as described earlier.

     

      │ Symbol: USB_ETH [=y]
      │ Type  : tristate              
      │ Prompt: Ethernet Gadget (with CDC Ethernet support)                                                                                                                                                 

      │   Defined at drivers/usb/gadget/Kconfig:714 
      │   Depends on: && NET [=y]         
      │   Location:                                                 
      │     -> Device Drivers                                  
      │       -> USB support (USB_SUPPORT [=y])     
      │         -> USB Gadget Support (USB_GADGET [=y])                                                                                                                                                     
      │           -> USB Gadget Drivers ( [=y]) 
      │   Selects: CRC32 [=y] 

     

    Here are the commands for u-boot to set the kernel command-line parameter for automatically configuring the IP address at boot time..

    $ setenv otherbootargs "ip=192.168.120.155:::255.255.255.0:myboard:eth1:on"
    saveenv

    reset

    Below is a link to the full log file demonstrating automatic IP assignment to the Ethernet over USB interface.

    20150427 - Ethernet over USBOTG as Host.log.txt

    Regards,

    Brad

    Rajesh Tirumala
    New Member
    New Member
    Posts:10


    --
    28 Apr 2015 11:50 AM
    Thanks Brad, I'll try this
    You are not authorized to post a reply.