USB - the Elephant in our Room


 
803 posts   Page 29 of 33   1 ... 26, 27, 28, 29, 30, 31, 32, 33
by pygmy_giant » Sun Nov 04, 2012 4:28 pm
I dont know but I get the impression that a number of Broadcom employees are giving up their time to assist the Foundation in a voluntary capacity - which is appreciated.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by jamesh » Sun Nov 04, 2012 4:30 pm
Actually, the person working on it works for Broadcom...but he is working on this mostly in his spare time. Broadcom (at least the Cambridge office) are very busy on rather more urgent tasks at the moment. Note that this particular use case is only used by the Raspi at the moment, so to Broadcom is pretty low on the priority list.

Oh, and the specific issue now determined was discovered more recently than 6 months I beleive - quite a few USB issues have been fixed in that time - this appears to be one of the last remaining ones. As each issue has been fixed, another less frequent issues is uncovered - pretty standard bug fixing!
Soon to be unemployed software engineer currently specialising in camera drivers and frameworks, but can put mind to most embedded tasks. Got a job in N.Cambridge or surroundings? I'm interested!
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11572
Joined: Sat Jul 30, 2011 7:41 pm
by mic34 » Sun Nov 04, 2012 4:44 pm
The 6 month old bug report I mentioned at https://github.com/raspberrypi/firmware/issues/19 is entitled "usb packet loss", isn't this still the current problem?

Anyway, I guess that "mostly in his spare time" means no deadline, and no guarantee that the problem will ever be solved.
Posts: 8
Joined: Sun Oct 07, 2012 8:53 am
by pygmy_giant » Sun Nov 04, 2012 4:48 pm
Debugging isn't the same as walking to the shops.

There is no way of predicting how long it will take.

I can think of a number of projects that wouldnt work a couple of months ago that now work due to implimented fixes, so I personally believe this will be fully fixed in time.

When?

Nobody knows.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by itimpi » Sun Nov 04, 2012 5:21 pm
mic34 wrote:
Kemp wrote: From reading the rest of this thread, it appears that Broadcom have no interest in fixing their problems and the foundation doesn't have the manpower to give you a deadline. As always, if anyone is willing to help they will gladly accept it...


It has been said that Gordon is a Broadcom employee, so surely they must have given him a deadline for this task?

I thing he works on this in hist spare time, so if that is the case is unlikely to have been given a deadline. In fact if that is the case deadlines at work will impact negatively as they may reduce the free time available to work on this.

Regardless, deadlines are meaningless if one does not know exactly what the final solution is going to look like, and therefore the effort involved in getting there. At best one can make a guess for open-ended problems of this sort/
Posts: 1033
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
by MaxK1 » Sun Nov 04, 2012 7:22 pm
Sandgrounder wrote:OK - sorry. I should have added more details.

The build is the Rasbian build as supplied by Farnell two weeks ago ....
.... but I have run apt-get update and apt-get upgrade a number of times including today.

It is the Pi which crashes when the file is partly transfered. There is room on both sticks. I tried it on two Pis - both 512M from Farnel two weeks ago.

Since my last post, I have thought of a work around, which is to use raspi-config to extend the root partition to the full 16Gbyte avalable on the CD card and to FTP the file to that. (worked first time). I can also copy the 2Gbyte file from the SD card to the USB memory sticks with no problems. It is when I try to use the wired Network and the USB stick at the same time that Raspbian falls over.

I will leave you alone to discuss the USB problem, unless you want to tell me where I might find any log information. I can not see anyting in /var/log/messages but I am not sure what to look for.


I have not been able to reproduce this problem between Raspbian and a Ubuntu system. (No XP system at the moment) 2+Gig file back and forth several times on a wired network, diffed each time with and without X.

Pi overclocked at 1.1+ GHz, original, un-modified board... Tried a smaller file on the wireless network for the hell of it as well.... So, what other differences? I run from an external HDD, not the SD card, 2A supply on the GPIO header, PS also powers a 4-port hub with kbd/mouse, WiFi and a 4G USB stick.
I can't think what else to try, except put an XP system back together and run the same test over and over.... or until something breaks.

At least I have last weeks back-up moved to 2 different places now :-)
Posts: 468
Joined: Sun Aug 26, 2012 11:34 pm
by thradtke » Sun Nov 04, 2012 8:36 pm
MaxK1 wrote:So, what other differences?

If you eliminate the impossible, whatever remains, however improbable, must be the truth: The Pi itself is the killer.

;-)
Full-time noob forever.
Posts: 431
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL
by MaxK1 » Sun Nov 04, 2012 8:56 pm
thradtke wrote:
MaxK1 wrote:So, what other differences?

If you eliminate the impossible, whatever remains, however improbable, must be the truth: The Pi itself is the killer.

;-)


Heh :-) It is a killer little board... I have 3rd Pi coming in a few weeks. Hope there isn't a duff batch of 512M boards out there...
Posts: 468
Joined: Sun Aug 26, 2012 11:34 pm
by gsh » Sun Nov 04, 2012 10:08 pm
@MakK1

Do you get the same problem when not overclocking it ?

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 763
Joined: Sat Sep 10, 2011 11:43 am
by MaxK1 » Sun Nov 04, 2012 10:13 pm
Sandgrounder had the ftp problem - I haven't been able to reproduce it, but I normally use a wireless connection so I _suppose_ I might see if I switched....
Posts: 468
Joined: Sun Aug 26, 2012 11:34 pm
by MorePiPlease » Mon Nov 05, 2012 2:06 pm
This thread is quite long and I have read most of it. I am glad you all were hacking your RPi last night, just as i was. I had an extreme bit of difficulty with my RPi using Motion and a QC usb webcam. I thought for hours it was my configuration. Finally it dawned on me that it was a performance issue.

I was running it headless, with just SSH and I had a usb thumbdrive plugged into my RPi and the QC.

The odd bit was, of course, that the CPU was barely being taxed. Motion would just stop working. It might work for a few moments if I restarted the RPi or stopped and started Motion.

Then i tried turning off the video and leaving just snapshots and it worked much better but still would crash after a while.

Is an interrupt problem or perhaps a buffer problem? I am going to try unplugging the USB thumb drive tonight to see if that helps.
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by abishur » Mon Nov 05, 2012 2:46 pm
MorePiPlease wrote:This thread is quite long and I have read most of it. I am glad you all were hacking your RPi last night, just as i was. I had an extreme bit of difficulty with my RPi using Motion and a QC usb webcam. I thought for hours it was my configuration. Finally it dawned on me that it was a performance issue.

I was running it headless, with just SSH and I had a usb thumbdrive plugged into my RPi and the QC.

The odd bit was, of course, that the CPU was barely being taxed. Motion would just stop working. It might work for a few moments if I restarted the RPi or stopped and started Motion.

Then i tried turning off the video and leaving just snapshots and it worked much better but still would crash after a while.

Is an interrupt problem or perhaps a buffer problem? I am going to try unplugging the USB thumb drive tonight to see if that helps.


Were you actually writing the stuff to the USB drive (or was it in fairly consistent operation?) Seeing as how the USB and Ethernet both share a single USB 2.0 port on the SoC, it's possible that the bandwidth is maxing out (amongst a hundred other possibilities :-P)
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4268
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by MorePiPlease » Mon Nov 05, 2012 5:03 pm
Honestly I did so much troubleshooting in last night's session I need to go back and look at what worked and what did not.

Tonight I will try no usb thumb drive and just snapshots (no video) writing to the SD card. If that works, I'll add video back into the equation.

in this google tech talk the USB challenges the RPi is facing are mentioned...

http://www.youtube.com/watch?feature=pl ... 8PLl8nGXmw

I showed this video to my students and each one of them was very pumped up to learn more about the RPi.
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by davidmam » Mon Nov 05, 2012 6:35 pm
I have ben suffering the same sort of USB issues. I'm attempting to capture data from an Arexx tl-500 data logger and, via some custom code goodness, combine the data with some one-wire net data and upload to COSM. After a while the USB decides to drop off the system rendering it inaccessibe via network (wired or wireless)

There appear to be no error mesages - the Pi continues to run but cannot see the network.

Is there a way to progammatically re-initialise USB in the kernel or has it just tied the chips in knots? I could set a monitor script that ould check for errors and reboot but that seems a trifle excessive.

Same symptoms on a rev A and a rev 2 (512M) board.
Posts: 98
Joined: Tue Dec 06, 2011 4:13 pm
by MorePiPlease » Mon Nov 05, 2012 9:26 pm
Removed the USB drive, set motion.conf to put put only snapshots to a folder on my desktop....let's see how it goes.
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by MorePiPlease » Mon Nov 05, 2012 9:43 pm
Versions:

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

pi@raspberrypi ~ $ sudo vcgencmd version
Oct 25 2012 16:37:21
Copyright (c) 2012 Broadcom
version 346337 (release)
pi@raspberrypi ~ $


So I am updating all packages and firmware prior to more attempts....

sudo apt-get update
sudo apt-get upgrade
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo apt-get install git-core
sudo apt-get install ca-certificates
sudo rpi-update
sudo reboot
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by MorePiPlease » Mon Nov 05, 2012 9:47 pm
Ok all fresh...
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.2.27+ #257 PREEMPT Mon Nov 5 00:01:55 GMT 2012 armv6l GNU/Linux

pi@raspberrypi ~ $ sudo vcgencmd version
Oct 31 2012 17:57:31
Copyright (c) 2012 Broadcom
version 347415 (release)
pi@raspberrypi ~ $
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by MorePiPlease » Mon Nov 05, 2012 10:02 pm
Performance of Motion is noticeably faster and appears stable (or at least is not crashing randomly after 3-15 seconds as it was)...I have had it running for 5 minutes which was unthinkable last night. Going to kill it and tweak it cause that is how we roll.
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by dancytron » Tue Nov 06, 2012 2:26 am
I've read almost all of this thread and understood about 1/2 of it.

I have an Elephant related question.

Are there a series of objective tests you can do to be sure you haven't got a bad combination of hardware that is causing Elephant related problems?

I am planning on buy some pi's, pairing them up with recycled screens, hubs, KB, mouse etc and selling them for a profit. I'd like to be able to say, "I've run test x, y, and z and this combination has no usb problems."

Thanks in advance.
Posts: 46
Joined: Sun May 06, 2012 11:09 pm
by edwardl » Tue Nov 06, 2012 7:24 am
How does this look for a battery pack, surely this is a good sort of power etc
http://www.alibaba.com/product-gs/56079 ... ttery.html
Posts: 13
Joined: Fri Nov 02, 2012 12:05 pm
by obcd » Tue Nov 06, 2012 7:40 am
Your battery pack is a little off topic.
Impossible to say by the looks and the specs if it's good. Li Ion batteries are usually 3.7V.
So the pack needs some electronics inside to change that to 5V.
Depending upon the quality of those, the 5V can be stable or not stable at all.
After all, the purpose of such a pack is to serve as a charger, not as a stable 5V supply.
Posts: 890
Joined: Sun Jul 29, 2012 9:06 pm
by lingon » Tue Nov 06, 2012 4:44 pm
MorePiPlease wrote:Performance of Motion is noticeably faster and appears stable (or at least is not crashing randomly after 3-15 seconds as it was)...I have had it running for 5 minutes which was unthinkable last night. Going to kill it and tweak it cause that is how we roll.


What kind of resolutions and frame rates have you tested with motion? Does it run without errors for longer time periods?
Posts: 101
Joined: Fri Aug 26, 2011 7:31 am
by MorePiPlease » Wed Nov 07, 2012 7:19 pm
Motion is running great now. I used to run servers that would only be bounced every six months so it is hard to say that 20 hours of uptime equates to rock solid but the performance is good and it seems solid now.

I left it running today when I left this morning for work and will give you some performance metrics when I return home this evening.
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by MorePiPlease » Wed Nov 07, 2012 7:22 pm
currently running @ 640x480 but only 2 FPS (defuault motion.conf setting)...I'll pump it up tonight.
Posts: 14
Joined: Mon Nov 05, 2012 1:59 pm
by p4trykx » Wed Nov 07, 2012 8:13 pm
What camera are you using?
I use an old Logitech QuickCam Pro 4000 (or 5000) and it only runs 170x120 px it uses pwc driver.

On my laptop it manages to show ~15 frames with 640x480 resolution.
Posts: 120
Joined: Wed Jan 11, 2012 2:55 pm