Hey Alan,

Many thanks for the quick reply.  Watching your Steer video makes me want
to dive into Nuttx a lot more!

I tried to use lpcxpresso-lpc1768 at the beginning of the project but
wasn't able to get it working and boot into nsh.Configuring Nuttx via
mbed:nsh or mcb1700:nsh works for my board. I also tried using olimex
lpc1766 stk and was able to make it work. As you said, I tried to debug via
turning on the USB debug options. This is the output I received on the
terminal.
x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x
ABDF
work_start_highpri: Starting high-priority kernel worker thread(s)
Register class drivers
usbhost_registerclass: Registering class:0x100000e4 nids:1
Initialize USB host
lpc17_40_usbhost_initialize: Initializing Host Stack
lpc17_40_usbhost_initialize: USB host Initialized, Device connected:NO
ERROR: Start nlpc17_40_usbinterrupt: INST: 00000044 INTEN: c000005b
lpc17_40_usbinterrupt: Root Hub Status Change, RHPORTST1: 00010301
lpc17_40_usbinterrupt: Connect Status Change, RHSTATUS: 00000000
lpc17_40_usbinterrupt: Connected
lpc17_40_usbinterrupt: Speed:1
sh_waiter

Nutnsh_waiter: Running
lpc17_40_wait: RHport Connected: YES
nsh_waiter: connected
tShell (NSH) NuttX-9.1.0
nsh> [Klpc17_40_usbinterrupt: INST: 00000044 INTEN: c000005b
lpc17_40_usbinterrupt: Root Hub Status Change, RHPORTST1: 00000311
lpc17_40_usbinterrupt: INST: 00000040 INTEN: c000005b
lpc17_40_usbinterrupt: Root Hub Status Change, RHPORTST1: 00100303
lpc17_40_enumerate: Enumerate the device
lpc17_40_ep0configure: EP0 CTRL:00082000
lpc17_40_ctrlin: type:80 req:06 value:0100 index:0000 len:0008
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
usbhost_enumerate: maxpacksetsize: 8
lpc17_40_ep0configure: EP0 CTRL:00082000
lpc17_40_ctrlin: type:80 req:06 value:0100 index:0000 len:0012
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
usbhost_devdesc: class:0 subclass:0000 protocol:0000 vid:16700 pid:8467
lpc17_40_ctrlout: type:00 req:05 value:0001 index:0000 len:0000
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_ep0configure: EP0 CTRL:00082001
lpc17_40_ctrlin: type:80 req:06 value:0200 index:0000 len:0009
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
usbhost_enumerate: sizeof config data: 59
lpc17_40_ctrlin: type:80 req:06 value:0200 index:0000 len:003b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_ctrlout: type:00 req:09 value:0001 index:0000 len:0000
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
lpc17_40_usbinterrupt: INST: 00000006 INTEN: c000005b
usbhost_configdesc: cfg len:9 total len:59
usbhost_configdesc: class:3 subclass:1 protocol:1
usbhost_findclass: Looking for class:3 subclass:1 protocol:1 vid:413c
pid:2113
usbhost_findclass: Checking class:0x100000e4 nids:1
usbhost_idmatch: Compare to class:3 subclass:1 protocol:1 vid:0000 pid:0000
usbhost_classbind: usbhost_findclass: 0x100000e4
usbhost_allocclass: Allocated: 0x2007e5d0
usbhost_classbind: CLASS_CREATE: 0x2007e5d0
usbhost_cfgdesc: Interface descriptor
usbhost_cfgdesc: HID descriptor
usbhost_cfgdesc: Endpoint descriptor
usbhost_cfgdesc: Interrupt IN EP addr:1 mxpacketsize:8
usbhost_cfgdesc: Interface descriptor
lpc17_40_epalloc: EP1 CTRL:00083081
lpc17_40_addinted: interval: 24->16
lpc17_40_addinted: min interval: 16 offset: 0
lpc17_40_addinted: head: 20080160 next: 00000000
*usbhost_cfgdesc: Found EPOOUT:NO*
usbhost_cfgdesc: Endpoints allocated
*usbhost_devinit: ERROR: Failed to allocate transfer buffer*
usbhost_connect: ERROR: usbhost_devinit() failed: -12
usbhost_classbind: ERROR: CLASS_CONNECT failed: -12
usbhost_disconnected: Disconnected
usbhost_destroy: crefs: 1
usbhost_destroy: Unregister driver
lpc17_40_reminted: ed: 20080160 head: 20080160 next: 00000000 offset: 0
lpc17_40_reminted: ed: 20080160 head: 00000000 next: 00000000
lpc17_40_reminted: min interval: 32 offset: 0
usbhost_freeclass: Freeing: 0x2007e5d0
usbhost_classbind: Returning: -12
usbhost_enumerate: ERROR: usbhost_classbind failed -12
lpc17_40_enumerate: ERROR: Enumeration failed: -12
x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x

Looking at the log, I kind of found out that the problem is related to EP0
OUT and is unable to allocate the buffer, and therefore, I am not able to
get the device listed on /dev. I was looking at the source code in drivers/
usbhost/*usbhost_hidkbd.c,* I found out that the EP0 OUT is optional, and
the problem is related to transfer buffer allocation.
Any inputs to resolve the issue will be really helpful.


Thanks,

Manav

On Sun, Jul 5, 2020 at 11:25 PM Alan Carvalho de Assis <acas...@gmail.com>
wrote:

> Hi Manav,
>
> The LPC1768/69 has good support to USB Host, I used NuttX with a Momo
> Racer Force Feedback joystick almost 10 years ago:
> https://www.youtube.com/watch?v=z_-RAFdQd0s
>
> Try to enable the Debug options inside Build Setup -> Debug Options
> using the "make menuconfig" to see where it is failing.
>
> Because LangTiger v2 doesn't have official support on NuttX and I
> never tested USB Host on mcb1700 board, it is better to use other
> board as starting point, i.e.: lpcxpresso-lpc1768. Also you need to
> get more used to NuttX and microcontrollers to get it done. So, please
> do your home work and spend more time studying about microcontrollers
> and testing NuttX.
>
> BR,
>
> Alan
>
> On 7/5/20, Manav Patel <manav...@gmail.com> wrote:
> > Hello!
> >
> > I am trying to implement a system for my final year project viz Vehicle
> > Violation System. As an extension to it, I need to use a USB keyboard for
> > lpc1768 to control some of the cameras. Being from a non-technical side,
> I
> > have almost negligible experience of configuring and using Nuttx the
> > correct way, so please pardon if my doubt is trivial.
> >
> > I have been able to install Nuttx and configure using mcb1700 as the
> > baseboard. The board I am using is the LangTiger v2. The configuration
> > options I have used for USB Host keyboard are from hidkbd folder from
> > olimex-lpc1766stk. I have been able to get my board connected with the
> > keyboard but still ain't able to enumerate it on /dev and thus I am not
> > able to use it the way I intend to.
> > The error I can see on the terminal is ERROR : Start nsh_waiter
> > [image: help.png]
> > As you can see, I can connect the USB keyboard but not able to get it
> > enumerated while using ls -l /dev.
> >
> > I was able to find a similar query on the Yahoo group but am a little
> lost
> > as I have almost zero experience with microcontrollers.
> > Yahoo Query:-
> >
> https://nuttx.yahoogroups.narkive.com/AOcVmLrT/stm32f4discovery-usb-host-hid-mouse-issue-10-attachments
> >
> > Does anybody have any advice related to it? What should I try to mitigate
> > the issue?
> >
> > Thank You very much,
> > Manav
> >
>

Reply via email to