Linux USB Host

From Variscite Wiki
Revision as of 15:57, 27 December 2015 by Ron (talk | contribs)
DART-6UL USB Host

Plug a DiskOnKey, Mouse or Keyboard to any of the 3 USB host ports on the DVK.

Example DiskOnKey

Insert DiskOnKey:

usb 2-1.3: new high-speed USB device number 8 using ci_hdrc
usb-storage 2-1.3:1.0: USB Mass Storage device detected
scsi2 : usb-storage 2-1.3:1.0
scsi 2:0:0:0: Direct-Access     SanDisk  Cruzer Blade     2.01 PQ: 0 ANSI: 6
sd 2:0:0:0: [sdb] 7821312 512-byte logical blocks: (4.00 GB/3.72 GiB)
sd 2:0:0:0: [sdb] Write Protect is off
sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sdb: sdb1
sd 2:0:0:0: [sdb] Attached SCSI disk
FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

List directory

 $ ls /run/media/sdb1/
$RECYCLE.BIN                   bookmarks-2015-06-25.json
Android                        iMX6_gpio_test
LOST.DIR                       linux-3.2.0-psp04.06.00.11
LS1021_SOM                     tek00000.png
Movies                         tek00001.png
Mpeg                           tek00002.png
Music                          test0.wav
Playlists                      test2.wav
SanDiskSecureAccessV2.0        test3.wav
SanDiskSecureAccessV2_win.exe  testx.wav
System Volume Information      vmlinux
TIInit_11.8.32.bts             wifi_fw_android_working
VAR-SOM-AM33-SCHV212.DSN       wl1271-nvs.bin
am43-demo                      xorcom
apk                            zImage
backing_file

Write some data:

$ dd if=/dev/urandom of=/run/media/sdb1/junk bs=1M count=20 
20+0 records in
20+0 records out
20971520 bytes (21 MB) copied, 8.35507 s, 2.5 MB/s

Example FTDI

Inseret the FTDI device:

usb 2-1.2: USB disconnect, device number 4
usb 2-1.2: new full-speed USB device number 7 using ci_hdrc
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
ftdi_sio 2-1.2:1.0: FTDI USB Serial Device converter detected
usb 2-1.2: Detected FT232RL
usb 2-1.2: Number of endpoints 2
usb 2-1.2: Endpoint 1 MaxPacketSize 64
usb 2-1.2: Endpoint 2 MaxPacketSize 64
usb 2-1.2: Setting MaxPacketSize 64
usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

Connect to the target:

$ ssh root@192.168.1.130

Start minicom and set the interface

$ minicom -s

Minicom set.png

connect pin 2 to 3 on the serial port and test for loop-back.