[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: USB card reader



Dear,

I got the USB card reader works!!!

To make it work, you need to
1) Compile kernel with USB, SCSI, USB mass storage, DOS FAT fs, MSDOS fs,
VFAT fs, PC BIOS(MSDOS partitation table)
2) Add the /dev/sda, /dev/sda1, ...  into the
packages/devices/axis-2.4/Makefile
3) after boot, add the entries in /etc/fstab:
   /dev/sda1 /etc/usbcard vfat rw,auto,user,exec 0 0
4)
   echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi
   echo "scsi add-single-device 0 0 0 1" > /proc/scsi/scsi
   echo "scsi add-single-device 0 0 0 2" > /proc/scsi/scsi
   echo "scsi add-single-device 0 0 0 3" > /proc/scsi/scsi
   (the first digit may vary if you are using a USB hub)
5) run 'mount /dev/sda1'


-----Original Message-----
From: Orjan Friberg [mailto:orjan.friberg@xxxxxxx.com]
Sent: Monday, September 29, 2003 5:52 PM
To: Kenny Ng
Cc: dev-etrax
Subject: Re: USB card reader


Kenny Ng wrote:
> I add SCSI, USB and USB mass storage support and follow the
> http://mhonarc.axis.se/dev-etrax/msg03231.html  post, use latest
> usb-host.c and usb-host.h
>
> re-compile the kernel and when plug the USB card reader, I got following
> kernel messages:
>
> scsi0 : SCSI emulation for USB Mass Storage devices
>   Vendor:           Model: USB Card Reader   Rev: 1.06
>   Type:   Direct-Access                      ANSI SCSI revision: 02
> Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
> sda : READ CAPACITY failed.
> sda : status = 1, message = 00, host = 0, driver = 08
> Current sd00:00: sns = 70  2
> ASC=3a ASCQ= 0
> Raw sense data:0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00
> 0x00
> 0x3a 0x00 0x00 0x00 0x00 0x00
> sda : block size assumed to be 512 bytes, disk size 1GB.
> Partition check:
>  sda: unknown partition table
> WARNING: USB Mass Storage data integrity not assured
> USB Mass Storage device found at 3

An IDE-related problem with the message "unknown partition table", was
solved by what is suggested in
http://mhonarc.axis.se/dev-etrax/msg03110.html.

As I haven't tried any of these USB card readers myself, I can't say if
the other messages are any cause for alarm.  Maybe you can search the
linux-usb-users mailing list (one searchable archive of the list is
available at http://marc.theaimsgroup.com/?l=linux-usb-users&r=1&w=2).
Do you get similar messages when running the device on a Linux host PC?

> Am I missing something in my kernel configuration?

Probably not in the kernel configuration, but I forgot to say you need
to create a device node for SCSI.  For example, you can add something
like this to your packages/devices/axis-2.4/Makefile (each line
beginning with a tab):

         $(MKNOD) -m 0664 -g disk   $(DEV)/sda       b   8   0
         $(MKNOD) -m 0664 -g disk   $(DEV)/sda1      b   8   1
         $(MKNOD) -m 0664 -g disk   $(DEV)/sda2      b   8   2
         $(MKNOD) -m 0664 -g disk   $(DEV)/sda3      b   8   3
         $(MKNOD) -m 0664 -g disk   $(DEV)/sda4      b   8   4


and then do a 'make install' in that directory, and the node should be
created.  (Since the root file system is read-only, you can't do a
'mknod' on the board itself.)

--
Orjan Friberg
Axis Communications