ericbruggema
Posts: 4
Joined: Wed Jan 01, 2014 5:08 pm
Location: The World
Contact: Website

Re: USB redux

Sun Feb 09, 2014 11:23 pm

wat is tp1,2? the amps?
Its better to start a project for the 10th time then stop after the first fail!!!!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23065
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB redux

Mon Feb 10, 2014 9:00 am

ericbruggema wrote:wat is tp1,2? the amps?
Check the voltage (also, google for this because I may have the test point numbers wrong!). If it drops much below 4.7 or so, then you have a power problem.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1421
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Mon Feb 10, 2014 9:27 am

Since you've got WiFi and Logitech keyboard then it's likely to be a power issue. Try using a powered USB hub for the WiFi / keyboard

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

rspitz
Posts: 58
Joined: Tue Jul 31, 2012 7:25 pm

Re: USB redux

Thu Feb 20, 2014 4:42 pm

Hi gsh and other USB experts,

is the USB interface on the Pi still being acitvely worked on, or have improvements come to an end?

I have one of the old 256MB type B Pis and am still experiencing hangs on the USB port with a DVB-C stick attached to an active 7-port hub ("Manhattan" also sold by Adafruit), see several postings I have made in this and the old "elephant" thread about this issue. Before I move on to other hardware (Beaglebone comes to mind), is there a chance that I might see an improvement with one of the currently sold 512 MB Pis?

I know I could just order one from the "big river" and send it back if it doesn't work better, but if you say that there is no difference in the USB interface between the 256 and 512 models, I might as well save myself the hassle.

Regards, Richard

de-shu
Posts: 6
Joined: Sat Jan 04, 2014 5:27 pm

Re: USB redux

Thu Feb 20, 2014 7:42 pm

Hi rspitz,

I hope I won't be banned for recommending a Cubieboard as a RPI replacement for USB intensive applications, this is what I moved to for my project.

Aydan
Posts: 676
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: USB redux

Thu Feb 20, 2014 9:14 pm

rspitz wrote:Hi gsh and other USB experts,

is the USB interface on the Pi still being acitvely worked on, or have improvements come to an end?

I have one of the old 256MB type B Pis and am still experiencing hangs on the USB port with a DVB-C stick attached to an active 7-port hub ("Manhattan" also sold by Adafruit), see several postings I have made in this and the old "elephant" thread about this issue. Before I move on to other hardware (Beaglebone comes to mind), is there a chance that I might see an improvement with one of the currently sold 512 MB Pis?

I know I could just order one from the "big river" and send it back if it doesn't work better, but if you say that there is no difference in the USB interface between the 256 and 512 models, I might as well save myself the hassle.

Regards, Richard
The SoC is exactly the same, just the RAM chip is different. For your problem the revision of the Pi makes no difference.
Schould you want to try the Beaglebone, you have to be aware that it currently (at least as of a couple of months ago) does not support USB hot plug.

Regards
Aydan

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: USB redux

Thu Feb 20, 2014 9:24 pm

de-shu wrote:Hi rspitz,

I hope I won't be banned for recommending a Cubieboard as a RPI replacement for USB intensive applications, this is what I moved to for my project.
:lol: relax we're not Nazi's over here. While we think *extremely* highly of the Raspberry Pi, we also recognize that it's not the solution for every application. Would we get upset if you trounced across the forum shouting that the Pi sucks and the cubbieboard is infinitely superior in every way? You bet we would (I mean talk about rude! :shock: ), but suggesting that in a specific application another board might be a better choice? Nah, we encourage *meaningful* or *thoughtful* dialog.

Case in point, I wouldn't give up on the USB yet. To the best of my knowledge it is still being worked on. Unfortunately, I am not part of the USB fix team so I can't help rspitz out, but one of the project members will probably stop by sooner or later and ask for things like log files and whatnot.
Dear forum: Play nice ;-)

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1421
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Fri Feb 21, 2014 5:26 pm

There should be a new sparkling release of the USB drivers in the next week, watch out for the changes in rpi-update BRANCH=next
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5282
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB redux

Fri Feb 21, 2014 10:01 pm

gsh wrote:There should be a new sparkling release of the USB drivers in the next week, watch out for the changes in rpi-update BRANCH=next
For testers and people with USB devices that aren't working well, you could try:

Code: Select all

sudo BRANCH=next rpi-update
From jdb:
I'm in the beta stage for the usb rewrite. Most stuff works, the only
thing not yet implemented is high-speed isochronous. See the commit
message for known rough edges.

You will need to set the following in cmdline.txt:
dwc_otg.fiq_enable=1
dwc_otg.fiq_fsm_enable=1
dwc_otg.fiq_fsm_mask=0x3
This is the commit:
https://github.com/raspberrypi/linux/co ... 5df9585550

(you'll see there's a lot of work that Jonathan's been doing)

Be aware this is beta code so there could be issues, but it seemed to be working well for me.

EDIT: more information from jdb here:
http://www.raspberrypi.org/phpBB3/viewt ... 66#p510566

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Sun Feb 23, 2014 8:39 am

Thanks for all the work on improving USB. As noted elsewhere (http://www.raspberrypi.org/forum/viewto ... m3#p502975) I'm trying to get a Concept 2 PM3 rowing monitor working with the Pi. To date I have had to set dwc_otg.fiq_split_enable=0 to enable multiple calls per second to work. I hoped that the new fix may remedy that but sadly it doesn't. After applying the beta I now get no response at all from the PM3, I can send it commands but seem to get no returned message. Are there some log files I can capture that would be useful?

Thanks again,

Chris

Code: Select all

[email protected] ~/pyrow $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 413c:2107 Dell Computer Corp.
Bus 001 Device 005: ID 17a4:0001 Concept2 Performance Monitor 3
[email protected] ~/pyrow $
cmdline.txt

Code: Select all

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 elevator=deadline rootwait dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x3

Code: Select all

Linux trailpi 3.10.30+ #644 PREEMPT Fri Feb 21 18:44:33 GMT 2014 armv6l GNU/Linux

Code: Select all

Bus 001 Device 005: ID 17a4:0001 Concept2 Performance Monitor 3
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x17a4 Concept2
  idProduct          0x0001 Performance Monitor 3
  bcdDevice            1.11
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     114
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               2
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

User avatar
Paul Webster
Posts: 797
Joined: Sat Jul 30, 2011 4:49 am
Location: London, UK
Contact: Twitter

Re: USB redux

Sun Feb 23, 2014 9:50 am

Chris_Reynolds wrote:To date I have had to set dwc_otg.fiq_split_enable=0 to enable multiple calls per second to work. I hoped that the new fix may remedy that but sadly it doesn't.
I think that this is a known limitation for now.
The last line in the comments in the changelog are:
- Setting dwc_otg.fiq_enable=0 causes interrupt handling to break.

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Sun Feb 23, 2014 10:07 am

Thanks Paul, I did see that. What I was hoping was the new fix would do away with the need to set fiq_split_enable=0 so I removed it from my cmdline.txt and added the new options.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1421
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Mon Feb 24, 2014 7:04 am

Can you also do

dmesg | grep fiq

Just to check that the branch is working correctly...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Mon Feb 24, 2014 9:57 am

Thanks Gordon, courtesy of my wife kindly learning how to start a putty session under telephone instruction:

Code: Select all

[email protected] ~/pyrow $ dmesg | grep fiq
[    0.000000] Kernel command line: dma.dmachans=0x7f35 
bcm2708_fb.fbwidth=1232 bcm2708_fb.fbheight=992 bcm2708.boardrev=0x2 
bcm2708.serial=0x9744ea98 smsc95xx.macaddr=B8:27:EB:44:EA:98 
sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0xec00000 
vc_mem.mem_size=0x10000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 
kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p6 rootfstype=ext4 
elevator=deadline rootwait dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 
dwc_otg.fiq_fsm_mask=0x3
[email protected] ~/pyrow $
Chris

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1421
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Mon Feb 24, 2014 10:01 am

Chris,

Sorry my fault, you need to do dmesg | grep FIQ

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Mon Feb 24, 2014 10:13 am

No problem, she's nipped out shopping so they may be a short delay (note to self, open firewall port to sort out remote access to Pi)

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Mon Feb 24, 2014 12:23 pm

with FIQ this time :

Cheers

Chris

Code: Select all

[email protected] ~/pyrow $ dmesg | grep FIQ
[    1.840184] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt 
= 0xc7414000 dma = 0x47414000 len=9024
[    1.850269] FIQ FSM acceleration enabled for :
[    1.863175] WARN::hcd_init:474: FIQ at 0xc02f1d10
[    1.868035] WARN::hcd_init:475: FIQ ASM at 0xc02f1f8c length 36
[    1.993567] dwc_otg: FIQ enabled
[    1.993598] dwc_otg: FIQ split-transaction FSM enabled
[email protected] ~/pyrow $

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2030
Joined: Thu Jul 11, 2013 2:37 pm

Re: USB redux

Mon Feb 24, 2014 12:30 pm

Thanks for the testing.

If you compare results with the two cmdline.txt settings dwc_otg.fiq_fsm_mask=0x3 and dwc_otg.fiq_fsm_mask=0x1, do things start working?
Rockets are loud.
https://astro-pi.org

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Tue Feb 25, 2014 8:07 am

I've had a go and things are a little better but still not as good as with the old driver and fiq_split_enable=0. I appreciate the following dump isn't going to be the greatest help but what I see is a number of successful write/read attempts to the PM3 followed by timeouts. With the mask set to 0x3 I was getting no response at all, with fiq_split_enable=0 I could run fairly indefinitely with only a very rare timeout.
Thanks
Chris

Code: Select all

Linux trailpi 3.10.30+ #644 PREEMPT Fri Feb 21 18:44:33 GMT 2014 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Feb 23 13:36:03 2014
cd [email protected] ~ $ cd pyrow/
[email protected] ~/pyrow $ sudo python test.py
Connected to erg.
[4, 241, 145, 148, 112, 1, 0, 116, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129], 'CSAFE_GETCAPS_CMD': [120, 120, 50], 'CSAFE_GETSERIAL_CMD': ['200035475'], 'CSAFE_GETVERSION_CMD': [22, 2, 3, 411, 108]}
{'mininterframe': 50, 'status': 1, 'maxtx': 120, 'cid': 2, 'swversion': 108, 'mfgid': 22, 'maxrx': 120, 'model': 3, 'hwversion': 411, 'serial': '200035475'}
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
exception
Traceback (most recent call last):
  File "test.py", line 31, in <module>
    cstate = results['CSAFE_GETSTATUS_CMD'][0] & 0xF
TypeError: list indices must be integers, not str
[email protected] ~/pyrow $ sudo python test.py
DEBUG: usb kernel driver not on linux2
Connected to erg.
[4, 241, 145, 148, 112, 1, 0, 116, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1], 'CSAFE_GETCAPS_CMD': [120, 120, 50], 'CSAFE_GETSERIAL_CMD': ['200035475'], 'CSAFE_GETVERSION_CMD': [22, 2, 3, 411, 108]}
{'mininterframe': 50, 'status': 1, 'maxtx': 120, 'cid': 2, 'swversion': 108, 'mfgid': 22, 'maxrx': 120, 'model': 3, 'hwversion': 411, 'serial': '200035475'}
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Traceback (most recent call last):
  File "test.py", line 30, in <module>
    results = erg.send(command)
  File "/home/pi/pyrow/pyrow.py", line 239, in send
    length = this.erg.write(outEndpoint, csafe) #sends message to erg and records length of message
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 633, in write
    self.__get_timeout(timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 789, in intr_write
    timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 872, in __write
    _check(retval)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 571, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out
[email protected] ~/pyrow $ sudo python test.py
DEBUG: usb kernel driver not on linux2
Connected to erg.
[4, 241, 145, 148, 112, 1, 0, 116, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129], 'CSAFE_GETCAPS_CMD': [120, 120, 50], 'CSAFE_GETSERIAL_CMD': ['200035475'], 'CSAFE_GETVERSION_CMD': [22, 2, 3, 411, 108]}
{'mininterframe': 50, 'status': 1, 'maxtx': 120, 'cid': 2, 'swversion': 108, 'mfgid': 22, 'maxrx': 120, 'model': 3, 'hwversion': 411, 'serial': '200035475'}
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129]}
State 1: Ready
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
exception
Traceback (most recent call last):
  File "test.py", line 31, in <module>
    cstate = results['CSAFE_GETSTATUS_CMD'][0] & 0xF
TypeError: list indices must be integers, not str
[email protected] ~/pyrow $ sudo python test.py
DEBUG: usb kernel driver not on linux2
Connected to erg.
[4, 241, 145, 148, 112, 1, 0, 116, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [129], 'CSAFE_GETCAPS_CMD': [120, 120, 50], 'CSAFE_GETSERIAL_CMD': ['200035475'], 'CSAFE_GETVERSION_CMD': [22, 2, 3, 411, 108]}
{'mininterframe': 50, 'status': 1, 'maxtx': 120, 'cid': 2, 'swversion': 108, 'mfgid': 22, 'maxrx': 120, 'model': 3, 'hwversion': 411, 'serial': '200035475'}
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Traceback (most recent call last):
  File "test.py", line 30, in <module>
    results = erg.send(command)
  File "/home/pi/pyrow/pyrow.py", line 239, in send
    length = this.erg.write(outEndpoint, csafe) #sends message to erg and records length of message
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 633, in write
    self.__get_timeout(timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 789, in intr_write
    timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 872, in __write
    _check(retval)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 571, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out
[email protected] ~/pyrow $ sudo python test.py
DEBUG: usb kernel driver not on linux2
Connected to erg.
[4, 241, 145, 148, 112, 1, 0, 116, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1], 'CSAFE_GETCAPS_CMD': [120, 120, 50], 'CSAFE_GETSERIAL_CMD': ['200035475'], 'CSAFE_GETVERSION_CMD': [22, 2, 3, 411, 108]}
{'mininterframe': 50, 'status': 1, 'maxtx': 120, 'cid': 2, 'swversion': 108, 'mfgid': 22, 'maxrx': 120, 'model': 3, 'hwversion': 411, 'serial': '200035475'}
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
exception
Traceback (most recent call last):
  File "test.py", line 31, in <module>
    cstate = results['CSAFE_GETSTATUS_CMD'][0] & 0xF
TypeError: list indices must be integers, not str
[email protected] ~/pyrow $ sudo python test.py
DEBUG: usb kernel driver not on linux2
Connected to erg.
[4, 241, 145, 148, 112, 1, 0, 116, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
{'CSAFE_GETSTATUS_CMD': [1], 'CSAFE_GETCAPS_CMD': [120, 120, 50], 'CSAFE_GETSERIAL_CMD': ['200035475'], 'CSAFE_GETVERSION_CMD': [22, 2, 3, 411, 108]}
{'mininterframe': 50, 'status': 1, 'maxtx': 120, 'cid': 2, 'swversion': 108, 'mfgid': 22, 'maxrx': 120, 'model': 3, 'hwversion': 411, 'serial': '200035475'}
[1, 241, 128, 128, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Traceback (most recent call last):
  File "test.py", line 30, in <module>
    results = erg.send(command)
  File "/home/pi/pyrow/pyrow.py", line 239, in send
    length = this.erg.write(outEndpoint, csafe) #sends message to erg and records length of message
  File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 633, in write
    self.__get_timeout(timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 789, in intr_write
    timeout)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 872, in __write
    _check(retval)
  File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 571, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out
[email protected] ~/pyrow $

KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

Re: USB redux

Tue Feb 25, 2014 9:14 am

Always on the look out for uses for a Raspberry Pi and with the recent Earthquake in the Bristol Channel decided to read up about the BOINC project Quake Catcher Network see http://qcn.stanford.edu/ But seems people have given up on using the Raspberry Pi because of USB problems, too many Reset's.
Now as they give out free sensors to people who live in high risk area's I was wondering if the Foundation contacted them they could be persuaded to loan/donate a sensor(s) ( There are several types ) to help with getting it working reliably with a Raspberry Pi

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Tue Feb 25, 2014 9:37 am

That does look quite a neat use for the Pi and it'd be interesting to see if it would work with the Pi.

I think 'given up' may be a bit harsh on the Pi's USB support. The USB driver is pretty good now and all of my peripherals have worked with the exception of the PM3 which is a bit of an odd device. This new release will hopefully reduce again the number of devices that have issues.

I'm off to persuade my son's school they need an earthquake sensor!

KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

Re: USB redux

Tue Feb 25, 2014 7:00 pm

I think 'given up' may be a bit harsh on the Pi's USB support.
By given up I was referring to comments made in QCN forums by people trying to make the QCN sensors work with the Pi. It would indeed be interesting to know if they would have more success with the latest fixes, that is why I was suggesting that the Foundation should make contact with the folks at Stanford to try and get a free sensor for the USB support team to try. Maybe somebody able to report success would get others to try again.

Chris_Reynolds
Posts: 72
Joined: Mon May 14, 2012 7:25 am

Re: USB redux

Tue Feb 25, 2014 7:25 pm

Sorry Keith, hadn't seen that there was already experience of failure - consider comments retracted, I was overly sensitive to the fact that my (tiny) USB problems might be contributing to a RaspPi+USB=broken misunderstanding.

From a skim read of their forums it seems like there are a few people having a damn good go with the Pi. Some of the comments are relating to high CPU usage running the GUI tool which might be interesting to dig into as well as the USB issues.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23065
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB redux

Tue Feb 25, 2014 7:37 pm

High CPU usage in the tool is almost certainly sloppy programming in the tool itself. As for USB issues, it would indeed be interesting to see how they get on with the latest code.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2030
Joined: Thu Jul 11, 2013 2:37 pm

Re: USB redux

Tue Feb 25, 2014 8:03 pm

KeithSloan wrote:
By given up I was referring to comments made in QCN forums by people trying to make the QCN sensors work with the Pi. It would indeed be interesting to know if they would have more success with the latest fixes, that is why I was suggesting that the Foundation should make contact with the folks at Stanford to try and get a free sensor for the USB support team to try. Maybe somebody able to report success would get others to try again.
What's a QCN sensor?
Rockets are loud.
https://astro-pi.org

Return to “Troubleshooting”