Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 12:52 am

Hmmm... very frustrating day...

I can get keyboard, mouse, wifi (netgear 15N) and bluetooth (ABE) and NXT lego robot bonding to work, but only 2 or three at a time!

(eg: wifi and mouse but no keyboard, add the keyboard, then no wifi, get the wifo back if no mouse...)

This seemed to be power, so I have tried Blackberry charger (seems stable at 700mA, iphone charger (tended to go over Voltage), ipad charger (always >=5.3), Maplin laptop battery (always over voltage)...

or hub (all the cheap powered hubs were bus powered wth charger if your devices need them so the 4 I tried all failed to resolve the above power issue). i found an old Belkin powered hub which is better (and does not allow any power back to the RPi through a distinct USB B plug)

or keyboard ( it seems to be when USB wifi and USBB keyboard are together that one or other hangs... Have tried cute pink laptop keyboard, DELL basic wired USB, Microsoft big layout keyboard...

I got very frustrated, so thinking it was a power issue I went out and got a digital bench power supply. Now I can watch the very sensible numbers coming out of the bench supply scroll around whilst the RPi fails to run the mouse/keyboard/wifi

Is this a common issue? or did I get a rogue RPi? I have bought about 4 hubs, and an expensive well controlled, stable bench power supply, +...

If this is for kids to take home and scavenge hardware from the attic, it needs to be more robust or better documented! Anyone else with same issues?

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 2:16 am

If any 1 or 2 devices work ok, but more together do not work, it is very likely power supply issues as you state. I suspect that the RasPi cannot provide enough power for many wifi devices through it's own ports (regardless how large your power supply is- has to do with the RasPi's own current-limit fuses on its USB ports), so you need a correctly powered USB hub. Some cheap "powered" USB hubs apparently do not work, unfortunately enough.

There is one other item, there was a fairly recent patch which fixed a software bug that caused a kernel panic during large file transfers involving both USB and ethernet links. However, this may not be relevant to you if that's not the specific error you had.

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 2:27 am

I was going to point you to this link, but unfortunately enough there are NO "working" hubs listed  yet! Maybe someone can help here?

http://elinux.org/RPi_Verified.....d_USB_Hubs

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 3:32 am

Boreatton Scouts said:


I can get keyboard, mouse, wifi (netgear 15N) and bluetooth (ABE) and NXT lego robot bonding to work, but only 2 or three at a time!

Is this a common issue? or did I get a rogue RPi? I have bought about 4 hubs, and an expensive well controlled, stable bench power supply, +...


It's very early days in the life of the Pi and only a few hundred out in the wild - in a couple of weeks time there will be 7000+ more users testing different configs, but as mentioned above, based on my computing & electronics knowledge/experience, a quality powered hub would be my next step.

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:10 am

That's what I was thinking...

The bench power supply delivers a stable 5.06 or 4.97 or so, but is only ever being asked for 450mA and usually less than this. Between TP1 and TP2 the voltage is rather less (about 4.8). When I attached a cheap powered Belkin 3 port travel hub to the second USB to reduce demand from the main hub, the TP1 to TP2 voltage was all over the place - got up to 7v at one point so that wasn't helping. Plugging the wifi dongle into the second USB port didn't seem to help either- still got things hanging and the RPi didn't manage to power wifi even though the main supply was sitting ready to give up to 2.5A so I guess there is a lowish limit on what the USB bus will give to it's ports, that is a lot less than a laptop!

The main powered hub I have been using is a old Belkin powered 4*USB2 hub. It doesn't give any power to the RPi when it is switched on and I assume that the hub-RPi line is just data. It s quite happy to power the keyboard and mouse, and the BT dongle, but the keyboard and wifi is too much. (Netgear 150N and a Sweex a,b,g (realtec chipset) had same problem)

It is getting trickier to get a powered hub from the highstreet in Shrewsbury! Maplins are good as they are happy to swap things without quibbles if they don't work out, but they do not have any powered hubs (apart from a Cerulean USB3 hub that just didn't work) other than bus powered with optional 'power supply port if your devices need more power' which I take to mean it will take power from the RPi or if you plug in the power, will dump random voltages around about 5V down the USB line which the RPi seems not to like. (that's what happened with a new 4 port Cerulean hub) Comet and the like don't have any - again only bus powered travel hubs.

So - any suggestions for a top powered hub that can run a wifi dongle and a keyboard?! (doesn't seem too ambitious!)

Or is there a limit on the data wires in the RPi? Are the internal fuses very precise, or have I maybe got a very easily tripped board?

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:22 am

nmcc said:


It's very early days in the life of the Pi and only a few hundred out in the wild - in a couple of weeks time there will be 7000+ more users testing different configs, but as mentioned above, based on my computing & electronics knowledge/experience, a quality powered hub would be my next step.


It is quite important that there is at least one basic set of hardware that is readily accessible and cheap that everyone can be pointed to otherwise this forum is going to be very crowded very soon!

I don't think I am alone in struggling with this. It is quite entertaining trying to get it to do this stuff, but ultimately a bit futile if we can't get an easy-to-work setup that is cheap and portable. In the end it needs to fill a role my laptop can't (e.g. be bought and used by lots of kids (my scout robotics team all want to have one), be powered from AA Batteries and driven around on a lego robot,...)

A bit sad that when I want to look here or post, I go to my laptop...

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:32 am

As soon as I get my Pi (!!!) I'll be exercising the whole range of peripherals I have lying about my man cave / office. I'll then be able to measure things and see how they pan out.

It would be extremely odd for there to be a limit on the data wires.

There is a possibility that both the BT & the WiFi adapters are out of spec and either one take the system down - how do you get on with just the keyboard and mouse directly plugged in? Is the Pi OK then?

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:37 am

Boreatton Scouts said:


It is quite important that there is at least one basic set of hardware that is readily accessible and cheap that everyone can be pointed to otherwise this forum is going to be very crowded very soon!


Absolutely - this is why this phase of life for the Pi is considered:

"the developer release that took on a life of it's own and got a whole pile of end users who would really benefit from a fully tested product with lots of support docs but it's too early for that yet as most of the developers haven't got their hands on one yet to do the bulk testing and writing of documentation"


I don't think I am alone in struggling with this. It is quite entertaining trying to get it to do this stuff, but ultimately a bit futile if we can't get an easy-to-work setup that is cheap and portable.


You are too soon to the party but your patience will, I'm sure, be rewarded.

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:48 am

Indeed, and as I said, quite entertaining... RPi is fine with just mouse and keyboard and wired internet

I'm trying to rush and get a practical set up that I can commend to my scouts (and daughter) as quite a few are expecting their RPis soon!

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

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 9:23 am

It all sounds a bit weird tbh.

If plugging in a powered hub makes the Raspi voltage fluctuate that doesn't sound right at all, implies there is some sort of leakage back to the Pi, but that shouldn't happen. What I don;t understand is why a powered hub cannot support the peripherals you mention - it should easily be OK for that.

I'll flag this thread to the HW guys at work to see if they can make head or tail of it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 11:35 am

There is one way to check if this is a power-related problem, but it needs a bit of fiddling.

The purpose is to isolate the power load on the RPi and the USB devices, as follows...

Use a typical phone charger to power the RPi.

Use a bench supply to power a USB hub.

Cut the 5v core of the USB cable from the RPi to the USB hub. This leave the cable only connecting the ground and 2 data lines. You could also tape over the pin on the USB connector, but this is difficult to do.

Watch the load on the bench supply to check how much current is actually being drained by each USB device.

If this setup works OK, there is a power drain problem. If this setup does not work, there is some conflict within the RPi, either between the device drivers or within the embedded hub.

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 12:33 pm

Thanks James.

If people are worrying more about my problem than just giving quick advice, I thought I'd best get some tidier data on symptoms as I was faffing about last night (thought the bench power supply would sort everything and when my new toy didn't sort it all out I was shuffling things about a bit randomly.

So tried to set it up again this morning but using hdmi out to TV instead of pico projector, and fired it up and it all worked.

All was well until I hung lxde in vlc settings and powered off to escape, and then tried to restart and it failed to start the wifi. Powered off again and unplugged everything and started again, and after two more fails, it all started and was all working. Maybe I'm tripping internal fuses and then not allowing time to reset?

Anyway - it seems a bit intermittent at present. The 6.8-7V across TP1-TP2 was wierd. The power supply was reading 5.14 and had a safety cutoff set at 5.3V. The hub supplies were 4.5-5.0V and 6V so I do not know where the voltage could come from. The little hub was optionally bus powered so I guess the charger is connected to the USB 5V line and can feed back to the RPi, but the bigger one seems not to use the bus power line and only works with mains power. The only higher voltage around was the charger on the pico-projector which would have to have leaked back via the video cable, which seems unlikely...

Anyway, next time I get anything very odd I will try and remember to photo the setup. Otherwise its not really practical to remote troubleshoot!

Meanwhile I will invest in another powered 7 port hub or similar (on the grounds that a modern multi-port hub should deal with all my bits from its power supply, whereas most of the dongles I am using are a lot more recent than my mini-hub which is very old now.

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 12:46 pm

PS Thanks also to bredman - that would be a bit fiddly as you say and I'd have to hunt down my adapter plugs for the hubs. I'm fairly sure that the bigger hub is isolated from the Rpi, but it doesn't seem to be able to power keyboard mouse and wifi together. If I rely on that and find a power adapter for it I can use the blackberry charger for the RPi (700mA - the RPi has never used more than about 450mA that I have noticed) and measure the current taken by the hub with different devices in - that may be interesting? I can't believe that there are driver conflicts with the basic keyboard/mouse/netgear 150N dongle as the dongle is one lots of people seem to have used successfully (and so do I sometimes... )

User avatar
fulburncams
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 12:53 pm

Hi

I have had similar problems with the TPLink722N ( as recommended) adapter and also a cheapo e-Bay adapter,  see here http://www.raspberrypi.org/for.....il-problem for my tale of woe.

I have also now used powered USB hub which seems to solve some of the issues but still have oustanding problems with both adapters causing the RasPi to hang.  I was hoping to use the Raspi as an embedded/headless/wireless mode so mains powered USB hubs are not helpful. Will let you know if i get a succesfull, stable solution.

Cheers

Steve

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 3:43 pm

"The 6.8-7V across TP1-TP2 was wierd."

!? That should *never* happen, it is way outside the max. USB spec of 5.25 V.  It would be helpful to know where the damage threshold is on the chips, 7V might well be at or above "absolute max" for some 5V chips.

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 4:56 pm

yeah - I had had a glass or two of wine but I'm pretty sure thats what the multimeter said - I was worried... Maybe no current so a bit random from the meter? Maybe had more wine than I remember...?

Anyway, in response to bredmans suggestion I had a play at seeing who needed how much power!

I powered the main hub from the bench power supply at 5.13V (adapter said it wanted to give 6V but I didn't want to change the 5.3 cutout) and the RPi frrom a Blackberry charger (rated 5V I think)

N=Netgear 150N wifi

K=cheap Dell Keyboard claiming to need 100mA

M=laptop mini usb mouse

units=mA

Hub+N at booting = 386 - N seems to be talking to the world

remove N

Hub = 237

Add M and move it about

Hub+M=303 (so M=74)

remove M and add K

Hub+K=249 (so K=12 - workingg and typing...)

Add M back

Hub+K+M=275 to 315 (higher value when M moving about so K=12 ish and M about 70 when moving - all consistent)

Add back N - its not showing blue lights but

Hub+M+K+N=413 for what its worth...

Reboot with all three

Hub+M+K+N=465 all seem to work, N talking to world and K logs me in

"startx"

Hub+M+K+N=640 and then hangs, and power drops to 390-430 (depending on M moving or not)

Pull out M+K out and just have N - still hung =360

Pull N out too so just Hub=244, putting M in and out doesn't start and power flat

Power off hub and then back on and plug M in and out - nothing doing, USb shut down and power = 32

Illuminating?



None of them seem out of expected ranges? but can't get all three working together even though the hub reckoned he was good for 2500mA???

Alan

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:26 pm


I powered the main hub from the bench power supply at 5.13V (adapter said it wanted to give 6V but I didn"t want to change the 5.3 cutout)


This might be a problem. If the hub has a protection diode or voltage regulator which is designed for a 6.0V external supply, and you feed it 5.13 V input from a bench supply instead, then the hub may not be providing the full current it is supposed to, to its downstream devices. Leaving either some current to be provided from the RasPi which might not be able to support it, and/or the USB device(s) at a too-low voltage. (I am not sure I fully understand your devices or circuit connections though.)

Boreatton Scouts
Posts: 34
Joined: Sat Apr 14, 2012 3:00 pm
Contact: Website

Re: usb? power? hub? wifi?

Sun Apr 29, 2012 8:43 pm

When I was having problems I was using the adaptor that came with it, but for quick testing, I just used the bench supply with the protection cutoff set at 5.3 V and the voltage out set at 5.14V. (What I was using to run the RPi).

The results above are consistent with what I found using the hub power supply, but I take your point - being a bit lazy... Everyone watching TV at the moment so cannot redo

Connections are:

Blackberry charger to RPi power socket

RPi HDMI to TV

RPi Usb 1 (bottom one) to Belkin powered 4 port hub

Bench Power supply to Belkin 4 port hub

Belkin 4 port hub to combintions of : M=mini USB optical mouse, K=Dell usb keyboard, and N=Netgear 150N wifi dongle

User avatar
fulburncams
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm

Re: usb? power? hub? wifi?

Mon Apr 30, 2012 4:46 pm

Hi

I measured DC current of 2 wifi adapters (TP722 and generic 802.11n cheepie ) using a hacked cable to measure USB current today ,  as well some comparison stats with other USB devices and got the folowing,  Note I had to use a laptop with Win Vista as I still cant get the wifi to work on Raspi

TPLink - wifi between 135-141mA

Generic 802.11 dongle 149-160mA

keyboard - compaq - 3-4mA

Bluetooth - 13-15mA but not paired

Mouse - 24-50mA ( when main led turns on when moving)

I used a handheld digital multimeter,  clealry there will be soem inaccuraacies.

When attaching the above to the Raspi I got similar values except when I attached the wifi adapters direct to the Raspi,

TPLink - wifi between 35-45mA ? and did not work at all

Generic 802.11 dongle 25-40 mA ? and did not work at all

keyboard - compaq - 3-4mA

Bluetooth - not tried

Mouse - 21-40mA ( when main led turns on when moving)

So I then attached the wifi adapters back to the Raspi via the Belkin hub and I could at least configure and scan using the TPLink adapter although it still has the problems with startup and shutdown - see my previous posts.  My Raspi is powered by Nokia AC10x which states it can provide 1250mA current.

Cheers

Steve

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: usb? power? hub? wifi?

Mon Apr 30, 2012 4:59 pm

Thanks for the mA current data, that is very interesting and useful for comparison (maybe this should go into a wiki somewhere for easier reference).  I'm guessing that the higher current around 150 mA is used by the WiFi adaptor once it is configured and actively using its radio transmitter, and the lower 45 mA current is just the internal controller chip pre-configuration, with the radio off.

So let's say that 150 mA is the "normal" active WiFi current. Can you get that when the WiFi dongle is attached through the Belkin hub, to your laptop, when the hub is powered the same way as before? If so, then the hub is not at fault, and it looks like a software issue on the Pi.

User avatar
fulburncams
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm

Re: usb? power? hub? wifi?

Tue May 01, 2012 9:33 am

Hi

Ran a test with my hacked usb wire and fed from Belkin hub to check what TP722n adapter current requirements are and it starts off in the range 35-45mA pre starts then when I start with 'sudo ifup wlan0' the current peaks every 5 seconds or so upto 130-140mA.  The only way I can tell anything is working is that there is a green led flashing in the Wifi adapter,  but it is not connecting correctly to the wifi network as ping does not work. iwconfig and scan all work.  Is there a debug mode to see what is going on,  anyone ? Ho hum...  off to try another adapter.

Cheers

Steve

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: usb? power? hub? wifi?

Tue May 01, 2012 10:23 am

To get basic diagnostics from wifi, you can try disabling and enabling the interface. If the interface is wlan0 try the commands

ifdown wlan0

ifup –v wlan0

User avatar
fulburncams
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm

Re: usb? power? hub? wifi?

Tue May 01, 2012 10:44 am

Bredman

Thanks,   I have run that and received the following,  not sure if this is telling me a I have a problem ..

pi@raspberrypi:~$ sudo ifup -v wlan0
Configuring interface wlan0=wlan0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: using default driver type: wpa-driver wext
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -D wext -c /etc/wpa.conf -C /var/run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile: /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid
wpa_supplicant: ctrl_interface socket located at /var/run/wpa_supplicant/wlan0

ifconfig wlan0 192.168.0.234 netmask 255.255.255.0 up
route add default gw 192.168.0.1 wlan0
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/wpasupplicant
ThanksSteve

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: usb? power? hub? wifi?

Tue May 01, 2012 10:59 am

There is no mention that a wireless network has been found. I would have expected to see selection of a network and negotiation of DHCP.

I don't have experience with this type of wifi module, so I don't know where to look next.

User avatar
fulburncams
Posts: 70
Joined: Wed Nov 30, 2011 8:29 pm

Re: usb? power? hub? wifi?

Tue May 01, 2012 11:23 am

Dear Bredman

I have fixed the ip to 192.160.0.234 hence no dhcp.  Re teh no netwrok found,  I have set ssid , passkey and encryption as suggested in the  Debian and raspi wiki's in a file called wpa.conf ,  but I agree it looks as though the adapter is not connected to the access point.  If i run 'iwlist wlan0 scan',  I can see my local wireless points but I do not seem to be able to connect.

Thanks

Steve

Return to “Troubleshooting”