WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: USB SDCARD reader  (Read 4171 times)

Offline georgp24

  • Jr. Member
  • **
  • Posts: 58
USB SDCARD reader
« on: January 10, 2016, 07:14:37 AM »
I have two SDCARD readers which I can attach to a PC via USB. I wanted to use them to copy from one SDCARD to the SDCARD inserted in the RPI.

One reader caused the RPI to crash the other was not recognized. Are these devices supported by piCore?

Georg

Online Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: USB SDCARD reader
« Reply #1 on: January 10, 2016, 08:34:42 AM »
Yes, they should work fine.    What version of piCore are you running?

Start with the one that is not recognized, can you plug it in and the run dmesg.   There should be some log entries related to the card.   Also, once in, run lsusb and post the results

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: USB SDCARD reader
« Reply #2 on: January 10, 2016, 09:04:50 AM »
Just tested with latest 7.0 on RPi2, works fine as expected.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Online Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: USB SDCARD reader
« Reply #3 on: January 10, 2016, 10:15:39 AM »
If I had to guess, you don't have a good power supply powering the pi.

Offline georgp24

  • Jr. Member
  • **
  • Posts: 58
Re: USB SDCARD reader
« Reply #4 on: January 10, 2016, 03:24:29 PM »
Thank you for testing this!

I found that it depends on the SDCARD. If I use an old SDCARD it works. It does not work with my brand new UHS Speed Class U3 16 GB cards. The sales person in the shop recommended these for fast read/write access.

It may be that the card readers I have do not work properly with these fast SDCARDs since they are some years old.

I just purchased a Raspberry approved power supply and use that!

Georg

P.S. another question:
when I boot piCore 7.0rc2 I get four random art images. Since I do not plan to use SSH, how can I stop this output?

Online Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1268
Re: USB SDCARD reader
« Reply #5 on: January 10, 2016, 04:26:33 PM »
Thank you for testing this!

I found that it depends on the SDCARD. If I use an old SDCARD it works. It does not work with my brand new UHS Speed Class U3 16 GB cards. The sales person in the shop recommended these for fast read/write access.

It may be that the card readers I have do not work properly with these fast SDCARDs since they are some years old.

I just purchased a Raspberry approved power supply and use that!

Georg

P.S. another question:
when I boot piCore 7.0rc2 I get four random art images. Since I do not plan to use SSH, how can I stop this output?

That speed class will be useless on a rpi, but it would be interesting to see the output.

The random art is OpenSsh generating keys.  Just run a backup, and the keys will be stored.   Or you can remove the OpenSsh startup command......that is in /opt/bootlocal.sh.  And of coarse run a backup after changing.

Offline georgp24

  • Jr. Member
  • **
  • Posts: 58
Re: USB SDCARD reader
« Reply #6 on: January 10, 2016, 04:57:28 PM »
Thank you Paul,

after some further testing one SDCARD reader works with the high speed SDCARDs although a bit unreliable.

The other one has the following messages produced with dmesg, I removed the reader again to be able to run dmesg. I made gab where the messages start appearing on the screen:
Code: [Select]
[   95.242976] usb 1-1.4: new full-speed USB device number 7 using dwc_otg
[   95.502972] usb 1-1.4: new high-speed USB device number 8 using dwc_otg
[   95.604630] usb 1-1.4: New USB device found, idVendor=14cd, idProduct=125c
[   95.604709] usb 1-1.4: New USB device strings: Mfr=1, Product=3, SerialNumber=2
[   95.604731] usb 1-1.4: Product: Mass Storage Device
[   95.604750] usb 1-1.4: Manufacturer: Generic
[   95.604770] usb 1-1.4: SerialNumber: 125C20100726
[   95.611452] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[   95.616249] scsi host1: usb-storage 1-1.4:1.0
[   96.614287] scsi 1:0:0:0: Direct-Access     Mass     Storage Device        PQ: 0 ANSI: 0 CCS
[   96.617053] sd 1:0:0:0: [sdb] 31293440 512-byte logical blocks: (16.0 GB/14.9 GiB)
[   96.617651] sd 1:0:0:0: [sdb] Write Protect is off
[   96.617694] sd 1:0:0:0: [sdb] Mode Sense: 03 00 00 00
[   96.618261] sd 1:0:0:0: [sdb] No Caching mode page found
[   96.618302] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[   96.624886]  sdb: sdb1 sdb2 sdb3
[   96.633029] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[   99.072957] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[   99.273015] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[   99.472950] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[   99.673012] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[   99.872946] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  100.073009] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  100.173973] sd 1:0:0:0: [sdb] UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[  100.174025] sd 1:0:0:0: [sdb] CDB: opcode=0x28 28 00 00 00 00 20 00 00 18 00
[  100.174052] blk_update_request: I/O error, dev sdb, sector 32
[  100.252950] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  100.453051] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  100.652949] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  100.853042] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  101.052949] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  101.253005] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  101.353901] sd 1:0:0:0: [sdb] UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[  101.353954] sd 1:0:0:0: [sdb] CDB: opcode=0x28 28 00 00 00 00 40 00 00 38 00
[  101.353978] blk_update_request: I/O error, dev sdb, sector 64
[  101.432952] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  101.632953] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg
[  101.832949] usb 1-1.4: reset high-speed USB device number 8 using dwc_otg

[  106.932948] Unable to handle kernel NULL pointer dereference at virtual address 00000020
[  106.947156] pgd = c0004000
[  106.955749] [00000020] *pgd=00000000
[  106.965210] Internal error: Oops: 17 [#1] PREEMPT ARM
[  106.976166] Modules linked in: i2c_dev evdev i2c_bcm2708 spi_bcm2835 bcm2835_gpiomem regmap_mmio uio_pdrv_genirq uio
[  106.992975] CPU: 0 PID: 1174 Comm: usb-storage Not tainted 4.1.13-piCore+ #1
[  107.006118] Hardware name: BCM2708
[  107.015538] task: d5a55280 ti: d59c6000 task.ti: d59c6000
[  107.027074] PC is at dwc_otg_hcd_qh_free+0x38/0xf0
[  107.038030] LR is at DWC_SPINLOCK_IRQSAVE+0x24/0x44
[  107.049024] pc : [<c0437150>]    lr : [<c043d95c>]    psr: 00000093
[  107.049024] sp : d59c7d18  ip : d59c7d00  fp : d59c7d3c
[  107.072780] r10: 00000000  r9 : 00000000  r8 : 00000001
[  107.083985] r7 : d9966c00  r6 : d58abc60  r5 : d58abc68  r4 : 00000000
[  107.096413] r3 : d59c6000  r2 : 00000001  r1 : 00000000  r0 : 00000010
[  107.108707] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  107.121755] Control: 00c5387d  Table: 14cb8008  DAC: 00000015
[  107.133080] Process usb-storage (pid: 1174, stack limit = 0xd59c6188)
[  107.145135] Stack: (0xd59c7d18 to 0xd59c8000)
[  107.155073] 7d00:                                                       d59c7d3c 60000013
[  107.168780] 7d20: 00000000 d9966c00 d58abc60 d58abc68 d59c7d64 d59c7d40 c042fa3c c0437124
[  107.182432] 7d40: c0408ac0 60000013 d5887570 d59b3800 d5835f88 d59b3800 d59c7d7c d59c7d68
[  107.196117] 7d60: c04330f8 c042f99c c04330d0 d5887570 d59c7d8c d59c7d80 c0408828 c04330dc
[  107.209858] 7d80: d59c7da4 d59c7d90 c040b250 c0408808 00000030 00000001 d59c7dcc d59c7da8
[  107.223693] 7da0: c040b2a4 c040b1c4 d5890e00 d59b3800 d5890e00 d5835f88 00000004 d5890800
[  107.237570] 7dc0: d59c7e54 d59c7dd0 c0402abc c040b264 00000001 00000000 00000000 00000000
[  107.251507] 7de0: 00001388 d59c7de0 d99af200 d5890e00 d594ea00 0000000d d59b3940 00000000
[  107.265506] 7e00: d99afaf4 d99af200 00000000 00000000 00000012 01123500 00000200 14cd4000
[  107.279575] 7e20: 0300125c 01020301 c03ff7a4 d9cf22f0 d9cf22f0 00000012 00000003 00000006
[  107.293718] 7e40: 0000000c 00000000 d59c7e6c d59c7e58 c0440a20 c0402464 d9cf22f0 d5982600
[  107.307962] 7e60: d59c7f04 d59c7e70 c0440ce0 c04409c8 00000012 d59c7e80 c0048fe8 00000000
[  107.322215] 7e80: ffffffff d5a55280 da8d9b80 00000000 00000002 0001e000 c059000a daacd7e0
[  107.336468] 7ea0: d726d600 0000001d 0000001d 0001e000 0001e000 00000000 00000003 00000012
[  107.350755] 7ec0: 00000000 00000000 daf1780e 00000a80 00000012 00000000 00100100 d9cf22f0
[  107.365061] 7ee0: d59c6000 d9cf23a8 00000000 ffffff80 00000000 00000000 d59c7f14 d59c7f08
[  107.379341] 7f00: c043f6c0 c0440a3c d59c7f64 d59c7f18 c0442058 c043f6b4 60000013 a0000013
[  107.393598] 7f20: d59c7f3c d59c7f30 d59c6000 d58b0be0 d9cf22f0 c0441e5c 00000000 00000000
[  107.407866] 7f40: d59c7f64 00000000 d58b0be0 d9cf22f0 c0441e5c 00000000 d59c7fac d59c7f68
[  107.422117] 7f60: c0041c9c c0441e68 d59c7f94 00000000 c0048fe8 d9cf22f0 00000000 d59c7f7c
[  107.436411] 7f80: d59c7f7c 00000000 d59c7f88 d59c7f88 d58b0be0 c0041bc0 00000000 00000000
[  107.450670] 7fa0: 00000000 d59c7fb0 c000fa78 c0041bcc 00000000 00000000 00000000 00000000
[  107.464883] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  107.479035] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 1bffa821 1bffac21
[  107.493188] [<c0437150>] (dwc_otg_hcd_qh_free) from [<c042fa3c>] (dwc_otg_hcd_endpoint_disable+0xac/0xc0)
[  107.508780] [<c042fa3c>] (dwc_otg_hcd_endpoint_disable) from [<c04330f8>] (endpoint_disable+0x28/0x34)
[  107.524191] [<c04330f8>] (endpoint_disable) from [<c0408828>] (usb_hcd_disable_endpoint+0x2c/0x30)
[  107.539346] [<c0408828>] (usb_hcd_disable_endpoint) from [<c040b250>] (usb_disable_endpoint+0x98/0xa0)
[  107.554955] [<c040b250>] (usb_disable_endpoint) from [<c040b2a4>] (usb_disable_interface+0x4c/0x64)
[  107.570392] [<c040b2a4>] (usb_disable_interface) from [<c0402abc>] (usb_reset_device+0x664/0x7e0)
[  107.585673] [<c0402abc>] (usb_reset_device) from [<c0440a20>] (usb_stor_port_reset+0x64/0x74)
[  107.600646] [<c0440a20>] (usb_stor_port_reset) from [<c0440ce0>] (usb_stor_invoke_transport+0x2b0/0x5b8)
[  107.616640] [<c0440ce0>] (usb_stor_invoke_transport) from [<c043f6c0>] (usb_stor_transparent_scsi_command+0x18/0x1c)
[  107.633728] [<c043f6c0>] (usb_stor_transparent_scsi_command) from [<c0442058>] (usb_stor_control_thread+0x1fc/0x2f0)
[  107.650838] [<c0442058>] (usb_stor_control_thread) from [<c0041c9c>] (kthread+0xdc/0xf8)
[  107.665475] [<c0041c9c>] (kthread) from [<c000fa78>] (ret_from_fork+0x14/0x3c)
[  107.679169] Code: e24b1020 eb0019fb e5b51008 e1510005 (e5914020)
[  107.691750] ---[ end trace d9bbadd0257550e1 ]---
[  107.702784] note: usb-storage[1174] exited with preempt_count 1

    [EDIT]: Added code tags.  Rich
« Last Edit: January 10, 2016, 05:07:54 PM by Rich »

Offline aw

  • Newbie
  • *
  • Posts: 45
Re: USB SDCARD reader
« Reply #7 on: January 11, 2016, 09:09:49 AM »
Hi @georgp24, perhaps you can try increasing the current output on the Pi (Pi2 / B+ only). You can do this by adding:

Code: [Select]
max_usb_current=1 as the last line in config.txt. The file should be in /mnt/mmcblk0p1 if you mount that partition (your RPi's boot partition).

This will double the amperage from 0.6 to 1.2A - normally useful to power external USB hard drives.
github.com/aw

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: USB SDCARD reader
« Reply #8 on: January 11, 2016, 02:48:18 PM »
HI

You could try the two different SD-card controllers available.
So try in config.txt to add:

dtoverlay=sdhost

and if it is not working good try the other:

dtoverlay=mmc

I can't remember which one is used as default.