LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Weird USB behaviour on RazPi 4 (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/weird-usb-behaviour-on-razpi-4-a-4175683632/)

business_kid 10-14-2020 08:08 AM

Weird USB behaviour on RazPi 4
 
This seems strictly a hardware problem on my 4G RazPi 4.
AFAIK, the (blue) USB3 sockets have a 500mA current Limit, and the (black) USB-2 sockets have a 250mA limit. Please correct if you know better.

I'd been running on sdcards, but it was SSD time. My setup had been
  • Ralink RT-530 external wifi in usb3
  • Micro SDCard in sdcard -->usb converter in usb3
  • Logitech wireless mouse/keyboard adapter in usb-2
and it all worked fine. The internal sdcard slot was vacant. So I unplugged the sdcard converter and plugged in the (kingston) SSD. That's when the trouble started. It came up, with no mouse. The keyboard was sort of OK, but the mouse was gone, and both were on the same adapter. I'll spare you the blow-by blow, but trying the devices around gave me only one working combination.
  • Logitech wifi keyboard/mouse adapter in usb3
  • ssd and external wifi in usb2
Replacing the battery in the mouse brought no joy either. Still no mouse.

The RazPi is behind a tv on a small table. I have another larger table with keyboard & mouse, so wired is not an option. The switch that brought this about was pulling the sdcard usb converter, and inserting the ssd with it's little case. I did have a faulty ssd case before, which stopped play for a while. So the case is a component in the chain, with it's own pcb & ICs.

What's even more irritating is that I'd class myself as a hardware guru, and know enough to know this doesn't make much sense. I'd already done an rsync successfully on my pc. Why?:banghead:

michaelk 10-14-2020 09:21 AM

As far as I know there is no current limit per port but the max total current for all ports is 1.2 amps. It seems unrealistic that all three devices are drawing 1.2 amps but there could be a peak start up current on the SSD. There are some known issues with USB 3 hubs so it could be a problem with the drive case and why it only works in a USB 2 port.

BYI, the suggested power supply for a Pi 4 is 3 amps.

business_kid 10-14-2020 11:56 AM

1.2amps between them? That makes no sense, as usual, but it means we can eliminate power as a cause.

The separation makes no sense. Going by the chips on the board, there's one usb chip with usb-2 & usb-3 hubs. So that probably provides the 1.2A. I have the recommended 3A power supply. I've a hunch it's in the signal pins, not the power line at all. But I'm way beyond verifying it. My left hand arm went in a stroke, so I can't use a multimeter or solder:(.

I got a case for this ssd previously. and couldn't boot. I found solder bridges in it, and returned it. I'm just wondering if I should get myself a different case.

michaelk 10-14-2020 01:55 PM

Here you go

https://www.raspberrypi.org/document...md#powerlimits

Does sound like a USB 3 problem with the case.

business_kid 10-15-2020 04:33 AM

Quote:

Originally Posted by michaelk (Post 6175380)
Here you go

https://www.raspberrypi.org/document...md#powerlimits

Does sound like a USB 3 problem with the case.

I have experience with hardware, and one thing I remember is checking voltage levels with an oscilloscope. That's what had me thinking about it. Just thinking, you wouldn't want big current levels swinging around at 150 Mbps, would you? These days, instead of looking for the needle in the haystack, I'm reduced to looking into the haystack. But I think I have a quick dodge to get me out of this, and I'll post the results.

fatmac 10-15-2020 04:39 AM

A lot of electrics in external cases wouldn't work to boot from, unfortunately.

I've been quite lucky in that most of my cases & cable adapters work, but one consistently refuses to work on my RPi4, so now resides on my RPi3B+ & works perfectly on it, so it is down to the chips used in the adapter cable or case.

Edit: I boot from an external HDD, not SSD, on my RPi4, plugged into a USB3 port, so it isn't down to the current or voltage.

business_kid 10-16-2020 08:47 AM

Well, it's just a straight through as far as possible. But SATA ≠ USB. It boots OK.

business_kid 10-18-2020 11:04 AM

Quote:

Originally Posted by fatmac (Post 6175541)
Edit: I boot from an external HDD, not SSD, on my RPi4, plugged into a USB3 port, so it isn't down to the current or voltage.

SSDs can give current pulses, I'm told. What's frustrating for me is that I can boot with usb3, but then the Logitech Keyboard or Mouse goes down. And one goes down, but not the other. :scratch: :banghead: That indicates some evil coming at the from the usb port, or the room is being battered by radiation. I am no conspiracy theorist! :rolleyes::rolleyes: What causes the evil is the SSD; that's for certain, because when I pull the ssd and replace it with an sdcard in a usb converter, the problem vanishes.

In days gone by, I would have tacked on a 220µF capacitor right at the usb ports, to smooth any pulses. But, post stroke I can't even solder! I tried swapping usb cases - maybe 1% improvement. The one trick up my sleeve is to swap in the SSD from my pc to the RazPi. I resurrected an old 450G hd, and backed them both up, but haven't bothered yet.

fatmac 10-19-2020 05:10 AM

I used to have the keyboard/mouse problem on my RPi3A+, it just didn't have enough power for both at the same time, my solution is to use one of those micro keyboard/mouse pad wireless units on it. The combined milliamps were just too much for the USB port.

(Maybe a powered USB hub would sort it, at the cost of another piece of hardware.)

business_kid 10-19-2020 05:40 AM

A wireless unit is what I have… I reckon ~100 mA is all it uses. The range isn't great. But I doubt if a wired kb/mouse would use that. It's sensitivity is lacking. A new battery in the mouse restored that for 10 minutes. I'm not as smart as I was, but I still have a good techie's brain. It seems to me that if the voltage dropped by 0.5V, things could go wrong. But I don't see how. It's a 3A supply.

sgosnell 10-19-2020 12:33 PM

I have had power supplies go bad. They still produced the volts, but not the current. Most of my power problems with laptops and other devices over the years have been caused by faulty power supplies.

business_kid 10-19-2020 02:37 PM

Quote:

Originally Posted by sgosnell (Post 6176797)
I have had power supplies go bad. They still produced the volts, but not the current. Most of my power problems with laptops and other devices over the years have been caused by faulty power supplies.

Amen to that. I fixed Industrial electronics, and an awful lot of power supplies went west.


EDIT: Mind you, I can't complain I'm getting 35MB/S on hdparm, which is dangerously fast for usb-2.0

business_kid 10-25-2020 02:42 PM

I'm marking this solved. The other night I had mouse, but no keyboard. I picked up the keyboard (always messy with one hand, and brought it forward onto my knees, and bingo, it was back. Poor reception. Subsequent tests showed even a box of tissues tilled the signal on occasion.

Conclusion: The SSD is dropping the voltage a few percent, causing the wifi receiver issues. It's a borderline install. I'm following Rule#1 of Electronic maintenance: "If it ain't broke, don't fix it." I've repositioned the RazPi & SSD to get a better wifi signal. I've repositioned things on my work area also to work around the issue.

TheTKS 10-27-2020 10:35 AM

Although marked as solved, I’m going to post this as another weird USB event on RPi4, in case it can help someone, although I can’t explain the behaviour.

I installed OpenBSD 6.8 (64 bit ARM) on RPi 4 4GB with recommended 3A power supply.

In doing that, when I got to the text installer’s install/update/autoinstall step, it wouldn’t accept keyboard inputs.

The problem went away when I moved things around usb ports.

I started with
- USB wireless mouse in lower USB 2 port (the one closer to the board)
- USB wired keyboard in upper USB 2 port
- uSD card with OpenBSD 6.8 ARM installer in sd-usb adaptor in lower USB 3 port (UEFI firmware uSD card in the Pi’s uSD slot)

After some messing around - yes, I tried unplugging and replugging the usb wired keyboard, and turning the Pi off and on again - the problem went away when I removed the mouse and moved the keyboard to the lower USB 2 port. No mouse is needed for OpenBSD’s text installer, which then recognized the keyboard.

During rebooting after installation, and before adding xenodm and Xfce, I put the wireless mouse usb adaptor back in, but into the upper USB 2.

So in the end, I switched the things in the two USB 2 ports (although in a particular sequence), and now both keyboard and mouse work.

I would like to understand why one arrangement worked and the other didn’t, so if anybody knows or can guess, please post here.

If not, I’ll be happy that I found a path to installation with my specific collection of uSD cards, USB things and RPi4, and hopefully it helps someone else in a similar situation.

TKS

business_kid 10-27-2020 12:47 PM

I got the impression the usb & keyboard are teetotally underpowered for wifi comms. I reckon if you left them as were and just moved closer, things would eventually work. That was my experience.


All times are GMT -5. The time now is 02:08 PM.