Changes between Version 1 and Version 2 of Docs/Prog/Manual/DeviceSupport/USB


Ignore:
Timestamp:
11/30/09 09:32:01 (15 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/DeviceSupport/USB

    v1 v2  
    1 == USB ==
     1== USB Support ==
     2The [wiki:WikiStart Cardinal 825] supports many USB devices such as Flash Drives, Printers (Cardinal supported only!), keyboards, and mice.
     3
     4=== USB Mass Storage ===
     5The 825 supports USB flash storage devices formatted with the FAT (file allocation table) and FAT32 file systems. From the serial command line when a USB storage device is inserted the display will appear similar to:
     6
     7[[Image(usb_insert.jpg)]]
     8
     9Use the mount command to access files on the USB flash drive:
     10
     11{{{
     12mount –t vfat /dev/sda1 /mnt/fl1
     13}}}
     14The files will then appear in the path /mnt/fl1 such as:
     15
     16[[Image(usb_mount.jpg)]]
     17
     18The file manager may be used to access USB flash drives. When the /mnt/fl1 folder is selected the file manager will automatically perform the mount command.
     19
     20[[Top]]
     21
     22=== USB Keyboards ===
     23As of kernel 2008-11-13 many USB keyboards should work with the 825. Simply plug the keyboard into an 825 USB connection.
     24
     25[[Image(usb_keyboard.jpg)]]
     26
     27Applications using the lib825 functions such as [[lib825:source:trunk/kypdbeep.cpp#L78 ReadKeypad]] or [[lib825:source:trunk/form.cpp#L1027 FormLCD] will automatically work with the USB keyboard. To test the keyboard without any app running type some characters on the keyboard and type:
     28
     29{{{
     30# cat /dev/usbkybd
     31}}}
     32Output:
     33
     34[[Image(usb_keyboard_test.jpg)]]
     35
     36The characters typed on the USB keyboard should show on the serial port terminal.
     37
     38[[Top]]
     39
     40=== USB Printing ===
     41usblp.ko device driver module for usb printing support. Type:
     42
     43{{{
     44# modprobe usblp
     45}}}
     46Kernel should be configured with /dev/usblp0 device node. If not type:
     47
     48{{{
     49# mknod /tmp/usblp0 c 180 0
     50}}}
     51''/dev is in read-only file system so device node can be created under /tmp instead''
     52
     53This creates the character device driver with major number 180 and minor number 0. This should work unmodified with USB printers that accept raw text for printing using a default font.
     54
     55A simple test is:
     56
     57{{{
     58# echo “ABCDEFGH” > /dev/usblp0
     59'''or'''
     60# echo “ABCDEFGH” > /tmp/usblp0
     61}}}
     62''Applications may be written to open “/dev/usblp0” to print to USB printer 0 instead of “/dev/ttyS1” to open COM2''
     63
     64==== Successful Tests ====
     65 * Okidata Microline 320 Turbo - ''Older versions of this printer do not have USB port''
     66 * Hewlett Packard !DeskJet 830C - ''Does not print page until filled so extra line feeds are required to fill the page to finish the print''
     67
     68==== Currently Developing ====
     69 * HP !LaserJet P1020
     70
     71==== Unsuccessful ====
     72 * HP !LaserJet P1006 - ''Research indicates this printer requires host to send firmware update file to printer, and does not accept raw text but requires XQX stream protocol''
     73
     74[[Top]]
     75
     76=== USB to PC communications ===
     77To load the driver for USB to PC communications type:
     78
     79{{{
     80# modprobe g_serial use_acm=1
     81}}}
     82When the 825 is connected to the PC it will be recognized by the PC and if the driver is not already installed it will prompt for it. Refer to “gadget_serial.txt”
     83
     84When the driver is installed the PC will appear to have another COM port. For testing on the PC you can then open a communications program such as HyperTerminal and set it to the appropriate COM port (which is actually a USB connection).
     85
     86On the serial connection to the indicator type:
     87
     88{{{
     89# echo “abcdefg” > /dev/ttygserial
     90}}}
     91“abcdefg” will then appear on the Hyperterm display.
     92
     93In HyperTerminal, type:
     94
     95{{{
     96123456
     97}}}
     98On the serial connection to the indicator type:
     99
     100{{{
     101# cat < /dev/ttygserial
     102}}}
     103The received characters “123456” from the PC will then be displayed.
     104
     105[[Top]]