Friday, August 17, 2018

Debian Stretch: Scanner and Sane

For old scanner like my Umax 3450, it is impossible to get windows x64 driver. Its driver only available for windows 32. Manufacture refuse to build windows x64 driver.
But it does not matter in Linux in my case Debian. It will available in both Debian x64 and x32.

To list your scanner detected by Debian

# lsusb
Bus 001 Device 003: ID 0408:0f21 Quanta Computer, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 18e8:6260 Qcom
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 1606:0060 Umax Astra 3400/3450
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Use Sane to detect your scanner

# sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x1606 [UMAX], product=0x0060 [USB SCANNER], chip=LM9832/3) at libusb:002:004
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

To list available scanner to use

# scanimage -L
device `plustek:libusb:002:004' is a UMAX 3450 flatbed scanner

To use your default scanner to scan image

# scanimage >image.pnm
or use XSane to use your scanner

References:
  • https://wiki.debian.org/Scanner

Thursday, August 16, 2018

Debian Stretch: SD Card and Micro SD Card on Adapter

To find SD Card:

Way 1:

# df -l
Filesystem     1K-blocks    Used Available Use% Mounted on
...
/dev/mmcblk0p1   1923388  726864   1196524  38% /media/dedetok/AC20-AD23

Way 2:

# parted -l
....
Model: SD 00000 (sd/mmc)
Disk /dev/mmcblk0: 7888MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number  Start   End     Size    Type     File system  Flags
1      1049kB  7888MB  7887MB  primary  fat32        boot, lba

Way 3:

# fdisk -l
...
Disk /dev/mmcblk0: 7.4 GiB, 7888437248 bytes, 15407104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *     2048 15407103 15405056  7.4G  c W95 FAT32 (LBA)

To Format your SD Card

Format SD Card VFAT
1. Umount SD Card
# umount /dev/mmcblk0p1
2. Format SD Card vfat format
# mkfs.vfat /dev/mmcblk0p1

Tested on Debian 9.4 x64