Discussion:
Stm32-tiny usb host with error
(too old to reply)
wisdom9285@gmail.com [nuttx]
2017-03-01 02:15:48 UTC
Permalink
chip/stm32_usbhost.c:80:52: error: 'TRACE1_NSTRINGS' undeclared here (not in a function)
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
^
chip/stm32_usbhost.c:148:1: error: empty scalar initializer
};
^
chip/stm32_usbhost.c:148:1: error: (near initialization for 'g_trace1')
chip/stm32_usbhost.c:150:52: error: 'TRACE2_NSTRINGS' undeclared here (not in a function)
static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
^
chip/stm32_usbhost.c:210:1: error: empty scalar initializer
};
^
chip/stm32_usbhost.c:210:1: error: (near initialization for 'g_trace2')
chip/stm32_usbhost.c: In function 'usbhost_trformat1':
chip/stm32_usbhost.c:235:3: warning: implicit declaration of function 'TRACE1_INDEX' [-Wimplicit-function-declaration]
int ndx = TRACE1_INDEX(id);
^
chip/stm32_usbhost.c: In function 'usbhost_trformat2':
chip/stm32_usbhost.c:247:3: warning: implicit declaration of function 'TRACE2_INDEX' [-Wimplicit-function-declaration]
int ndx = TRACE2_INDEX(id);
^
chip/stm32_usbhost.c: At top level:
chip/stm32_usbhost.c:80:43: warning: 'g_trace1' defined but not used [-Wunused-variable]
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
^
chip/stm32_usbhost.c:150:43: warning: 'g_trace2' defined but not used [-Wunused-variable]
static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
^
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-03-01 12:14:48 UTC
Permalink
Where are you Wisdom? ;-)

What board are you using? What compiler? Could you tell us about your config?

You need to supply more information to get some good answer.

BR,

Alan
Post by ***@gmail.com [nuttx]
chip/stm32_usbhost.c:80:52: error: 'TRACE1_NSTRINGS' undeclared here (not in a function)
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
^
chip/stm32_usbhost.c:148:1: error: empty scalar initializer
};
^
chip/stm32_usbhost.c:148:1: error: (near initialization for 'g_trace1')
chip/stm32_usbhost.c:150:52: error: 'TRACE2_NSTRINGS' undeclared here (not in a function)
static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
^
chip/stm32_usbhost.c:210:1: error: empty scalar initializer
};
^
chip/stm32_usbhost.c:210:1: error: (near initialization for 'g_trace2')
chip/stm32_usbhost.c:235:3: warning: implicit declaration of function
'TRACE1_INDEX' [-Wimplicit-function-declaration]
int ndx = TRACE1_INDEX(id);
^
chip/stm32_usbhost.c:247:3: warning: implicit declaration of function
'TRACE2_INDEX' [-Wimplicit-function-declaration]
int ndx = TRACE2_INDEX(id);
^
chip/stm32_usbhost.c:80:43: warning: 'g_trace1' defined but not used [-Wunused-variable]
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
^
chip/stm32_usbhost.c:150:43: warning: 'g_trace2' defined but not used [-Wunused-variable]
static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
^
郑欢欢 wisdom9285@gmail.com [nuttx]
2017-03-01 15:09:31 UTC
Permalink
I use stm32f103-minimum board,gcc compiler,I want to use usb composite connect to computer. I am from Vietnam.
Error report:
make[1]: Entering directory '/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
from usbdev/composite.c:55:
usbdev/cdcacm.h:68:4: warning: #warning "CONFIG_COMPOSITE_IAD may be needed" [-Wcpp]
# warning "CONFIG_COMPOSITE_IAD may be needed"
In file included from usbdev/composite.c:55:0:
usbdev/composite.h:191:4: error: #error "Insufficient members of the composite defined"
# error "Insufficient members of the composite defined"
usbdev/composite.h:200:49: warning: "DEV2_FIRSTINTERFACE" is not defined [-Wundef]
#if (DEV1_FIRSTINTERFACE + DEV1_NINTERFACES) != DEV2_FIRSTINTERFACE

usbdev/composite.h:201:4: warning: #warning "Interface numbers are not contiguous" [-Wcpp]
# warning "Interface numbers are not contiguous"

usbdev/composite.h:212:63: warning: "DEV2_NINTERFACES" is not defined [-Wundef]
#if !defined(CONFIG_COMPOSITE_IAD) && DEV1_NINTERFACES > 1 && DEV2_NINTERFACES > 1

usbdev/composite.h:230:5: warning: "DEV2_NCONFIGS" is not defined [-Wundef]
#if DEV2_NCONFIGS != 1 || DEV2_CONFIGID != 1

usbdev/composite.h:231:4: error: #error "DEV2: Only a single configuration is supported"
# error "DEV2: Only a single configuration is supported"
^
usbdev/composite.h:259:40: warning: "DEV2_STRIDBASE" is not defined [-Wundef]
#if (DEV1_STRIDBASE + DEV1_NSTRIDS) != DEV2_STRIDBASE

usbdev/composite.h:260:4: warning: #warning "String IDs are not contiguous" [-Wcpp]
# warning "String IDs are not contiguous"

usbdev/composite.c: In function 'composite_classsetup':
usbdev/composite.c:196:25: error: 'DEV2_FIRSTINTERFACE' undeclared (first use in this function)
else if (interface >= DEV2_FIRSTINTERFACE && interface < (DEV2_FIRSTINTERFACE + DEV2_NINTERFACES))

usbdev/composite.c:196:25: note: each undeclared identifier is reported only once for each function it appears in
usbdev/composite.c:196:83: error: 'DEV2_NINTERFACES' undeclared (first use in this function)
else if (interface >= DEV2_FIRSTINTERFACE && interface < (DEV2_FIRSTINTERFACE + DEV2_NINTERFACES))

In file included from usbdev/composite.c:55:0:
usbdev/composite.c: In function 'composite_bind':
usbdev/composite.h:218:72: error: 'DEV2_CFGDESCSIZE' undeclared (first use in this function)
#define COMPOSITE_CFGDESCSIZE (USB_SIZEOF_CFGDESC + DEV1_CFGDESCSIZE + DEV2_CFGDESCSIZE)

usbdev/composite.c:284:48: note: in expansion of macro 'COMPOSITE_CFGDESCSIZE'
priv->ctrlreq = composite_allocreq(dev->ep0, COMPOSITE_CFGDESCSIZE);

usbdev/composite.c: In function 'composite_setup':
usbdev/composite.c:500:5: warning: "DEV2_NSTRIDS" is not defined [-Wundef]
#if DEV2_NSTRIDS > 0

usbdev/composite.c: In function 'composite_initialize':
usbdev/composite.c:823:3: warning: implicit declaration of function 'DEV2_CLASSOBJECT' [-Wimplicit-function-declaration]
ret = DEV2_CLASSOBJECT(&priv->dev2);

usbdev/composite.c: In function 'composite_uninitialize':
usbdev/composite.c:886:3: warning: implicit declaration of function 'DEV2_UNINITIALIZE' [-Wimplicit-function-declaration]
DEV2_UNINITIALIZE(priv->dev2);

Makefile:124: recipe for target 'composite.o' failed
make[1]: *** [composite.o] Error 1
make[1]: Leaving directory '/home/nuttxspace/nuttxnew/nuttx/drivers'
LibTargets.mk:98: recipe for target 'drivers/libdrivers.a' failed

发自我的 iPhone
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Where are you Wisdom? ;-)
What board are you using? What compiler? Could you tell us about your config?
You need to supply more information to get some good answer.
BR,
Alan
Post by ***@gmail.com [nuttx]
chip/stm32_usbhost.c:80:52: error: 'TRACE1_NSTRINGS' undeclared here (not in
a function)
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
^
chip/stm32_usbhost.c:148:1: error: empty scalar initializer
};
^
chip/stm32_usbhost.c:148:1: error: (near initialization for 'g_trace1')
chip/stm32_usbhost.c:150:52: error: 'TRACE2_NSTRINGS' undeclared here (not
in a function)
static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
^
chip/stm32_usbhost.c:210:1: error: empty scalar initializer
};
^
chip/stm32_usbhost.c:210:1: error: (near initialization for 'g_trace2')
chip/stm32_usbhost.c:235:3: warning: implicit declaration of function
'TRACE1_INDEX' [-Wimplicit-function-declaration]
int ndx = TRACE1_INDEX(id);
^
chip/stm32_usbhost.c:247:3: warning: implicit declaration of function
'TRACE2_INDEX' [-Wimplicit-function-declaration]
int ndx = TRACE2_INDEX(id);
^
chip/stm32_usbhost.c:80:43: warning: 'g_trace1' defined but not used
[-Wunused-variable]
static const struct stm32_usbhost_trace_s g_trace1[TRACE1_NSTRINGS] =
^
chip/stm32_usbhost.c:150:43: warning: 'g_trace2' defined but not used
[-Wunused-variable]
static const struct stm32_usbhost_trace_s g_trace2[TRACE2_NSTRINGS] =
^
spudarnia@yahoo.com [nuttx]
2017-03-01 15:22:13 UTC
Permalink
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite connect to computer. I am from Vietnam.
make[1]: Entering directory '/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...




There is clearly some problem in your configuration file. I suggest that you compare your configuration with a verified configuration that supports the composite USB device. You can find a similar configuration with:


$ find configs -name defconfig | xargs grep COMPOSITE=y


And you can compare your configuration to one of these good configurations using the cmpconfig tool in the nuttx/tools directory.


Greg
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-03-02 11:24:16 UTC
Permalink
Hi Wisdom,

First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.

More info:
http://www.stm32duino.com/viewtopic.php?t=1631

You need to replace R10 with 1k5 Ohms resistor.

I will test your config here to see what is wrong.

BR,

Alan
Post by ***@yahoo.com [nuttx]
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory '/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest that
you compare your configuration with a verified configuration that supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-03-02 13:37:56 UTC
Permalink
Ok, I tested your configuration and found your error/misunderstood.

First, you want to use STM32F103-Minimum board as USB Host to
interface with HID device, ie.: keyboard, mouse.

It is not possible, because the STM32F103C8 is Performance Line MCU,
only STM32F1x Connectivity Line has USB Host support.

From datasheet:

2.3.20 - Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral
compatible with the
USB full-speed 12 Mbs.

Second issue:

You selected USB Composite, it means you want a single USB device (the
STM32F103-Minimum board in this case) working as two or more devices
at same time. Then you selected CDC/Modem as Composite but didn't
select USB MSC as Composite device, then it explains the error you are
facing, as Greg already noticed.

Now the really bad news: the USB Device is not working on STM32F103,
even after replacing the R10 with 1k5 Ohms resistor. I need to
investigate the issue, but when starting the board to computer I got
these errors:

[ 8349.065182] usb 3-4: new full-speed USB device number 24 using xhci_hcd
[ 8349.065379] usb 3-4: Device not responding to setup address.
[ 8349.269366] usb 3-4: Device not responding to setup address.
[ 8349.473179] usb 3-4: device not accepting address 24, error -71
[ 8349.585190] usb 3-4: new full-speed USB device number 25 using xhci_hcd
[ 8349.585387] usb 3-4: Device not responding to setup address.
[ 8349.789311] usb 3-4: Device not responding to setup address.
[ 8349.993208] usb 3-4: device not accepting address 25, error -71
[ 8350.105214] usb 3-4: new full-speed USB device number 26 using xhci_hcd
[ 8350.217276] usb 3-4: device descriptor read/64, error -71
[ 8350.433169] usb 3-4: device descriptor read/64, error -71

I tried all these tips
https://ubuntuforums.org/showthread.php?t=797789 but nothing worked,
then I think the issue is in the USB device initialization in the
NuttX side.

So, if you want to use NuttX as USB Host HID you need to use other
board, like I did in 2011 (wow 6 years ago!) when used NuttX in the
project of my master degree dissertation:



At that time I was running NuttX in the mbed board LPC1768. Today we
have more options of boards with support to USB Host on NuttX.

I hope it help you!

BR,

Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Wisdom,
First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.
http://www.stm32duino.com/viewtopic.php?t=1631
You need to replace R10 with 1k5 Ohms resistor.
I will test your config here to see what is wrong.
BR,
Alan
Post by ***@yahoo.com [nuttx]
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory '/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest that
you compare your configuration with a verified configuration that supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good
configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
郑欢欢 wisdom9285@gmail.com [nuttx]
2017-03-02 14:48:49 UTC
Permalink
Thanks,I use lpc1768 can usb hid with computer exchange data?

发自我的 iPhone
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Ok, I tested your configuration and found your error/misunderstood.
First, you want to use STM32F103-Minimum board as USB Host to
interface with HID device, ie.: keyboard, mouse.
It is not possible, because the STM32F103C8 is Performance Line MCU,
only STM32F1x Connectivity Line has USB Host support.
2.3.20 - Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral
compatible with the
USB full-speed 12 Mbs.
You selected USB Composite, it means you want a single USB device (the
STM32F103-Minimum board in this case) working as two or more devices
at same time. Then you selected CDC/Modem as Composite but didn't
select USB MSC as Composite device, then it explains the error you are
facing, as Greg already noticed.
Now the really bad news: the USB Device is not working on STM32F103,
even after replacing the R10 with 1k5 Ohms resistor. I need to
investigate the issue, but when starting the board to computer I got
[ 8349.065182] usb 3-4: new full-speed USB device number 24 using xhci_hcd
[ 8349.065379] usb 3-4: Device not responding to setup address.
[ 8349.269366] usb 3-4: Device not responding to setup address.
[ 8349.473179] usb 3-4: device not accepting address 24, error -71
[ 8349.585190] usb 3-4: new full-speed USB device number 25 using xhci_hcd
[ 8349.585387] usb 3-4: Device not responding to setup address.
[ 8349.789311] usb 3-4: Device not responding to setup address.
[ 8349.993208] usb 3-4: device not accepting address 25, error -71
[ 8350.105214] usb 3-4: new full-speed USB device number 26 using xhci_hcd
[ 8350.217276] usb 3-4: device descriptor read/64, error -71
[ 8350.433169] usb 3-4: device descriptor read/64, error -71
I tried all these tips
https://ubuntuforums.org/showthread.php?t=797789 but nothing worked,
then I think the issue is in the USB device initialization in the
NuttX side.
So, if you want to use NuttX as USB Host HID you need to use other
board, like I did in 2011 (wow 6 years ago!) when used NuttX in the
http://youtu.be/z_-RAFdQd0s
At that time I was running NuttX in the mbed board LPC1768. Today we
have more options of boards with support to USB Host on NuttX.
I hope it help you!
BR,
Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Wisdom,
First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.
http://www.stm32duino.com/viewtopic.php?t=1631
You need to replace R10 with 1k5 Ohms resistor.
I will test your config here to see what is wrong.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory '/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest
that
you compare your configuration with a verified configuration that supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good
configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-03-02 15:02:13 UTC
Permalink
I think you are messing some concepts...

If you want your board to communicate with the computer, then your
board will be USB Device, not USB Host as you wrote in the subject of
this email.

If this is the case (you want your board in the role of USB Device)
then you can use STM32F103-Minimum, I just submitted the patch and
confirmed it is working.

BR,

Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
Thanks,I use lpc1768 can usb hid with computer exchange data?
发自我的 iPhone
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Ok, I tested your configuration and found your error/misunderstood.
First, you want to use STM32F103-Minimum board as USB Host to
interface with HID device, ie.: keyboard, mouse.
It is not possible, because the STM32F103C8 is Performance Line MCU,
only STM32F1x Connectivity Line has USB Host support.
2.3.20 - Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral
compatible with the
USB full-speed 12 Mbs.
You selected USB Composite, it means you want a single USB device (the
STM32F103-Minimum board in this case) working as two or more devices
at same time. Then you selected CDC/Modem as Composite but didn't
select USB MSC as Composite device, then it explains the error you are
facing, as Greg already noticed.
Now the really bad news: the USB Device is not working on STM32F103,
even after replacing the R10 with 1k5 Ohms resistor. I need to
investigate the issue, but when starting the board to computer I got
[ 8349.065182] usb 3-4: new full-speed USB device number 24 using xhci_hcd
[ 8349.065379] usb 3-4: Device not responding to setup address.
[ 8349.269366] usb 3-4: Device not responding to setup address.
[ 8349.473179] usb 3-4: device not accepting address 24, error -71
[ 8349.585190] usb 3-4: new full-speed USB device number 25 using xhci_hcd
[ 8349.585387] usb 3-4: Device not responding to setup address.
[ 8349.789311] usb 3-4: Device not responding to setup address.
[ 8349.993208] usb 3-4: device not accepting address 25, error -71
[ 8350.105214] usb 3-4: new full-speed USB device number 26 using xhci_hcd
[ 8350.217276] usb 3-4: device descriptor read/64, error -71
[ 8350.433169] usb 3-4: device descriptor read/64, error -71
I tried all these tips
https://ubuntuforums.org/showthread.php?t=797789 but nothing worked,
then I think the issue is in the USB device initialization in the
NuttX side.
So, if you want to use NuttX as USB Host HID you need to use other
board, like I did in 2011 (wow 6 years ago!) when used NuttX in the
http://youtu.be/z_-RAFdQd0s
At that time I was running NuttX in the mbed board LPC1768. Today we
have more options of boards with support to USB Host on NuttX.
I hope it help you!
BR,
Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Wisdom,
First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.
http://www.stm32duino.com/viewtopic.php?t=1631
You need to replace R10 with 1k5 Ohms resistor.
I will test your config here to see what is wrong.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory
'/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest
that
you compare your configuration with a verified configuration that supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
郑欢欢 wisdom9285@gmail.com [nuttx]
2017-03-03 08:34:45 UTC
Permalink
Hi Alan, I patch your file,But Computer don't detect my board.How to do ?
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
I think you are messing some concepts...
If you want your board to communicate with the computer, then your
board will be USB Device, not USB Host as you wrote in the subject of
this email.
If this is the case (you want your board in the role of USB Device)
then you can use STM32F103-Minimum, I just submitted the patch and
confirmed it is working.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
Thanks,I use lpc1768 can usb hid with computer exchange data?
发自我的 iPhone
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Ok, I tested your configuration and found your error/misunderstood.
First, you want to use STM32F103-Minimum board as USB Host to
interface with HID device, ie.: keyboard, mouse.
It is not possible, because the STM32F103C8 is Performance Line MCU,
only STM32F1x Connectivity Line has USB Host support.
2.3.20 - Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral
compatible with the
USB full-speed 12 Mbs.
You selected USB Composite, it means you want a single USB device (the
STM32F103-Minimum board in this case) working as two or more devices
at same time. Then you selected CDC/Modem as Composite but didn't
select USB MSC as Composite device, then it explains the error you are
facing, as Greg already noticed.
Now the really bad news: the USB Device is not working on STM32F103,
even after replacing the R10 with 1k5 Ohms resistor. I need to
investigate the issue, but when starting the board to computer I got
[ 8349.065182] usb 3-4: new full-speed USB device number 24 using xhci_hcd
[ 8349.065379] usb 3-4: Device not responding to setup address.
[ 8349.269366] usb 3-4: Device not responding to setup address.
[ 8349.473179] usb 3-4: device not accepting address 24, error -71
[ 8349.585190] usb 3-4: new full-speed USB device number 25 using xhci_hcd
[ 8349.585387] usb 3-4: Device not responding to setup address.
[ 8349.789311] usb 3-4: Device not responding to setup address.
[ 8349.993208] usb 3-4: device not accepting address 25, error -71
[ 8350.105214] usb 3-4: new full-speed USB device number 26 using xhci_hcd
[ 8350.217276] usb 3-4: device descriptor read/64, error -71
[ 8350.433169] usb 3-4: device descriptor read/64, error -71
I tried all these tips
https://ubuntuforums.org/showthread.php?t=797789 but nothing worked,
then I think the issue is in the USB device initialization in the
NuttX side.
So, if you want to use NuttX as USB Host HID you need to use other
board, like I did in 2011 (wow 6 years ago!) when used NuttX in the
http://youtu.be/z_-RAFdQd0s
At that time I was running NuttX in the mbed board LPC1768. Today we
have more options of boards with support to USB Host on NuttX.
I hope it help you!
BR,
Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Wisdom,
First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.
http://www.stm32duino.com/viewtopic.php?t=1631
You need to replace R10 with 1k5 Ohms resistor.
I will test your config here to see what is wrong.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory
'/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest
that
you compare your configuration with a verified configuration that supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
Alan Carvalho de Assis acassis@gmail.com [nuttx]
2017-03-06 10:48:32 UTC
Permalink
Did you replace the resistor R10 in your board?

Currently this resistor is 10k ohms you need to replace it with 1k5 ohms.

BR,

Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
Hi Alan, I patch your file,But Computer don't detect my board.How to do ?
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
I think you are messing some concepts...
If you want your board to communicate with the computer, then your
board will be USB Device, not USB Host as you wrote in the subject of
this email.
If this is the case (you want your board in the role of USB Device)
then you can use STM32F103-Minimum, I just submitted the patch and
confirmed it is working.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
Thanks,I use lpc1768 can usb hid with computer exchange data?
发自我的 iPhone
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Ok, I tested your configuration and found your error/misunderstood.
First, you want to use STM32F103-Minimum board as USB Host to
interface with HID device, ie.: keyboard, mouse.
It is not possible, because the STM32F103C8 is Performance Line MCU,
only STM32F1x Connectivity Line has USB Host support.
2.3.20 - Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral
compatible with the
USB full-speed 12 Mbs.
You selected USB Composite, it means you want a single USB device (the
STM32F103-Minimum board in this case) working as two or more devices
at same time. Then you selected CDC/Modem as Composite but didn't
select USB MSC as Composite device, then it explains the error you are
facing, as Greg already noticed.
Now the really bad news: the USB Device is not working on STM32F103,
even after replacing the R10 with 1k5 Ohms resistor. I need to
investigate the issue, but when starting the board to computer I got
[ 8349.065182] usb 3-4: new full-speed USB device number 24 using xhci_hcd
[ 8349.065379] usb 3-4: Device not responding to setup address.
[ 8349.269366] usb 3-4: Device not responding to setup address.
[ 8349.473179] usb 3-4: device not accepting address 24, error -71
[ 8349.585190] usb 3-4: new full-speed USB device number 25 using xhci_hcd
[ 8349.585387] usb 3-4: Device not responding to setup address.
[ 8349.789311] usb 3-4: Device not responding to setup address.
[ 8349.993208] usb 3-4: device not accepting address 25, error -71
[ 8350.105214] usb 3-4: new full-speed USB device number 26 using xhci_hcd
[ 8350.217276] usb 3-4: device descriptor read/64, error -71
[ 8350.433169] usb 3-4: device descriptor read/64, error -71
I tried all these tips
https://ubuntuforums.org/showthread.php?t=797789 but nothing worked,
then I think the issue is in the USB device initialization in the
NuttX side.
So, if you want to use NuttX as USB Host HID you need to use other
board, like I did in 2011 (wow 6 years ago!) when used NuttX in the
http://youtu.be/z_-RAFdQd0s
At that time I was running NuttX in the mbed board LPC1768. Today we
have more options of boards with support to USB Host on NuttX.
I hope it help you!
BR,
Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Wisdom,
First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.
http://www.stm32duino.com/viewtopic.php?t=1631
You need to replace R10 with 1k5 Ohms resistor.
I will test your config here to see what is wrong.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory
'/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest
that
you compare your configuration with a verified configuration that supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
Eric Zheng wisdom9285@yahoo.com [nuttx]
2017-03-07 12:15:18 UTC
Permalink
Thanks
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Did you replace the resistor R10 in your board?
Currently this resistor is 10k ohms you need to replace it with 1k5 ohms.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
Hi Alan, I patch your file,But Computer don't detect my board.How to do ?
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
I think you are messing some concepts...
If you want your board to communicate with the computer, then your
board will be USB Device, not USB Host as you wrote in the subject of
this email.
If this is the case (you want your board in the role of USB Device)
then you can use STM32F103-Minimum, I just submitted the patch and
confirmed it is working.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
Thanks,I use lpc1768 can usb hid with computer exchange data?
发自我的 iPhone
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Ok, I tested your configuration and found your error/misunderstood.
First, you want to use STM32F103-Minimum board as USB Host to
interface with HID device, ie.: keyboard, mouse.
It is not possible, because the STM32F103C8 is Performance Line MCU,
only STM32F1x Connectivity Line has USB Host support.
2.3.20 - Universal serial bus (USB)
The STM32F103xx performance line embeds a USB device peripheral
compatible with the
USB full-speed 12 Mbs.
You selected USB Composite, it means you want a single USB device (the
STM32F103-Minimum board in this case) working as two or more devices
at same time. Then you selected CDC/Modem as Composite but didn't
select USB MSC as Composite device, then it explains the error you are
facing, as Greg already noticed.
Now the really bad news: the USB Device is not working on STM32F103,
even after replacing the R10 with 1k5 Ohms resistor. I need to
investigate the issue, but when starting the board to computer I got
[ 8349.065182] usb 3-4: new full-speed USB device number 24 using xhci_hcd
[ 8349.065379] usb 3-4: Device not responding to setup address.
[ 8349.269366] usb 3-4: Device not responding to setup address.
[ 8349.473179] usb 3-4: device not accepting address 24, error -71
[ 8349.585190] usb 3-4: new full-speed USB device number 25 using xhci_hcd
[ 8349.585387] usb 3-4: Device not responding to setup address.
[ 8349.789311] usb 3-4: Device not responding to setup address.
[ 8349.993208] usb 3-4: device not accepting address 25, error -71
[ 8350.105214] usb 3-4: new full-speed USB device number 26 using xhci_hcd
[ 8350.217276] usb 3-4: device descriptor read/64, error -71
[ 8350.433169] usb 3-4: device descriptor read/64, error -71
I tried all these tips
https://ubuntuforums.org/showthread.php?t=797789 but nothing worked,
then I think the issue is in the USB device initialization in the
NuttX side.
So, if you want to use NuttX as USB Host HID you need to use other
board, like I did in 2011 (wow 6 years ago!) when used NuttX in the
http://youtu.be/z_-RAFdQd0s
At that time I was running NuttX in the mbed board LPC1768. Today we
have more options of boards with support to USB Host on NuttX.
I hope it help you!
BR,
Alan
Post by Alan Carvalho de Assis ***@gmail.com [nuttx]
Hi Wisdom,
First, note that STM32F103-Minimum board will not work "out of the
box" as USB device because they used a 10k Ohms instead 1k5 Ohms in
the USB data pins.
http://www.stm32duino.com/viewtopic.php?t=1631
You need to replace R10 with 1k5 Ohms resistor.
I will test your config here to see what is wrong.
BR,
Alan
Post by 郑欢欢 ***@gmail.com [nuttx]
I use stm32f103-minimum board,gcc compiler,I want to use usb composite
connect to computer. I am from Vietnam.
make[1]: Entering directory
'/home/nuttxspace/nuttxnew/nuttx/drivers'
CC: usbdev/composite.c
In file included from usbdev/composite.h:55:0,
...
There is clearly some problem in your configuration file. I suggest
that
you compare your configuration with a verified configuration that
supports
$ find configs -name defconfig | xargs grep COMPOSITE=y
And you can compare your configuration to one of these good
configurations
using the cmpconfig tool in the nuttx/tools directory.
Greg
Continue reading on narkive:
Loading...