USB redux


515 posts   Page 7 of 21   1 ... 4, 5, 6, 7, 8, 9, 10 ... 21
by redhawk » Tue Jan 29, 2013 2:20 pm
I fixed the Bluetooth problem it looks like something is deliberately taking the device offline which is different behaviour to inserting the same device after booting up.

To fix this I used: hciconfig device up

Any idea how to fix this without resorting to dirty hacks such as /etc/rc.local ??

Also can any help me get my 808 #3 webcam working with Raspbian in USB 2.0 mode??

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by castalla » Tue Jan 29, 2013 2:32 pm
About the bt dongle: I've also seen this behaviour . It's up about 99% of the time on a reboot. Occasionally it's down. No idea why.

I don't think it's worth persevering with bt until the usb issues are ironed out!
Posts: 543
Joined: Thu Jul 19, 2012 3:46 pm
by redhawk » Tue Jan 29, 2013 3:57 pm
Despite the reported problems with Bluetooth audio I'm not experiencing any lockups or loss of Ethernet connectivity.

I also think there is a flaw in Raspbian it's not taking the device offline but rather not bothering to initialise the dongle's parameters during the booting process.
I wrote a simple script to fix this i.e. dongle name, class, pmode, imode and now my Bluetooth headset can auto-connect without any fiddling. :)

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by castalla » Tue Jan 29, 2013 4:13 pm
redhawk wrote:Despite the reported problems with Bluetooth audio I'm not experiencing any lockups or loss of Ethernet connectivity.

I also think there is a flaw in Raspbian it's not taking the device offline but rather not bothering to initialise the dongle's parameters during the booting process.
I wrote a simple script to fix this i.e. dongle name, class, pmode, imode and now my Bluetooth headset can auto-connect without any fiddling. :)

Richard S.


That's interesting ... so what firmware and kernel are you using?

No lockup if you switch the headset off (which I assume you can do?)
Posts: 543
Joined: Thu Jul 19, 2012 3:46 pm
by redhawk » Tue Jan 29, 2013 4:46 pm
I'm using the latest firmware I did an update/upgrade last night although Bluetooth audio was working fine even before then.

My headset (BSH10) is already paired (via blueman) I simply turn it on and I get the 2 beeps to tell me it's connected to the Pi.
I run pulseaudio & via Putty to start Pulse Audio it complains about you shouldn't run as root but nevertheless it's works - I prefer to do everything as root anyway. :)
I start Music On Console via padsp mocp -R oss and play online music streams from Digitally Imported.
When the headset is turned off my Putty session is still active, when I turn on my headset it auto-connects and music playback is resumed.

I'm not sure why people are having such a hard time with Bluetooth audio but it's possible that Pulse Audio is causing a system hang and not the Bluetooth dongle itself.

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by castalla » Tue Jan 29, 2013 5:20 pm
Hmm ... as far as I know the system I use hasn't got pulseaudio running - I may even have uninstalled it!

What happens if you just let the hheadset connect - don't actually play anything - but then switch it off ... still able to PuTTY? - give it a few seconds. Mine collapses after about 5-10 secs.
Posts: 543
Joined: Thu Jul 19, 2012 3:46 pm
by rajeshm » Tue Jan 29, 2013 7:16 pm
After extensive debugging I have come to the conclusion that all keyboard and other USB peripheral related problems have to do with the power supply. My guess is that the supply to the USB related circuitry is borderline and any drop at all anywhere along the path is enough to cause the board to stop responding to the USB peripherals. This problem is bad enough that with a good adapter (Apple iPad charger), a nice thick USB wire connecting the charger to the Pi but with the charger plugged into an overloaded socket at the end of a long extension cord (don't try this at home, folks) caused the Pi to stop responding to the keyboard. But when I plugged the charger directly into the wall socket, the keyboard was just fine. Note that even when the keyboard does not respond, the network connection works just fine and you can ssh to the Pi and see that everything else works as intended.

So the solution is to make sure that the supply is as good as you can make it. Exchanging the Pi for another one is probably not going to help much. They should fix this problem on the next rev of the Board.
Posts: 2
Joined: Tue Jan 29, 2013 6:57 pm
by MaxK1 » Tue Jan 29, 2013 8:00 pm
Power problems have been known about for a long, long time. Could have saved yourself some time by doing a little reading. Second, not _all_ problems are caused "flakey" power - some devices just don't work, or work sporadically. Third, a charger is NOT the same as a power supply.
I would suggest you go through the forums and read the MANY posts on the USB issues and power supply issues.
Posts: 498
Joined: Sun Aug 26, 2012 11:34 pm
by drgeoff » Tue Jan 29, 2013 8:16 pm
rajeshm wrote:After extensive debugging I have come to the conclusion that all keyboard and other USB peripheral related problems have to do with the power supply.


The person who has been employed full time since the start of 2013 to fix the USB problem(s) will be ever so pleased to know that he has been wasting his time. :lol:
Posts: 3050
Joined: Wed Jan 25, 2012 6:39 pm
by castalla » Tue Jan 29, 2013 8:29 pm
What we need is a matrix of bt dongles against devices to see if there's any patterns of success vs. failure.
Posts: 543
Joined: Thu Jul 19, 2012 3:46 pm
by M33P » Tue Jan 29, 2013 8:35 pm
rajeshm wrote:After extensive debugging I have come to the conclusion that all keyboard and other USB peripheral related problems have to do with the power supply. My guess is that the supply to the USB related circuitry is borderline and any drop at all anywhere along the path is enough to cause the board to stop responding to the USB peripherals. This problem is bad enough that with a good adapter (Apple iPad charger), a nice thick USB wire connecting the charger to the Pi but with the charger plugged into an overloaded socket at the end of a long extension cord (don't try this at home, folks) caused the Pi to stop responding to the keyboard. But when I plugged the charger directly into the wall socket, the keyboard was just fine. Note that even when the keyboard does not respond, the network connection works just fine and you can ssh to the Pi and see that everything else works as intended.

So the solution is to make sure that the supply is as good as you can make it. Exchanging the Pi for another one is probably not going to help much. They should fix this problem on the next rev of the Board.



Incorrect.

1) Power supply problems only add to USB issues, eliminating problems with power quality does not eliminate the remaining problems with USB device interaction (of which there are still many).
2) Your method of test is flawed - the Apple charger described is rated at 100-240Vac input. In any country, if you overloaded an extension lead to the point where the point-of-use voltage was less than 100V, you'd better have a fire extinguisher handy.
3) The core processor on the Pi is the BCM2835. The USB blob within this processor is unlikely to be changed with a new revision of the Pi, as it would require changing the CPU, which would require re-porting linux to the system. As of the rev 2 model B, there are very few hardware issues remaining that would warrant a board artwork/schematic change.
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by rajeshm » Sat Feb 02, 2013 10:58 pm
1) Power supply problems only add to USB issues, eliminating problems with power quality does not eliminate the remaining problems with USB device interaction (of which there are still many).

Correct. But if you want to get simple peripherals like keyboards and mice to work, and your only other option is to return the Pi, improve the power supply and there's a very good chance you can get things to work.

2) Your method of test is flawed - the Apple charger described is rated at 100-240Vac input. In any country, if you overloaded an extension lead to the point where the point-of-use voltage was less than 100V, you'd better have a fire extinguisher handy.

This was not a test method. LOL. My keyboard had worked a couple of times and then suddenly stopped working even if I tried all the other things that were mentioned elsewhere. I was going to return it but wanted to make a last-ditch effort to get it to work and started thinking back about the times it had worked. And I was exaggerating about how overloaded the socket is. It's probably drawing 12A from a typical wall socket. But the extension cable is pretty crappy so I think there's a drop of a few volts at the end. But I also have a cable modem, a DSL modem. a router and a VoIP phone adapter also running off the same supply at the same point as the Pi and everything else works. So the problem is with the Pi is that it's tolerance to supply variations is much worse than than normal caused by a less-than-robust board design and/or manufacturing problems.


3) The core processor on the Pi is the BCM2835. The USB blob within this processor is unlikely to be changed with a new revision of the Pi, as it would require changing the CPU, which would require re-porting linux to the system. As of the rev 2 model B, there are very few hardware issues remaining that would warrant a board artwork/schematic change.

I dont' think the problem is with the USB "blob". There surely are software problems but I'm quite convinced that there are supply related hardware problems on the board. Otherwise, it's impossible for something to work with a higher supply when it's non-functional with a lower one. It should be fairly easy for them to get failing test vectors, generate shmoo plots and probe the board and isolate the cause of the failure.
Posts: 2
Joined: Tue Jan 29, 2013 6:57 pm
by drgeoff » Sat Feb 02, 2013 11:18 pm
People closely associated with the Foundation freely admit all is not well with the USB hardware and software package that Broadcomm bought in for the SoC.

There are many posts in these forums eg the "elephant in the room" one and this "USB redux" one discussing USB problems. It is well established that no matter how good the power supply, it will not cure all the USB failures.
Posts: 3050
Joined: Wed Jan 25, 2012 6:39 pm
by doobster » Sun Feb 03, 2013 8:37 pm
Spiliot,
I installed your Kernel, but I wonder if you compiled your kernel without RAID support. I was going to create my RAID device and test the USB fix, but couldn't, since I didn't have any /dev/md devices.

Doobster.
Posts: 5
Joined: Sun Feb 03, 2013 8:33 pm
by MastaG » Sun Feb 03, 2013 10:11 pm
So will there be fixes for high speed isochronous usb devices like webcams/dvb-tuners etc?
Or will it never be possible to use isoc usb transfers without forcing usb 1.1?
Posts: 11
Joined: Fri Jun 08, 2012 8:14 am
by jamesh » Sun Feb 03, 2013 11:09 pm
MastaG wrote:So will there be fixes for high speed isochronous usb devices like webcams/dvb-tuners etc?
Or will it never be possible to use isoc usb transfers without forcing usb 1.1?


Hopefully. gsh is working on it. There is a possibility that some issues may be unfixable, but we think that's unlikely.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12165
Joined: Sat Jul 30, 2011 7:41 pm
by M33P » Mon Feb 04, 2013 8:07 am
MastaG wrote:So will there be fixes for high speed isochronous usb devices like webcams/dvb-tuners etc?
Or will it never be possible to use isoc usb transfers without forcing usb 1.1?


Isoc transfers behave quite wierdly on the Pi. I have found that it is wholly dependent on the transfer size and numbers of packets per transfer - I have a webcam that works flawlessly at only one setting, which corresponds to a specific transfer size of 1x768 bytes. All other settings either produce garbled packets or empty packets. It appears that USB1.1 doesn't make much difference (in my case), but forcing USB1.1 in other cases will mandate changing the transfer size that the device uses - which may improve things.

Performance will be variable if you are using a webcam that supports compression or indeed dvb tuners that stream variable-bitrate MPEG data via an Isoc endpoint. It is possible that frames might "squeeze through" between corrupted packets.

Try all the settings that the cam offers - some resolutions may work, some may not.
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by gsh » Mon Feb 04, 2013 9:40 am
To date I've not looked at isochronous transfers at all I've mainly been looking at low/full speed interrupts transfers.

Once I've got those sorted then I'm going to look into isochronous (starting with high speed)

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 828
Joined: Sat Sep 10, 2011 11:43 am
by rurwin » Mon Feb 04, 2013 9:55 am
M33P wrote:The USB blob within this processor is unlikely to be changed with a new revision of the Pi, as it would require changing the CPU, which would require re-porting linux to the system.


Untrue. The only blob baked into the CPU is the SD boot-loader. Everything else is in the /boot partition of the SD card.
User avatar
Forum Moderator
Forum Moderator
Posts: 2936
Joined: Mon Jan 09, 2012 3:16 pm
by M33P » Mon Feb 04, 2013 10:03 am
rurwin wrote:
M33P wrote:The USB blob within this processor is unlikely to be changed with a new revision of the Pi, as it would require changing the CPU, which would require re-porting linux to the system.


Untrue. The only blob baked into the CPU is the SD boot-loader. Everything else is in the /boot partition of the SD card.


The "blob" I am referring to is the "IP core" integrated into the BCM2835. This was (licensed/purchased) from Synopsys, which usually takes the form of a pile of hardware description language which eventually integrates into the silicon. While Broadcom most likely modified parts of it to glue it into the particular processor, you can be sure that the major internals are untouched. Thus, it's a vendor blob.
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by pluggy » Mon Feb 04, 2013 11:39 am
The power and software issues on the Pi's USB are real and are separate issues but noobs often can't tell the difference. The USB power problems are often overstated on here because few people have actually measured how much current their peripherals actually consume. Its nice and convenient to blame the excessive power draw of peripherals. I've measured most of my USB stuff (Self employed computer bod - I tend to collect junk so have quite a few keyboards, mice, cameras etc ) and very little of it would worry a 100mA supply. For example only one of my keyboards pulls more than single figure milliamps - A Microsoft Sidewinder X4 which draws 55mA with the backlighting full up. Most of my mice (all wired optical) use between 10 and 20mA, an old ball mouse I have uses less. My two wifi adaptors consume about 30mA at the low traffic and strong signals I use them at. They will probably use more with very weak signals and/or high traffic. The odd peripherals I have which actually mention power consumption always overstate the case, often by an order of magnitude. I have the means to feed Pis with power via GPIO (takes the F3 polyfuse out of the equation) and have no difficulty getting a solid 5.1 volts into the Pi.

The USB software issues are real, are being worked on and hopefully will improve in the future. They have improved a lot since the Pi was first launched. Using a powered hub will often cause more problems than it solves. (another USB peripheral for the Pi's interface to trip up on). Part of the problem I believe is that the Broadcom BCM2835 wasn't envisaged to ever be a USB host. The only other thing it is used in is a telly media player and that is with proprietary software.
Don't judge Linux by the Pi.......
User avatar
Posts: 2760
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by abishur » Mon Feb 04, 2013 1:26 pm
pluggy wrote: The only other thing it is used in is a telly media player and that is with proprietary software.


Pluggy is referring to the Roku not XBMC just so you know ;-) And to be fair, it's the only other thing that we're aware of which does necessarily mean it's the only thing that there is. B-com tends to be tight lipped about this sort of stuff :-P
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4313
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by spiliot » Tue Feb 05, 2013 6:59 pm
Doobster wrote:I installed your Kernel, but I wonder if you compiled your kernel without RAID support.


As far as I can remember I imported the (then) current kernel options, so if it's missing some functionality it means it wasn't there in my system in the first place.
Posts: 4
Joined: Tue Jan 15, 2013 10:32 pm
by jamesh » Tue Feb 05, 2013 8:26 pm
pluggy wrote:The power and software issues on the Pi's USB are real and are separate issues but noobs often can't tell the difference. The USB power problems are often overstated on here because few people have actually measured how much current their peripherals actually consume. Its nice and convenient to blame the excessive power draw of peripherals. I've measured most of my USB stuff (Self employed computer bod - I tend to collect junk so have quite a few keyboards, mice, cameras etc ) and very little of it would worry a 100mA supply. For example only one of my keyboards pulls more than single figure milliamps - A Microsoft Sidewinder X4 which draws 55mA with the backlighting full up. Most of my mice (all wired optical) use between 10 and 20mA, an old ball mouse I have uses less. My two wifi adaptors consume about 30mA at the low traffic and strong signals I use them at. They will probably use more with very weak signals and/or high traffic. The odd peripherals I have which actually mention power consumption always overstate the case, often by an order of magnitude. I have the means to feed Pis with power via GPIO (takes the F3 polyfuse out of the equation) and have no difficulty getting a solid 5.1 volts into the Pi.

The USB software issues are real, are being worked on and hopefully will improve in the future. They have improved a lot since the Pi was first launched. Using a powered hub will often cause more problems than it solves. (another USB peripheral for the Pi's interface to trip up on). Part of the problem I believe is that the Broadcom BCM2835 wasn't envisaged to ever be a USB host. The only other thing it is used in is a telly media player and that is with proprietary software.


Just a FYI, I believe the Roku2 using the 2835 uses Linux, on which they run a custom application.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12165
Joined: Sat Jul 30, 2011 7:41 pm
by sleep lack » Tue Feb 05, 2013 8:35 pm
Just for interest, I've tested bluetooth audio on a model A - the problems with SCO audio (isochronous traffic) when running at full-speed seem to have gone! I can swap the same SD card+BT dongle between a model A and B and see the audio working on the A, but not on the B. (I'm personally happy running at high-speed instead of full-speed though anyway, so it's not that big a deal for me)
Posts: 19
Joined: Thu Mar 08, 2012 3:33 pm