Advertisement
Guest User

Untitled

a guest
Jul 21st, 2016
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.14 KB | None | 0 0
  1. =============================================================================
  2. MOXA UPort 1100 Series USB to Serial Hub Driver Installation Guide
  3. for Linux Kernel 2.4.20 and above
  4. Copyright (C) 2008, Moxa Inc.
  5. =============================================================================
  6. Date: 03/17/2008
  7.  
  8. CONTENTS
  9.  
  10. 0. Note
  11. 1. Introduction
  12. 2. System Requirements
  13. 3. Installation
  14. 3.1 Driver files
  15. 3.2 Device naming convention
  16. 3.3 Module driver configuration
  17. 3.4 Static driver configuration
  18. 3.5 Verify driver installation
  19. 4. Setserial
  20. 5. Troubleshooting
  21.  
  22. -----------------------------------------------------------------------------
  23. 0. Note
  24.  
  25. The MOXA UPort 1100 Series USB to Serial Hub driver can be used in the
  26. Linux kernel with the usbcore and usbserial modules. This two modules is
  27. built-in module in the Linux kernel version 2.4.x and follow.
  28. In the Linux kernel version, you must check this two build-in modules
  29. existed. Otherwise, you will fail to using MOXA UPort 1100 Series USB to
  30. Serial Hub driver.
  31.  
  32. -----------------------------------------------------------------------------
  33. 1. Introduction
  34.  
  35. The MOXA UPort 1100 Series USB to Serial Hub Linux driver supports following
  36. devices.
  37.  
  38. - UPort 1110, 1 port RS-232 USB to Serial Hub.
  39. - UPort 1130, 1 port RS-422/485 USB to Serial Hub.
  40. - UPort 1150, 1 port RS-232/422/485 USB to Serial Hub.
  41. - UPort 1150I, 1 port RS-232/422/485 USB to Serial Hub with isolation
  42. protection.
  43.  
  44. This driver supports x86 and x64(AMD64/EM64T) hardware platform. In
  45. order to maintain compatibility, this version has also been properly
  46. tested with several Linux distribution (see version.txt). However,
  47. if compatibility problem occurs, please contact Moxa Inc. technical
  48. support. (support@moxa.com)
  49.  
  50. All the drivers are published in form of source code under
  51. GNU General Public License in this version. Please refer to GNU General
  52. Public License announcement in each source code file for more detail.
  53.  
  54. This version of driver can be only installed as Loadable Module (Module
  55. driver). Before you install the driver, please refer to hardware installation
  56. procedure in the User's Manual.
  57.  
  58. -----------------------------------------------------------------------------
  59. 2. System Requirements
  60. - Hardware platform: x86, x64
  61. - Kernel version: 2.4.20 and above
  62. - gcc version 3.x
  63. - kernel source
  64.  
  65. -----------------------------------------------------------------------------
  66. 3. Installation
  67.  
  68. 3.1 Driver files
  69. 3.2 Device naming convention
  70. 3.3 Module driver configuration
  71. 3.4 Static driver configuration
  72. 3.5 Verify driver installation
  73.  
  74. 3.1 Driver files
  75.  
  76. The driver file may be obtained from CD-ROM or floppy disk. The
  77. first step, is to copy driver file
  78. "driv_linux2.4_uport1p_vx.x_build_yymmddhh.tgz" into specified directory. e.g.
  79. /moxa. The execute commands as below.
  80.  
  81. # cd /
  82. # mkdir moxa
  83. # cd /moxa
  84. # cp /dev/fd0/driv_linux2.4_uport1p_vx.x_build_yymmddhh.tgz
  85. # tar xvfz driv_linux2.4_uport1p_vx.x_build_yymmddhh.tgz
  86.  
  87. or
  88.  
  89. # cd /
  90. # mkdir moxa
  91. # cd /moxa
  92. # cp /mnt/cdrom/<driver directory>/driv_linux2.4_uport1p_vx.x_build_yymmddhh.tgz
  93. # tar xvfz driv_linux2.4_uport1p_vx.x_build_yymmddhh.tgz
  94.  
  95. *Note: yy = year, mm = month, dd = day, hh = hour
  96.  
  97. 3.2 Device naming convention
  98.  
  99. You may find all the driver files in /<driver directory>/mxu1100_24.
  100. Following installation procedure depends on the model you'd like to
  101. run the driver.
  102.  
  103. Dialin and callout port
  104. -----------------------
  105. This driver remains traditional serial device properties. Because the
  106. limitation of the usb build-in modules that are usbcore and usbserial,
  107. There is only one special file name for each serial port. This one is
  108. dial-in port which is named "ttyUSBxx".
  109.  
  110. 3.3 Module driver configuration
  111.  
  112. 3.3.1 Build the MOXA driver
  113. Before using the MOXA driver, you need compile the all the source
  114. code. This step is only need to be executed once.
  115. But you still re-compile the source code if you modify the source
  116. code.
  117.  
  118. Find "Makefile" in /moxa/mxu1100_24/driver, then run
  119.  
  120. # make clean; make install
  121.  
  122. The driver files "mxu1100_24.o" will be properly compiled
  123. and copied to system directories respectively.
  124.  
  125. 3.3.2 Load the MOXA driver
  126.  
  127. The driver will be loaded automatically while pluging the
  128. UPort 1110/1130/1150/1150I into you PC. Besides, you can load the
  129. driver manually.
  130.  
  131. # modprobe mxu1100_24
  132.  
  133. It will activate the module driver. You may run "lsmod" to check
  134. if "mxu1100_24" is activated. Before you load this module driver,
  135. you have to run "lsmod" to check if "usbcore" and "usbserial" are
  136. activated.
  137.  
  138. 3.4 Static driver configuration
  139.  
  140. Note: To use static driver, you must install the linux kernel
  141. source package.
  142.  
  143. 3.4.1 Check your Linux kernel source directory.
  144. For Red Hat 7.x user, you need to create link:
  145. # cd /usr/src
  146. # ln -s linux-2.4 linux
  147.  
  148. 3.4.2 Create link
  149. # cd /usr/src/linux-2.4/drivers/usb/serial/
  150. # ln -s /moxa/mxu1100_24/driver/mxu1100_24.c mxu1100_24.c
  151. # ln -s /moxa/mxu1100_24/driver/mxu1100_24.h mxu1100_24.h
  152. # ln -s /moxa/mxu1100_24/driver/mxu1110_fw.h mxu1110_fw.h
  153. # ln -s /moxa/mxu1100_24/driver/mxu1130_fw.h mxu1130_fw.h
  154. # ln -s /moxa/mxu1100_24/driver/mxu1150_fw.h mxu1150_fw.h
  155. # ln -s /moxa/mxu1100_24/driver/mxu1151_fw.h mxu1151_fw.h
  156.  
  157. 3.4.3 Modify kernel configuration file.
  158. Add the following line into configuration file.
  159. /usr/src/linux/drivers/usb/serial/Config.in
  160.  
  161. dep_tristate ' MOXA UPort 1100 Driver' CONFIG_MOXA_UPORT_1100
  162.  
  163. 3.4.4 Modify the kernel Makefile
  164. Add the following line into Makefile.
  165. /usr/src/linux/drviers/usb/serial/Makefile
  166.  
  167. obj-$(CONFIG_MOXA_UPORT_1100) += mxu1100_24.o
  168.  
  169. 3.4.5 Setup kernel configuration
  170.  
  171. Configure the kernel:
  172.  
  173. # cd /usr/src/linux
  174. # make mrproper
  175. # make menuconfig
  176.  
  177. You will go into a menu-driven system. Please select [USB Support]
  178. [USB Serial Converter support], enable the [MOXA UPORT 1100 Driver]
  179. driver with "[*]" by pressing space bar for built-in
  180. (not "[M]"), then select [Exit] to exit this program.
  181.  
  182. 3.4.6 Rebuild kernel
  183. The following are for Linux kernel rebuilding, for your
  184. reference only.
  185. For appropriate details, please refer to the Linux document.
  186.  
  187. a. cd /usr/src/linux
  188. b. make clean /* take a few minutes */
  189. c. make dep /* take a few minutes */
  190. d. make bzImage /* take probably 10-20 minutes */
  191. e. make modules
  192. f. make install /* copy boot image to correct position */
  193. g. make modules_install
  194. h. Please make sure the boot kernel (vmlinuz) is in the
  195. correct position.
  196. i. If you use 'lilo' utility, you should check /etc/lilo.conf
  197. 'image' item specified the path which is the 'vmlinuz' path,
  198. or you will load wrong (or old) boot kernel image (vmlinuz).
  199. After checking /etc/lilo.conf, please run "lilo".
  200.  
  201. Note that if the result of "make bzImage" is ERROR, then you have to
  202. go back to Linux configuration Setup. Type "make menuconfig" in
  203. directory /usr/src/linux.
  204.  
  205. 3.5 Verify driver installation
  206. You may refer to /var/log/messages to check the latest status
  207. log reported by this driver whenever it's activated.
  208.  
  209. -----------------------------------------------------------------------------
  210. 4. Setserial
  211.  
  212. MOXA UPort 1130 provides three interfaces(RS-485 2W, RS-485 4W, RS-422) and
  213. UPort 1150/1150I provides four interfaces(RS-232, RS-485 2W, RS-485 4W,
  214. RS-422). If you want to switch different interface, you can execute the
  215. setserial command to set the port's interface. The supported parameter is
  216. listed below.
  217.  
  218. parameter value interface
  219.  
  220. port 0 RS-232
  221. 1 RS-485 2W
  222. 2 RS-422
  223. 3 RS-485 4W
  224.  
  225. For example:
  226. To set the port's informations:
  227. # setserial /dev/ttyUSB0 port 1
  228.  
  229. To get the port's informations:
  230. # setserial -G /dev/ttyUSB0
  231.  
  232. -----------------------------------------------------------------------------
  233. 5. Limitation
  234. 1. Max. ports
  235. If you want to install more than one UPort USB serial Hub, the best
  236. way is to connect to USB port directly. In lab test, four USB ports
  237. with four UPort 1110/1130/1150/1150I still work very well. If we connect
  238. to USB hub, the throughput will be dropped down. To get good performance,
  239. please connecting UPort 1110/1130/1150/1150I to USB port directly .
  240.  
  241.  
  242. 2. Compile error
  243. To build Moxa driver, it needs kernel header files. If you got
  244. some compile error, please run "rpm -qa | grep kernel" to check
  245. whether the kernel-source package is installed properly. If not,
  246. please get the kernel-source irpm package and run "rpm -ivh <pacakge>"
  247. to install. You also need to make sure the build tool is ready,
  248. including make/gcc/lib. Please see Linux relative document to
  249. get more information.
  250.  
  251. 3. Probe error
  252. The UPort 1110/1130/1150/1150I needs firmware downloaded after attaching
  253. to PC. Hence, the driver will reset the UPort 1110/1130/1150/1150I after
  254. downloading firmware and probe the UPort 1110/1130/1150/1150I again.
  255. After that, the UPort 1110/1130/1150/1150I will attach to the
  256. /dev/ttyUSBxx. Therefore, the message "mxu1_download_firmware - error
  257. downloading, -110" will show only once before successfully installing
  258. the device. You may refer to /dev/ttyUSBxx to see if the
  259. UPort 1110/1130/1150/1150I is set correctly.
  260.  
  261. -----------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement