USB 3.0 and xHCI Host-Controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guys,



*************************************
Issue description
*************************************

I'm  having troubles for communication  between a  NXT - Lego Brick
device (http://www.lego.com/)  and a Notebook with USB 3.0.

I'm using a Java development SDK, to build apps and flash the Brick:
http://www.lejos.org

We are working with two very similar models of Notebooks:

a) Called Positivo-1: Has  3 USB 2.0 ports,
b) Called Positivo-2: Has  2 USB 2.0 and 1 USB 3.0 port.

The name of positivo comes from: (making a reference to the brand
name:http://www.positivobgh.com.ar/hogar/spa/productos/c-501)


On Postivo-1 all work fine, but on the Positivo-2 the communication
with the brick isn't working.


I did some tests, getting some treces, on a Notebook where all work
fine and on the other one.

Both notebook are running Ubuntu 12.04 with 64 bits.


Positivo-1, has 3 physical interfaces USB 2.0

Positivo-2, has 2 physical interfaces USB 2.0 y one USB 3.0

On Positivo-1, as it has USB 2.0, linux attach to this hardware the
driver "ehci-pci"

On Positivo-2, as it has one USB 3.0, linux attach to the 3 ports the
driver, "xhci_hcd".


On Positivo-1 all work, fine, I make a HelloWorld example,
following http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/FirstProgram.htm
Tutorial, and i could upload the app to the brick without any problem.

But on Positivo-2, I couldn't, because the upload procedure is hangup,
like is mentioned on the
http://www.lejos.org/forum/viewtopic.php?f=7&t=4307&hilit=linux Topic.



Making a research to try find out, what is the problem, i added printf
to the library JNI code, which is used to send/receive message to/from
the Brick. I modified the file: main_jlibnxt.c.

With these printf I can see what messages are sent, when the PC try to
open the communication with the BRICK and what is the response.

I created two traces files during uploading a HelloWorld app, once for
Positivo-1 and other one on Positivo-2 (USB 3.0)

Here is the JNI code i modified,  and whole traces,
https://github.com/gusDuarte/enchanting-usb3



*************************************
Traces
*************************************


POSITIVO-1:
=========

Found NXT: NXT 001653105DC5
********* starting FIND ...
** Created dev(139821856403248), addr: USB0::0x0694::0x0002::001653105DC5::RAW
********* ending FIND ...

start OPEN ================
** Created dev(139821856403248), addr: USB0::0x0694::0x0002::001653105DC5::RAW
end OPEN ===================

SEND> 01:9B:12:D0:2A:7F:00:00
READ< 02:9B:00:4E:58:54:00:00

start OPEN ================
** Created dev(139821856403248), addr: USB0::0x0694::0x0002::001653105DC5::RAW
end OPEN ===================

SEND> 01:FF:00:00:00:00:00:00
READ< 02:FF:FD:00:00:00:00:00

SEND> 01:81:48:65:6C:6C:6F:57
READ< 02:81:00:00:00:00:00:00
.
.
more messages
.
.




POSITIVO-2:
=========

Found NXT: NXT 001653105DC5
********* starting FIND ...
** Created dev(139675089352512), addr: USB0::0x0694::0x0002::001653105DC5::RAW
********* ending FIND ...

start OPEN ================
** Created dev(139675089352512), addr: USB0::0x0694::0x0002::001653105DC5::RAW
end OPEN ===================

SEND> 01:9B:15:A4:08:7F:00:00
READ< 02:9B:00:4E:58:54:00:00

start OPEN ================
** Created dev(139675089352512), addr: USB0::0x0694::0x0002::001653105DC5::RAW
end OPEN ===================


SEND> 01:FF:00:00:00:00:00:00
READ< invalid data len: -110

Here the communication hangs.





*************************************
Notebooks System information
*************************************

PC POSITIVO-1
=============

Kernel version:

$ uname -r
3.8.0-33-generic

Libusb:
ceibal@ceibal:~$ dpkg -l | grep libusb

ii  libusb-0.1-4                                  2:0.1.12-20
                         userspace USB programming library
ii  libusb-1.0-0                                  2:1.0.9~rc3-2ubuntu1
                  userspace USB programming library
ic  libusb-1.0-0:i386                         2:1.0.9~rc3-2ubuntu1
              userspace USB programming library
ii  libusb-dev                                    2:0.1.12-20
                         userspace USB programming library development
files
ii  libusbmuxd1




$ lsusb

Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 04f2:b340 Chicony Electronics Co., Ltd


$lspci -vvv

00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset
Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])
Subsystem: CLEVO/KAPOK Computer Device 3110
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f7f08000 (32-bit, non-prefetchable) [size=1K]
Capabilities: <access denied>
Kernel driver in use: ehci-pci



PC POSITIVO-2
============
kernel version:

$ uname -r
3.13.0-36-generic

Libusb:
dpkg -l | grep libusb

ii  libusb-0.1-4                            2:0.1.12-20
             userspace USB programming library
ii  libusb-0.1-4:i386                    2:0.1.12-20
          userspace USB programming library
ii  libusb-1.0-0                            2:1.0.9~rc3-2ubuntu1
      userspace USB programming library
ic  libusb-1.0-0:i386                   2:1.0.9~rc3-2ubuntu1
  userspace USB programming library
ii  libusb-dev                              2:0.1.12-20
             userspace USB programming library development files
ii  libusbmuxd1                          1.0.7-2ubuntu0.1
       USB multiplexor daemon for iPhone and iPod Touch devices -
library




$ lsusb

Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 5986:024b Acer, Inc


$lspci -vvv

00:14.0 USB controller: Intel Corporation ValleyView USB xHCI Host
Controller (rev 0e) (prog-if 30 [XHCI])
Subsystem: CLEVO/KAPOK Computer Device 5471
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 103
Region 0: Memory at d0800000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd




*************************************
Questions
*************************************

1) Do you think this issue could be caused by kernel/xhci_hcd module ?

2) I know that without the brick device, replicate this tests for you
isn't possible.

So i would like to ask you, a guide to debug this problem, what kind
of things I can do to try find out, the problem.



Thanks in advance.

Gustavo.
--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux