# Put to work my SD card reader



## suhijo (Apr 3, 2015)

EHLO

I need to read a SD card on my laptop, I thought it was broken because I can not see info about it when in plug it in, or even running commands like `dmidecode`, `pciconf -lv` and I cannot find any info about a SD card reader on `dmesg`. Also if I run


```
kldload mmcsd sdhci mmc
kldload: can't load mmcsd: File exists
kldload: can't load sdhci: File exists
kldload: can't load mmc: File exists
```

On Windows in the same laptop is detected normally so what can I do?


----------



## wblock@ (Apr 3, 2015)

The File exists messages mean those modules have already been loaded, probably because they were built into the kernel.

Not all card readers are supported.  If it is, /dev/da devices will probably be present.  Cards can be detected after connecting them by forcing the geom system to "taste" them: `true > /dev/da7`.

Some notebooks might have the card reader connected internally to USB, so it will only appear in `usbconfig` output.


----------



## suhijo (Apr 3, 2015)

`usbconfig` display my Camera and a "USB2.0-CRW Generic" device, so I assume that's the SD card reader? If so, what should I do to mount it?


----------



## chrbr (Apr 3, 2015)

Please have a look at https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/usb-disks.html. It describes how it works and how to make it user friendly for daily use. The text below is related to the function only.

First please confirm that the camera really appears as /dev/da0 using dmesg(8) as described in the handbook. Then mount the device as root `mount -t msdosfs -o large /dev/da0s1 /mnt`. The first option msdosfs is related to the most likely format. The second option is required if the size of the device exceeds a certain threshold. And it is /dev/da0s1 because it is usually the first and only slice/partition of the device. Please do not forget to unmount the device after everything is done.


----------



## suhijo (Apr 4, 2015)

No, I did that already there is no such thing in `dmesg` and there is no da device. When I mentioned the camera I was talking about my laptop USB camera.  I do see something when I execute:

```
# camcontrol devlist
<WDC WD5000BPVT-80HXZT3 01.01A01>  at scbus0 target 0 lun 0 (pass0,ada0)
<MATSHITA DVD-RAM UJ8B0 1.00>  at scbus1 target 0 lun 0 (cd0,pass1)
<AHCI SGPIO Enclosure 1.00 0001>  at scbus2 target 0 lun 0 (pass2,ses0)
```


----------



## chrbr (Apr 4, 2015)

Dear suhijo,
I am sorry for my misunderstanding. I thought of a "normal" camera with integrated SD card which is usually connected by USB. I have no experience  with integrated SD card reader slots. Please excuse the noise.

EDIT: I have tried an external SD card reader. The output of dmesg(8) is as below.

```
ugen2.2: <Generic> at usbus2
umass0: <Bulk-In, Bulk-Out, Interface> on usbus2
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:4:0:-1: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <Generic- Multi-Card 1.00> Removable Direct Access SCSI-0 device
da0: Serial Number 20060413092100000
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
ugen2.2: <Generic> at usbus2 (disconnected)
umass0: at uhub3, port 4, addr 2 (disconnected)
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <Generic- Multi-Card 1.00> s/n 20060413092100000 detached
(da0:umass-sim0:0:0:0): Periph destroyed
ugen2.2: <Generic> at usbus2
umass0: <Bulk-In, Bulk-Out, Interface> on usbus2
umass0:  SCSI over Bulk-Only; quirks = 0x4000
umass0:4:0:-1: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <Generic- Multi-Card 1.00> Removable Direct Access SCSI-0 device
da0: Serial Number 20060413092100000
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
```
After inserting a card I see the devices as /dev/da0*. `usbconfig` shows

```
ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen3.1: <UHCI root HUB Intel> at usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen4.1: <UHCI root HUB Intel> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=SAVE (0mA)
ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <USB Optical Mouse Logitech> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (98mA)
ugen0.3: <product 0x0021 vendor 0x046a> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen2.2: <USB2.0-CRW Generic> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
```
which matches to your observation. Therefore it is strange that the devices do not appear in your system.


----------



## suhijo (Apr 6, 2015)

Yeah, it's kinda strange......:/


----------

