USB card adapters crash Pi4

Just tried using a couple of USB card adapters with my 8GB Pi4. Both cause immediate loss of USB hard disk access. Unplugging the offending adapter does not restore normal operation. Power cycling puts matters right without apparent ill effect.

Doesn't seem to matter if there's a card in the adapter or not.

The USB3-Sata adapter is a Sabrent EC-UASP. It uses the UAS driver and hasn't caused any obvious problems on its own.

Anybody seen this, or have any idea what's going on? The card adapters are fairly generic. Both are USB3, both have been used before, but only in USB2 ports on Pi3's. One is no-name large- and micro-SD only, the other is a UGreen card reader supporting TF, SD, CF and MS cards. The slot labeled TF is the one I used with microSD cards, didn't notice the "TF" marking till just now.

Thanks for reading!

bob prohaska

Reply to
bob prohaska
Loading thread data ...

Dana Fri, 1 Jan 2021 20:53:25 -0000 (UTC), bob prohaska napis'o:

Not enough power?

Reply to
Nikolaj Lazic

From your description it sounds as if you're booting with the adapters disconnected and the hangup occurs when one or both are connected to the Pi. Is that what happened?

Do they work correctly when used together on another computer?

Have you got a multimeter, osscilloscope or any other way to check the Pi's supply voltage?

------- I tend to keep a Pi power cable modified so I can measure the voltage across it. I run the cable through a small plastic box with terminals on the lid, the terminals are type used on oscilloscopes or multimeters for connecting test probes. These are worth using because they're difficult to short accidentally. The terminals on the box are connected to the red and black wires in the power cable. So that putting a multimeter or 'scope across them lets you monitor the supply voltage going into the Pi. I sometimes put two terminals in series on the red cable with an on/off switch on the bit of wire between the 'red' terminals: this makes current measurement easy: turn the switch off and connect a meter on the two 'red terminals to measure current. Don't wanna measure current? disconnect meter from red terminals and turn the switch on. You mightn't use this gadget very often, but boy is it useful to have one when you suddenly need to check voltage or current in a USB terminated cable.

Farnell, Conrad and similar outfits sell suitable boxes and terminals as well as soldering irons and multimeters

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

One adapter at a time, yes.

They did when plugged into Pi3's, both under FreeBSD and RaspiOS

It never crossed my mind that power might be an issue. The power supply is a 3.5 amp unit from CanaKit. I suppose it's possible I'm on the edge, but you'd think that would cause boot troubles. I'll cobble up some test leads and check. No 'scope, alas, but I do have a voltmeter. That limits the utility of the measurement for transients. Hard to believe the puny little adapter could make trouble while spinning up the disk is ok. But it wouldn't be the first power supply to take sick on me.

My habit has been to probe the GPIO pins. I hope the problem doesn't become common enough to warrant a breakout box. Still it's a good idea.

Thanks for writing!

bob prohaska

Reply to
bob prohaska

On a sunny day (Fri, 1 Jan 2021 20:53:25 -0000 (UTC)) it happened bob prohaska wrote in :

I only have an old Sweex USB2 card adaptor, connecting it to my new Pi4 via USB via a Sitecom powered hub keeps /dev/sda2 3.4 TB Toshiba drive running normally:

from dmesg: [163901.835425] usb 1-1.2.2: new high-speed USB device number 7 using xhci_hcd [163901.967321] usb 1-1.2.2: New USB device found, idVendor=058f, idProduct=6362, bcdDevice= 1.00 [163901.967343] usb 1-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [163901.967359] usb 1-1.2.2: Product: Mass Storage Device [163901.967375] usb 1-1.2.2: Manufacturer: Generic [163901.967390] usb 1-1.2.2: SerialNumber: 058F312D81B [163901.970217] usb-storage 1-1.2.2:1.0: USB Mass Storage device detected [163901.970771] scsi host1: usb-storage 1-1.2.2:1.0 [163903.036487] scsi 1:0:0:0: Direct-Access Generic USB SD Reader 1.00 PQ: 0 ANSI: 0 [163903.037241] sd 1:0:0:0: Attached scsi generic sg1 type 0 [163903.038712] scsi 1:0:0:1: Direct-Access Generic USB CF Reader 1.01 PQ: 0 ANSI: 0 [163903.039297] sd 1:0:0:1: Attached scsi generic sg2 type 0 [163903.040713] scsi 1:0:0:2: Direct-Access Generic USB SM Reader 1.02 PQ: 0 ANSI: 0 [163903.041273] scsi 1:0:0:2: Attached scsi generic sg3 type 0 [163903.043009] scsi 1:0:0:3: Direct-Access Generic USB MS Reader 1.03 PQ: 0 ANSI: 0 [163903.043570] scsi 1:0:0:3: Attached scsi generic sg4 type 0 [163903.097573] sd 1:0:0:1: [sdc] Attached SCSI removable disk [163903.100928] sd 1:0:0:0: [sdb] Attached SCSI removable disk [163903.108183] sd 1:0:0:3: [sde] Attached SCSI removable disk [163903.109878] sd 1:0:0:2: [sdd] Attached SCSI removable disk

from mount: ... dev/sda2 on /mnt/sda2 type ext4 (rw,relatime) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=806492k,mode=700)

from df: ... tmpfs 806492 0 806492 0% /run/user/1000 /dev/sda2 3844510712 90144 3649059904 1% /mnt/sda2

In case you have a power problem, everything here on both Pi4s runs via a Sitecom USB hub, it is even powering an older Raspi1 via some USB output (no you cannot connect via that). no extra mains adaptor needed! I like the thing.

But this is running my modified old PI4 image on the new 8GB Pi4B, no idea if the recent raspios does the same. In My View Linux should have stayed with OSS audio, I had multi channel audio working

20 year ago on that, alsa broke everything and is counter Unix, now raspi changed audio again and the apt-upgrade f*cked up audio, on my old Pi4 image (I know, they call that 'improvement') so ffplay audio for example I needed a fix like this to play with ffplay via the audio jack: raspi99: ~ # cat /usr/local/sbin/ffplay2 #!/bin/bash SDL_AUDIODRIVER='alsa' AUDIODEV='hw:1,0' ffplay $1 so to play via the audio jack I use 'ffplay2 filename'

Lots of work to get every script and thing going again.

But I am glad with the Sitecom USB3 hub, have 2 now, one for each Pi4. Same for the Toshiba 3.4 TB USB3 harddisks connected to it, other one running 24/7 now for a year or so.

hdparm shows amazing speed on those raspi99: ~ # hdparm -t /dev/sda2 /dev/sda2: Timing buffered disk reads: 408 MB in 3.00 seconds = 135.86 MB/sec

raspi99: ~ # hdparm -T /dev/sda2 /dev/sda2: Timing cached reads: 1498 MB in 2.00 seconds = 749.07 MB/sec

not bad!

Reply to
Jan Panteltje

Or get one of the in line USB voltage and current meters. There are loads out there of no doubt variable quality. I've a KEX KCX-017 does the job (up to 3.5 A) and is accurate enough. Display shows V (to 10 mV resolution), A (1 mA resolution) and mAHr up to 20 AHr (less 1 mAHr).

--
Cheers 
Dave.
Reply to
Dave Liquorice

That makes sense - I didn't know these are available, but should have guessed. The only disadvantage would seem to be that you'll end up with a collection on different adapter cables since almost all of them seem to have just USB-C connections.

Like so many Chinese things, Amazon currently has that one marked as 'unavailable', don't know when we'll have more.

Dunno why their manufacturers persist in doing that: in makes them look like fly-by-night chancers, but maybe that's exactly what they are.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Do you have your USB hard disk mounted using the device name (/dev/sdaX) or a disk UUID (UUID=blahblahblahblah) ?

That should only make a difference when powering on with the adaptor present, not when plugging it in when running, but using UUIDs eliminates the issue of the device names ever changing.

---druck

Reply to
druck

Belated thought: I wonder how many of these nice toys, many of which which seem to have just one short production run, are actually final year projects for electronic design graduates at Chinese technical universities.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

h

week (probably quicker) from UK sellers.

That unit is quite old and wouldn't be any good for the higher voltage/current that USB-C can support (up to 20 V @ 5 A?). There appears to be more recent units that can cope with that though.

k

I get the impression that once anything is listed on Amazon it stays there forever.

--
Cheers 
Dave.
Reply to
Dave Liquorice

On a sunny day (Sat, 2 Jan 2021 12:51:35 -0000 (UTC)) it happened Martin Gregorie wrote in :

Most AFAIK (the stuff I bought) are just based on chip manufacturer application notes. If you look at the chip number and locate the data sheet with google you likely find a circuit diagram :-)

To measure DC without breaking any wires I have a Voltcraft VC-330 (google) AC / DC clamp on meter. Maybe slice an existing USB cable open, find the +5 V wire, clamp it on, measure it, tape it closed (have not tried it on USB). It is a useful universal thing that you can use for anything like for example measuring stuff in your car or whatever, without disconnecting or cutting wires etc. I would not buy something specialized for just USB.

Reply to
Jan Panteltje

Same here, but then I have an oscilloscope and at least three pocket-size multimeters, each is part of a different toolkit for the convenience of having a grabbit-and-go box for different purposes, e.g. model flying and soaring, and I've already built the aforementioned breakout boxes for USB and other connector sets.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

USB-C and a device using such connector is not like a car electronics (I know the topic here is power supply) and besides you can not measure A or mAs without breaking the circuit. If I am wrong let me know. In case of data flow you need an oscilloscope as suggested by Martin Gregorie.

Reply to
Deloptes

Hall-effect ring. (But how would you get the wire through the loop without disconnecting it..? Ok you got me.)

Reply to
A. Dumas

clamp on meters

-- If you tell a lie big enough and keep repeating it, people will eventually come to believe it. The lie can be maintained only for such time as the State can shield the people from the political, economic and/or military consequences of the lie. It thus becomes vitally important for the State to use all of its powers to repress dissent, for the truth is the mortal enemy of the lie, and thus by extension, the truth is the greatest enemy of the State.

Joseph Goebbels

Reply to
The Natural Philosopher

On a sunny day (Sat, 02 Jan 2021 16:06:45 +0100) it happened Deloptes wrote in :

No, that clamp on meter measures to a few mA, without breaking any connections. Use the zero button before you measure.

That is an other thing, I have a scope, never used it for USB data flow there are plenty of utiities to check that.

>
Reply to
Jan Panteltje

On a sunny day (Sat, 2 Jan 2021 14:52:38 -0000 (UTC)) it happened Martin Gregorie wrote in :

Yes, Ok. I have a like a complete lab with all sort of electronics, never seen the need to measure an USB cable, a dead short you can test with a multi-meter. Model flying I did too, from 31 Dec last year in the EU you need a drone license...

formatting link
have not got the license yet, so my fireworks (also forbidden now) was playing with a blue power laser 2 days ago. I have the movie, but better not show it, shine in the clouds ;-) World has gone paranoia, if it continuous that way than the next generation will grow up as a bunch of dummies.

Reply to
Jan Panteltje

On a sunny day (02 Jan 2021 16:36:44 GMT) it happened A. Dumas wrote in :

It is 2 halves that can open FYI ;-)

Reply to
Jan Panteltje

Depends what you fly - I flew single channel RC for a year or to, then discovered free flight competition models, sold the RC gear and never looked back.

No license is needed for free flight if the model weighs less than 250g.

Also lots more exercise than just standing there holding a Tx, especially if you fly F1A (tow-line launched gliders - the faster you run before launch the higher it gets after release).

I'd ban those (spoken with my pilot hat on) due to all the brain-dead idiots who think shining them at aircraft is cool.

Oddly enough, the main use my scope got was checking the battery condition for my Koster dethermaliser timers: These ran off a stack of four 50mAh NiCds and were used to bring the model down out of a thermal at the end a timed competition flight. They do this by putting 500mA through a solenoid for 10 mS - this releases a catch on the tailplane which puts the glider into a stable deep stall, turning it into a rigid parachute so it drops out of the thermal and usually lands without damage.

Looking at the shape of the solenoid pulse was a great way of checking battery condition. A good, new battery showed a nice bathtub curve- 1.5v deep with an 8ms flat bottom and a 45 degree recovery slope. As the battery aged, the flat bottom got shorter and the voltage drop increased, eventually becoming a 4v deep triangle. I replaced batteries once the voltage drop exceeded 2.5v - the time I put into designing, building and adjusting a new model vastly exceeded the cost of a new set of batteries.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

On a sunny day (Sat, 2 Jan 2021 18:05:23 -0000 (UTC)) it happened Martin Gregorie wrote in :

I think it is: "Unless it has a camera" (most of those do however).

LOL, well I bike a lot...

For me it is all curiosity, seemed interesting to write an auto-pilot and that works very well. It can be used for anything from rescue to warfare (drop a bomb).

This is the problem, there is ALWAYS someone who does bad things with things, did you know you can kill somebody with a fork? So now we forbid all forks (after the knives that is), same for so many other things. It is the wrong way to go about it all. Also it is money sucking. I got my radio ham license when it was free, after that now I have to pay like 30 Euro a year,,, The drone license is not free, and in a few years your drone needs an ID transmitter on the drone AND one on the remote, so they can find where it is and the whereabout of who controls it. If Russia did it it would be called ....? Total control state, revolution is needed, I have the tech, much more than this. You see people rising up against the total lockdown, big party thing in France I just did read, 2500 people together in some hall, they chased the police out!

Nice system, nicads (I still have one that works) are a bit from the past these days, lipos work great for my drone, I tried liion (with power converter) but that does not fly longer. Then I tried a wire, and sure you can keep the thing in the air indefinitely:

formatting link
note the thin coax over the fence, I send several hundred volt at 100 kHz, transformed it down at the drone, the high volts at low current allows for a thin light coax.

Position of the drone using differential GPS is within a few cm stable.

formatting link
with scope :-)

The drone side, the high voltage is transformed down by a ringcore transformer to 7.5 V 10A the high current rectifier diodes are on heatsinks in the air flow from the propellers:

formatting link

Part of the 'lab':

formatting link

Designing 'tronics and playing with 'tricety I started at 4 years old, became my job at some point. It is fun.

Reply to
Jan Panteltje

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.