Changes between Version 3 and Version 4 of Docs/Prog/Manual/DeviceSupport/DIO


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

--

Legend:

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

    v3 v4  
    321321}}}
    322322
    323 == USB Support ==
    324 The [wiki:WikiStart Cardinal 825] supports many USB devices such as Flash Drives, Printers (Cardinal supported only!), keyboards, and mice.
    325 
    326 === USB Mass Storage ===
    327 The 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:
    328 
    329 [[Image(usb_insert.jpg)]]
    330 
    331 Use the mount command to access files on the USB flash drive:
    332 
    333 {{{
    334 mount –t vfat /dev/sda1 /mnt/fl1
    335 }}}
    336 The files will then appear in the path /mnt/fl1 such as:
    337 
    338 [[Image(usb_mount.jpg)]]
    339 
    340 The 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.
    341 
    342 [[Top]]
    343 
    344 === USB Keyboards ===
    345 As of kernel 2008-11-13 many USB keyboards should work with the 825. Simply plug the keyboard into an 825 USB connection.
    346 
    347 [[Image(usb_keyboard.jpg)]]
    348 
    349 Applications 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:
    350 
    351 {{{
    352 # cat /dev/usbkybd
    353 }}}
    354 Output:
    355 
    356 [[Image(usb_keyboard_test.jpg)]]
    357 
    358 The characters typed on the USB keyboard should show on the serial port terminal.
    359 
    360 [[Top]]
    361 
    362 === USB Printing ===
    363 usblp.ko device driver module for usb printing support. Type:
    364 
    365 {{{
    366 # modprobe usblp
    367 }}}
    368 Kernel should be configured with /dev/usblp0 device node. If not type:
    369 
    370 {{{
    371 # mknod /tmp/usblp0 c 180 0
    372 }}}
    373 ''/dev is in read-only file system so device node can be created under /tmp instead''
    374 
    375 This 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.
    376 
    377 A simple test is:
    378 
    379 {{{
    380 # echo “ABCDEFGH” > /dev/usblp0
    381 '''or'''
    382 # echo “ABCDEFGH” > /tmp/usblp0
    383 }}}
    384 ''Applications may be written to open “/dev/usblp0” to print to USB printer 0 instead of “/dev/ttyS1” to open COM2''
    385 
    386 ==== Successful Tests ====
    387  * Okidata Microline 320 Turbo - ''Older versions of this printer do not have USB port''
    388  * Hewlett Packard !DeskJet 830C - ''Does not print page until filled so extra line feeds are required to fill the page to finish the print''
    389 
    390 ==== Currently Developing ====
    391  * HP !LaserJet P1020
    392 
    393 ==== Unsuccessful ====
    394  * 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''
    395 
    396 [[Top]]
    397 
    398 === USB to PC communications ===
    399 To load the driver for USB to PC communications type:
    400 
    401 {{{
    402 # modprobe g_serial use_acm=1
    403 }}}
    404 When 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”
    405 
    406 When 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).
    407 
    408 On the serial connection to the indicator type:
    409 
    410 {{{
    411 # echo “abcdefg” > /dev/ttygserial
    412 }}}
    413 “abcdefg” will then appear on the Hyperterm display.
    414 
    415 In HyperTerminal, type:
    416 
    417 {{{
    418 123456
    419 }}}
    420 On the serial connection to the indicator type:
    421 
    422 {{{
    423 # cat < /dev/ttygserial
    424 }}}
    425 The received characters “123456” from the PC will then be displayed.
    426 
    427 [[Top]]