On 4 June 2012 11:27, ABRAHAM, KISHON VIJAY <kishon@xxxxxx> wrote: > Hi, > > On Mon, Jun 4, 2012 at 7:52 AM, Haris Ibrahim K. V. <blucalvin@xxxxxxxxx> wrote: >> Hi all, >> >> I have my host system (Ubuntu 10.04) connected to my Beagle Board XM >> running Angstrom distro. >> >> I have a cross over ethernet connection for 'ssh'ing purposes and a >> USB OTG cable connection as well. >> >> I loaded a usb gadget driver on my beagle board called g_audio.ko. The >> host side demsg command showed: >> >> [ 703.460202] usb 1-2: new high speed USB device using ehci_hcd and address 4 >> [ 703.593970] usb 1-2: configuration #1 chosen from 1 choice >> [ 703.743828] usbcore: registered new interface driver snd-usb-audio >> >> On the beagle board 'dmesg' showed: >> >> [ 153.068389] g_audio gadget: Hardware params: access 3, format 2, >> channels 2, rate 48000 >> [ 153.082489] g_audio gadget: audio_buf_size 48000, req_buf_size 200, >> req_count 256 >> [ 153.095855] g_audio gadget: Linux USB Audio Gadget, version: Dec 18, 2008 >> [ 153.108581] g_audio gadget: g_audio ready >> [ 153.118347] musb-hdrc musb-hdrc: MUSB HDRC host driver >> [ 153.129821] musb-hdrc musb-hdrc: new USB bus registered, assigned >> bus number 2 >> [ 153.143249] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 >> [ 153.156250] usb usb2: New USB device strings: Mfr=3, Product=2, >> SerialNumber=1 >> [ 153.169403] usb usb2: Product: MUSB HDRC host driver >> [ 153.180023] usb usb2: Manufacturer: Linux 3.0.29+ musb-hcd >> [ 153.191162] usb usb2: SerialNumber: musb-hdrc >> [ 153.201812] hub 2-0:1.0: USB hub found >> [ 153.211090] hub 2-0:1.0: 1 port detected >> [ 153.645568] g_audio gadget: high speed config #1: Linux USB Audio Gadget >> >> I hope that means both the systems have recognized the existence of that driver. >> >> I wanted to test if the connection was fine. Searching for a way, I >> found this link: linux-usb<dot>org/usbtest/ >> >> I downloaded both the testusb.c and test.sh files from there. Upon >> compiling and running testusb, it showed: >> >> usbfs files are missing >> >> I compiled a new kernel with "Device Drivers->USB support" as option >> "USB device filesystem" enabled. But that only brought me till >> /proc/bus/usb/ . The 'devices' inside that was still not there. >> >> After searching I did: >> >> sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices >> >> Now I again ran ./testusb -a and got the output: >> >> no test devices recognized > > g_audio is not a test device. You can perform the same test with > g_zero. You can have a look at testusb.c to check what all is > recognized as test device. You'll see gadget zero as a test device :-) > > /* "gadget zero", Linux-USB test software */ > if (dev->idVendor == 0x0525 && dev->idProduct == 0xa4a0) > return 1; >> >> Why hasn't my gadget driver been recognized by this program? Is there >> a work around where I can check whether my beagle board has been >> detected via the USB OTG cable? > > Yes. You can use *lsusb* in your host pc to see the list of attached > devices. You'll find something like *gadget audio* if you had g_audio > or *gadget zero* if you have g_zero. > > Regards > Kishon Thank you. :) When I loaded the gadget driver on my board, running lsusb on the host showed me the following output: Bus 001 Device 018: ID 1d6b:0101 Linux Foundation Audio Gadget However, I also saw that a new entry 'audio1' had appeared under /dev/ . Is there a way to confirm that that corresponds to the gadget driver loaded on the board? Also, when I loaded the g_audio in the board, 'usbmon2' popped up under /dev. So if both audio1 (on the host) and usbmon2 (on the board) were the interfaces to the g_audio gadget driver, won't I be able to write something to "usbmon2" and read that data from "audio1"? -- Haris Ibrahim K. V. sosaysharis.wordpress.com -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html