All of lore.kernel.org
 help / color / mirror / Atom feed
* connecting omap and comp using usb cable
@ 2007-03-27 15:46 Wael Adel
       [not found] ` <31e679430703270851q3f1e1f6o57a88339accd8fa9@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Wael Adel @ 2007-03-27 15:46 UTC (permalink / raw)
  To: linux-omap-open-source

hi all,
i want to communicate with the OMAP kit through the usb cable.

so i made the following small program as a first step  to open the
device as follows: (Note that i have made by taking copy of flash
recovery program omapf1)
********************************************************************************************************
#include <stdio.h>
#include <string.h>
#include <usb.h>

#define OMAP_VENDOR     0x0451
#define OMAP_PRODUCT    0x3f00
#define IN_EP   0x81
#define OUT_EP  0x02

int main(int argc, char *argv[])
{
  usb_init();
  usb_find_busses();


       fprintf (stderr, "Waiting to OMAP-USB connection\n");
        for (;;)
        {
                sleep (1);

                int     n= usb_find_devices ();
                if (n)
                {
                        struct usb_bus  *bus;
                        for (bus= usb_get_busses (); bus; bus= bus->next)
                        {
                                struct usb_device       *dev;

                                for (dev= bus->devices; dev; dev= dev->next)
                                {
                                        usb_dev_handle  *handle;
                                        if (dev->descriptor.idVendor
== OMAP_VENDOR  &&

dev->descriptor.idProduct == OMAP_PRODUCT  &&
                                                (handle= usb_open
(dev)) != NULL)
                                        {
                                                printf("Device is
opened successfully\n");
                                        }
                                }
                        }
                }
        }
  return 0;
}
********************************************************************************************************************

but u guess what?
when i run this small program,i got the following output:

Waiting to OMAP-USB connection

note that i checked that the usb cable is connected well between my
comp and the kit.
Also i checked that jumper 3 is set to pins (1,2)
do u have any ideas why the device is not found?
thanks in advance.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-27 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 15:46 connecting omap and comp using usb cable Wael Adel
     [not found] ` <31e679430703270851q3f1e1f6o57a88339accd8fa9@mail.gmail.com>
     [not found]   ` <bd205c5f0703270858y79c08e9dg65dfe1a04f4087fc@mail.gmail.com>
2007-03-27 16:10     ` Wael Adel
2007-03-27 16:17       ` Felipe Balbi
2007-03-27 16:33         ` Wael Adel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.