TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup...

15

Click here to load reader

Transcript of TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup...

Page 1: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10

First Edition: March 9, 2010

Page 2: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

Table of Contents

1. Introduction................................................................................................................................... 1 2. Folder Structure of Release Kit ................................................................................................... 2 3. Installation of TTEC Linux Drivers.............................................................................................. 5

3.1 Preparation .............................................................................................................................. 5 3.2 Setup for some drivers........................................................................................................... 6 3.3 PS/2 POS Keyboard ................................................................................................................ 7 3.4 USB POS Keyboard ................................................................................................................ 7 3.5 LIU............................................................................................................................................. 8 3.6 LIU WD-111......................................................エラー! ブックマークが定義されていません。 3.7 USB iButton ............................................................................................................................. 9 3.8 CashDrawer ............................................................................................................................. 9 3.9 MCR .......................................................................................................................................... 9 3.10 USB POS Printer ................................................................................................................. 10 3.11 RS232C POS Printer............................................................................................................ 10 3.12 WatchDogTimer....................................................................................................................11 3.13 Sensor ...................................................................................................................................11

4. Demo Application Setup ............................................................................................................ 12 Copyright © 2010 Toshiba TEC Corporation All rights reserved. It is prohibited to use or duplicate a part or whole of this document without the permission of Toshiba TEC Corporation. This document is subject to change without prior notice. Trademark Notification * Linux is a registered trademark of Linus Torvalds. * SUSE is a trademark of Novell. * iButton is a registered trademark of Dallas Semiconductor Corp. Dallas Semiconductor is a wholly

owned subsidiary of Maxim Integrated Products, Inc. * All other product names mentioned in this document are trademarks or registered trademarks of their

respective owners.

Page 3: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

1

1. Introduction This document describes the procedures and cautions for installing the Linux drivers developed by Toshiba TEC Corporation (TTEC) on the ST-B10(SUSE Linux Enterprise Desktop 11 pre-installation environment). Refer to each specifications for the usage of a driver. Roughly this document consists of the following two parts:

1) Folder structure of release kit 2) Installation of TTEC drivers

Page 4: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

2

2. Folder Structure of Release Kit . | +---drawer | +---document (drawer driver specification) | | LinuxDrwSpec.pdf | | | +---module (drawer driver module) | | drw.ko | | | \---source (drawer driver source) | drw.c | Makefile | tec_drw.h | +---compatkbd | +---module (Keyboard interchangeable driver module) | | compat_keyb.ko | | | \---source (Keyboard interchangeable driver source) | compat_keyb.c | Makefile | +---ibutton | +---document (USB iButton driver specification) | | LinuxUSBi-ButtonSpec.pdf | | | +---module (USB iButton driver module) | | usbibutton.ko | | | \---patch (USB iButton w1 driver patch) | ds2490.h | tec_w1-2.6.27.patch | w1-patch-install.sh | | \---source (USB iButton driver source) | ds2490.h | load_usbibutton | Makefile | tec_usbibutton.c | tec_usbibutton.h | unload_usbibutton | w1.h | w1_family.h | w1_int.h | +---liust | +---document (LIU library specification) | | LinuxLIUSpec.pdf | | | +---module (LIU library module) | | libliuctrl.so.0.0 | | | \---source (LIU library source) | ftokex2.c | liuctrl.def

Page 5: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

3

| liuctrl.h | liuctrl_misc.h | liu_cgw.c | liu_cmn.c | liu_cmn.h | liu_ctl.c | liu_exc.c | liu_exc2.c | liu_getcommerrcount.c | liu_img.c | liu_init.c | liu_initex.c | liu_param.h | liu_scr.c | liu_setcommerrcount.c | liu_trimark.c | Makefile | str_blink.c | str_hr_double.c | str_reverse.c | tec_serial.h | _fini.c | +---liuwd111 | +---document (LIU WD-111 library specification) | | Linux WD-111 LineDisplay Library Spec.pdf | | | +---module (LIU WD-111 library module) | | libliuctrl.so.0.0 | | | \---source (LIU WD-111 library source) | liuwd111.h | liuwd111_sub.h | Makefile | wd111.c | wd111_sub.c | +---patch (Keyboard driver patch) | tec_kbd-2.6.27.patch | +---ps2poskbd | +---document (PS/2 POS keyboard driver specification) | | LinuxPOSKBSpec.pdf | | | +---module (PS/2 POS keyboard driver module) | | poskbd.ko | | | \---source (PS/2 POS keyboard driver source) | Makefile | tec_poskbd.c | tec_poskbd.h | tec_poskbdinc.h | +---sensor | +---document (Sensor driver specification) | | ST-B20_Linux Sensor Driver Spec_1st.pdf | |

Page 6: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

4

| +---module (Sensor driver module) | | sensor.ko | | | \---source (Sensor driver source) | Makefile | tec_sensor.c | tec_sensor.h | tec_sensor_def.h | +---tecusb | +---tecusbdrv | | +---module (General-purpose USB driver specification) | | | tecusbd.ko | | | | | \---source (General-purpose USB driver source) | | Makefile | | tecusbd.c | | tecusbd.h | | tecusbd_def.h | | | \---tecusblib | +---module (General-purpose USB driver module) | libtecusb.so.0.0 | +---usbposkbd | +---module (USB POS keyboard driver module) | | poskbd.ko | | | \---source (USB POS keyboard driver source) | Makefile | tec_poskbd.c | tec_poskbd.h | tec_poskbdinc.h | \---watchdog +---document (Watch dog timer driver specification) | Linux WatchDogTimer Driver Spec.pdf | +---module (Watch dog timer driver module) | watchdog.ko | \---source (Watch dog timer driver source) Makefile watchdog.c

Page 7: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

5

3. Installation of TTEC Linux Drivers 3.1 Preparation Create a directory path “/home/tec/tecdrv” and copy the following files from the ST-B10 driver kit CD-ROM to “/home/tec/tecdrv”.

[Patch file for keyboard driver] /SLED11/patch/tec_kbd-2.6.27.patch

[Patch file for w1 driver of Linux kernel for iButton driver]

/SLED11/ibutton/patch/ds2490.h /SLED11/ibutton/patch/tec_w1-2.6.27.patch /SLED11/ibutton/patch/w1-patch-install.sh

[PS/2 POS keyboard driver module]

/SLED11/poskbd/module/poskbd.ko [USB POS keyboard driver module]

/SLED11/usbposkbd/module/usbposkbd.ko [Keyboard compatible driver module]

/SLED11/compatkbd/module/compat_keyb.ko

[LIUST-5x library module] /SLED11/liust/module/libliuctrl.so.0.0

[LIUWD-111 library module]

/SLED11/liuwd111/module/libwd111.so.0.0

[USB iButton driver module] /SLED11/ibutton/module/usbibutton.ko /SLED11/ibutton/source/load_usbibutton

[Drawer driver module]

/SLED11/drawer/module/drw.ko [General-purpose USB module]

/SLED11/tecusb/tecusbdrv/module/tecusbd.ko /SLED11/tecusb/tecusblib/module/libtecusb.so.0.0

[WatchDogTimer driver module]

/SLED11/watchdog/module/watchdog.ko

[Sensor driver module] /SLED11/sensor/module/sensor.ko

Follow the procedure below after logging in as a root user.

Page 8: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

6

3.2 Setup for some drivers It is a required setup when using the driver of the following device. When the following device drivers are used, execute this procedure in advance. [Target Device]

• iButton driver • PS/2 POS Keyboard driver • USB POS Keyboard driver

[Patch application to Keyboard driver of Linux Kernel] The source file of a keyboard driver is rewritten using “tec_kbd-2.6.27.patch” file.

/usr/src/linux/drivers/input/keyboard/atkbd.c /usr/src/linux/drivers/input/serio/i8042.c /usr/src/linux/drivers/char/keyboard.

Execute the following command. Then, a patch is applied and a source file can be rewritten.

]# cp -p /home/tec/tecdrv/tec_kbd-2.6.27.patch /usr/src/linux/ ]# cd /usr/src/linux/ ]# patch -b -p0 < tec_kbd-2.6.27.patch

[Patch application to w1 driver of Linux Kernel for TTEC iButton driver] Execute the following command, when using the iButton driver developed by TTEC.

]# cd /home/tec/tecdrv/ ]# ./w1-patch-install.sh

Note: The source file of a w1 driver is rewritten using “tec_w1-2.6.27.patch” file. /usr/src/linux/drivers/w1/masters/ds2490.c

Rebuild a kernel, after these two procedures are completed. Cautions : Rebuild a kernel takes several hours. [How to rebuild the kernel] Execute the following commands in order from the top:

]# cd /usr/src/linux/ Movement to a directory with the source file of a kernel. ]# make oldconfig Obtains configuration information of the kernel in operation. ]# make clean Deletes all interim files. ]# make Complies the kernel and driver modules. ]# make install Installs the kernel. ]# make modules_install Installs the drivers.

Page 9: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

7

Finally, restart the operating system. [The Keyboard compatible driver's installation] If a keyboard compatible driver is installed, “setkeycodes” command can be executed even when a PS/2 keyboard has not been connected. Execute the following command to install a Keyboard compatible driver after rebuild a kernel.

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

Note: It is necessary to execute this procedure ahead of the procedure since 3.3. Installation of module

]# insmod /home/tec/tecdrv/compat_keyb.ko 3.3 PS/2 POS Keyboard Execute the following commands in order to install the PS/2 POS keyboard driver. This procedure is necessary to operate MCR and Keylockattached to PKBST-50. [Supported Product] PKBST-50

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

Note: The simultaneous use with USB POS Keyboard is impossible. 1. Installation of driver module

]# insmod /home/tec/tecdrv/poskbd.ko 2. Creation of device file

]# mknod /dev/poskbd c 243 0

3. Keycode configuration [MCR]

]# setkeycodes 0x61 121 [Keylock]

]# setkeycodes 0x63 123 3.4 USB POS Keyboard Execute the following commands in order to install the USB POS keyboard driver. This procedure is necessary to operate MCR and Keylockattached to PKBST-52. [Supported Product] PKBST-52

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

Page 10: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

8

Note: In case of the simultaneous use with USB POS Printer, install usbposkbd.ko before installing tecusbd.ko.

Note: The simultaneous use with PS/2 POS Keyboard is impossible. 1. Installation of driver module

]# insmod /home/tec/tecdrv/usbposkbd.ko 2. Keycode configuration [MCR]

]# setkeycodes 0x61 121 [Keylock]

]# setkeycodes 0x63 123 3.5 LIU Execute the following commands in order and register the LIU library to SharedLibrary. [Supported Product] LIUST-A10 LIUST-51 LIUWD-111

Note: Once a driver is registered to SharedLibrary, the library is automatically loaded at the startup of operating system.

[Case : LIUST-A10 / LIUST-51]

1. Copy of file to the SharedLibrary folder ]# cp -p /home/tec/tecdrv/libliuctrl.so.0.0 /usr/lib/

2. Registration of library to SharedLibrary

]# ldconfig -n /usr/lib/

3. Creation of symbolic link ]# ln -s /usr/lib/libliuctrl.so.0.0 /usr/lib/libliuctrl.so

[Case : LIUWD-111]

1. Copy of file to the SharedLibrary folder ]# cp -p /home/tec/tecdrv/libwd111.so.0.0 /usr/lib/

2. Registration of library to SharedLibrary

]# ldconfig -n /usr/lib/

3. Creation of symbolic link ]# ln -s /usr/lib/libwd111.so.0.0 /usr/lib/libwd111.so

Page 11: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

9

3.7 USB iButton Before installing the USB iButton driver, connect the USB iButton adapter. After the USB iButton adapter is connected, the “ds2490.ko” file, required for installing the iButton driver, is automatically installed. Using the lsmod command, make sure the iButton driver has been installed. Then, execute the following commands in order. [Supported Product] KITST-A10-BTNK

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

1. Execution of script to load USB iButton driver

]# cd /home/tec/tecdrv/ ]# chmod 777 load_usbibutton ]# ./load_usbibutton

2. Keycode configuration

]# setkeycodes 0x68 93 3.8 CashDrawer Execute the following commands in order to install the drawer driver. [Supported Product] DRWST-51 DRWST-56

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

1. Installation of driver module

]# insmod /home/tec/tecdrv/drw.ko port=0x448 postype=2 2. Creation of device file

]# mknod /dev/drw c 242 0 3.9 MCR [Supported Product] MCRST-A10 MCRST-50 MCRST-52 [Case : MCRST-A10]

No settings are required for a POS printer because the Linux standard serial driver is used. [Case : MCRST-50]

Page 12: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

10

Refer to “3.3 PS/2 POS Keyboard”. [Case : MCRST-52]

Refer to “3.4 USB POS Keyboard”. 3.10 USB POS Printer Execute the following commands in order to use the USB POS Printer. [Supported Product] TRST-A00-U TRST-A10-U

TRST-A15-U

Note: Once a driver is registered to SharedLibrary, the driver is automatically loaded at the startup of operating system.

1. Copy of file to the SharedLibrary folder

]# cp -p /home/tec/tecdrv/libtecusb.so.0.0 /usr/lib/

2. Registration of library to SharedLibrary ]# ldconfig -n /usr/lib/

3. Creation of symbolic link ]# ln -s /usr/lib/libtecusb.so.0.0 /usr/lib/libtecusb.so Note: Restarting the operating system clears this setting. The following procedure must be

performed whenever the operating system is restarted. 4. Installation of driver module

]# insmod /home/tec/tecdrv/tecusbd.ko 3.11 RS232C POS Printer the Linux standard serial driver is used. [Supported Product] TRST-A00-S TRST-A10-S

TRST-A15-S In order to operate a printer, it is necessary to execute the following command and to unite the baudrate of OS with a printer. How to set the baud rate of OS (Example)

]# stty –F /dev/ttyS1 speed 115200

Page 13: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

11

3.12 WatchDogTimer Execute the following commands in order to install the drawer driver.

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

Note: It is necessary to set up BIOS in advance and to enable a WatchDogTimer function. Installation of driver module

]# insmod /home/tec/tecdrv/ watchdog.ko t1=** t2=** postype=1 loglvl=** 3.13 Sensor Execute the following commands in order to install the sensor driver.

Note: Restarting the operating system clears this setting. The procedure must be performed whenever the operating system is restarted.

1. Installation of driver module

]# insmod /home/tec/tecdrv/sensor.ko 2. Creation of device file

]# mknod /dev/sensor c 248 0

Page 14: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

12

4. Demo Application Setup Execute the following commands in order to execute Demo Application. [Demo Application minimum requirement]

1. libglitz.so.1 is been already installed by SUSE Linux Enterprise Software Development Kit 11. http://download.novell.com/Download?buildid=fQKpDcAhPVY~

2.The following 3 libraries is already been installed. libliuctrl.so.0.0 libwd111.so.0.0 libtecusb.so.0.0

Page 15: TTEC Linux Driver Setup Guide for ST-B10 - TOSHIBA … Linux Driver... · TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018 1 1. Introduction This document

TTEC Linux Driver Setup Guide for ST-B10 TOSHIBA TEC CORPORATION EAA-03018

13

1. Copy of file to the demo application zip file

]# cp -p /media/ST-B10LinuxV1000/SLED11/demo/sle11-demo.zip /home/tec/

2. Decompression of demo application package ]# unzip /home/tec/sle11-demo.zip

3. Execute Demo Application ]# /home/tec/demo/bin/demo.exe &