Here are some notes for using the new IO Networks io_edgeport and io_ti drivers. Changes at this point include adding: 1. support for the new Edgeport 4s (added to the io_ti driver) 2. two new utility programs (ionmode and ionmode_menu) for setting and querying port modes on the Edgeport 4s. 3. Adding support for 50 baud in the original io_edgeport driver (io_ti already supported this). 4. Backporting io_ti (and the updated version of usbserial on which it depends) from the 2.4.21 kernel to 2.4.19. So far I've only done limited testing with these drivers and utilities, but everything seems to work with the following exception: I've noticed on both kernels that the io_ti driver is loaded at boot time (e.g: and Edgeport 4s is plugged in at boot time), then the first attempts to open those ports hang. Unplugging the Edgeport USB connector from the computer, counting to 10 (to let the hotplug system stabilize) and then reinserting it, fixes the problem -- subsequent opens work even without having to reload the driver. Similarly, if the Edgeport cable is only connected after a reboot, everything works fine. We need to track this down. In the meantime, keep Edgeport 4s (and other io_ti devices?) unplugged during reboot cycles. Let me know if you have any questions or experience any problems with the drivers or these instructions. Thanks. --Peter Berger June 19, 2003 pberger@brimson.com The following files are provided at www.brimson.com:downloads: ionbinary-for2.4.19-rev1.tgz Binaries only, compiled against a vanilla Linux 2.4.19 kernel ionsrc-for2.4.19-rev1.tgz Sources only to be used with a full set of vanilla Linux 2.4.19 kernel sources. ionbinary-for2.4.21-rev1.tgz Binaries only, compiled against a vanilla Linux 2.4.21 kernel ionsrc-for2.4.21-rev1.tgz Sources only to be used with a full set of vanilla Linux 2.4.21 kernel sources. Note: An observant user may notice that the installation packages for 2.4.21 kernels contain fewer files than those for 2.4.19 kernels. This is because the vanilla version of later kernels already include some of needed patches. Choose which method: binary or source and the target kernel version: 2.4.19 or 2.4.21 you wish to use. In general binary installations should be somewhat simpler. Here are instructions for each of the four situations: BINARY installation on a 2.4.19 kernel -------------------------------------- - Log in a root - Move to some working directory, e.g: mkdir ionbinary cd ion - Unpack the files: tar xvzf ionbinary-for2.4.19-rev1.tgz This will unpack the new files to the current directory and to a newly created subdirectory: "io_utils" - Save your current 2.4.19 Edgeport and USB serial driver binaries so you can restore them later if you wish: mkdir orig cp -p /lib/modules/2.4.19/kernel/drivers/usb/serial/usbserial.o orig cp -p /lib/modules/2.4.19/kernel/drivers/usb/serial/io_edgeport.o orig cp -p /lib/modules/2.4.19/kernel/drivers/usb/serial/io_ti.o orig - Copy the new files into the system directory: cp -p usbserial.o /lib/modules/2.4.19/kernel/drivers/usb/serial/usbserial.o cp -p io_edgeport.o /lib/modules/2.4.19/kernel/drivers/usb/serial/usbserial.o cp -p io_ti.o /lib/modules/2.4.19/kernel/drivers/usb/serial/usbserial.o - Unplug any installed Edgeport USB cables from your computer and wait 10 seconds or so for the system to stabilize. (You can monitor the system messages file with "tail -f /var/log/messages" until usb related messages related to the newly-disconnected Edgeport devices cease.) - Remove old versions of the modules from your running kernel: /sbin/rmmod io_edgeport usbserial Vanilla 2.4.19 kernels didn't include an io_ti module, but if you've loaded one from elsewhere (e.g: an earlier run through these instructions), remove that too: /sbin/rmmod io_edgeport io_ti - Verify that none of the old modules is still loaded. The output of: /sbin/lsmod should not include any mentions of io_ti, io_edgeport or usbserial. If it does you may have some program (e.g: getty) holding a USB port open. Do whatever you must to remove these modules. If all else fails, reboot with the Edgeports disconnected. - Make sure your module dependencies are up to date: /sbin/depmod -a - Insert the USB cable from your Edgeport device. - Verify that the correct modules are loaded: /sbin/lsmod should now display entries for usbserial. Also, depending on which Edgeport devices you inserted, you should see an entry for io_edgeport (for Intel 930 based devices like the Edgeport/8) or io_ti (for TI based devices like the Edgeport 4s). - If you are using one of the Intel 930 Edgeports or any of the TI devices including the Edgeport 4s in RS232 mode (the default), everything should now be working. If you want to use one or more Edgeport 4s ports in one of the RS422 or RS485 modes, you'll need to condition the ports using the command line utility: ionmode or its menu-based wrapper program: ionmode_menu. See "Conditioning Edgeport 4s ports with ionmode and ionmode_menu" below. BINARY installation on a 2.4.21 kernel -------------------------------------- - Log in a root - Move to some working directory, e.g: mkdir ionbinary cd ion - Unpack the files: tar xvzf ionbinary-for2.4.21-rev1.tgz This will unpack the new files the current directory and to a newly created subdirectory: "io_utils" - Save your current 2.4.21 Edgeport and USB serial driver binaries so you can restore them later if you wish: mkdir orig cp -p /lib/modules/2.4.21/kernel/drivers/usb/serial/io_edgeport.o orig cp -p /lib/modules/2.4.21/kernel/drivers/usb/serial/io_ti.o orig - Copy the new files into the system directory: cp -p usbserial.o /lib/modules/2.4.21/kernel/drivers/usb/serial/usbserial.o cp -p io_edgeport.o /lib/modules/2.4.21/kernel/drivers/usb/serial/usbserial.o cp -p io_ti.o /lib/modules/2.4.21/kernel/drivers/usb/serial/usbserial.o - Unplug any installed Edgeport USB cables from your computer and wait 10 seconds or so for the system to stabilize. (You can monitor the system messages file with "tail -f /var/log/messages" until usb related messages related to the newly-disconnected Edgeport devices cease.) - Remove old versions of the modules from your running kernel: /sbin/rmmod io_edgeport usbserial io_ti - Verify that none of the old modules is still loaded. The output of: /sbin/lsmod should not include any mentions of io_ti, io_edgeport or usbserial. If it does you may have some program (e.g: getty) holding a USB port open. Do whatever you must to remove these modules. If all else fails, reboot with the Edgeports disconnected. - Make sure your module dependencies are up to date: /sbin/depmod -a - Insert the USB cable from your Edgeport device. - Verify that the correct modules are loaded: /sbin/lsmod should now display entries for usbserial. Also, depending on which Edgeport devices you inserted, you should see an entry for io_edgeport (for Intel 930 based devices like the Edgeport/8) or io_ti (for TI based devices like the Edgeport 4s). - If you are using one of the Intel 930 Edgeports or any of the TI devices including the Edgeport 4s in RS232 mode (the default), everything should now be working. If you want to use one or more Edgeport 4s ports in one of the RS422 or RS485 modes, you'll need to condition the ports using the command line utility: ionmode or its menu-based wrapper program: ionmode_menu. See "Conditioning Edgeport 4s ports with ionmode and ionmode_menu" below. SOURCE installation on a 2.4.19 kernel -------------------------------------- - Log in a root - Make sure you have the full sources for your 2.4.19 kernel installed and that you have successfully configured, built and run kernel from these sources before complicating your life with the new sources. - Move to the usb/serial directory: cd /usr/src/linux-2.4.19/drivers/usb/serial - Save your current 2.4.19 Edgeport and USB serial driver source and binary files so you can restore them later if you wish: mkdir orig mv io* orig mv Makefile orig mv Config.in orig - Unpack the files: tar xvzf ionsrc-for2.4.19-rev1.tgz This will unpack the new files into the current (...usb/serial) directory and to a newly created subdirectory: "io_utils" - Check the configuration and make certain that usbserial, io_edgeport and io_ti are all selected for inclusion: cd /usr/src/linux-2.4.19 make xconfig (or "make menuconfig") Select "USB Serial Converter support" under "USB support" and make certain that: "USB Serial Converter support" "USB Inside Out Edgeport Serial Driver" "USB Inside Out Edgeport Serial Driver (TI devices)" are all scheduled to be built as modules ("m" box). Make a note of their previous settings. If any of these has previously been compiled in to your kernel ("y" box highlighted), then you'll need to rebuild your base kernel below also. If these modules were previously excluded ("n" box highlighted) or previously selected to be included as modules ("m" box highlighted), then you can skip the base kernel compile step below. Finally, return to the main menu and select "Save and Exit". - Update the dependency tree: make dep - If any of the three USB options selected above were previously compiled in to your kernel ("y" box highlighted), you'll need to rebuild and reinstall your kernel. Otherwise you can skip to rebuilding the modules below. Rebuilding the kernel generally involves something like: make bzImage cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.19 cp System.map /boot/System.map-2.4.19 followed by updating your /boot/grub/menu.lst or /etc/lilo.conf file (followed in the later case by invoking "/sbin/lilo" to reread the file) - Build the new modules: make modules - Install the new modules to /lib/modules/2.4.19/kernel/drivers/usb/serial: make modules_install - Unplug any installed Edgeport USB cables from your computer and wait 10 seconds or so for the system to stabilize. (You can monitor the system messages file with "tail -f /var/log/messages" until usb related messages related to the newly-disconnected Edgeport devices cease.) - Remove old versions of the modules from your running kernel: /sbin/rmmod io_edgeport usbserial Vanilla 2.4.19 kernels didn't include an io_ti module, but if you've loaded one from elsewhere (e.g: an earlier run through these instructions), remove that too: /sbin/rmmod io_edgeport io_ti - Verify that none of the old modules is still loaded. The output of: /sbin/lsmod should not include any mentions of io_ti, io_edgeport or usbserial. If it does you may have some program (e.g: getty) holding a USB port open. Do whatever you must to remove these modules. If all else fails, reboot with the Edgeports disconnected. - Make sure your module dependencies are up to date: /sbin/depmod -a - Insert the USB cable from your Edgeport device. - Verify that the correct modules are loaded: /sbin/lsmod should now display entries for usbserial. Also, depending on which Edgeport devices you inserted, you should see an entry for io_edgeport (for Intel 930 based devices like the Edgeport/8) or io_ti (for TI based devices like the Edgeport 4s). - If you are using one of the Intel 930 Edgeports or any of the TI devices including the Edgeport 4s in RS232 mode (the default), everything should now be working. If you want to use one or more Edgeport 4s ports in one of the RS422 or RS485 modes, you'll need to condition the ports using the command line utility: ionmode or its menu-based wrapper program: ionmode_menu. See "Conditioning Edgeport 4s ports with ionmode and ionmode_menu" below. SOURCE installation on a 2.4.21 kernel -------------------------------------- - Log in a root - Make sure you have the full sources for your 2.4.21 kernel installed and that you have successfully configured, built and run kernel from these sources before complicating your life with the new sources. - Move to the usb/serial directory: cd /usr/src/linux-2.4.21/drivers/usb/serial - Save your current 2.4.21 Edgeport and USB serial driver source and binary files so you can restore them later if you wish: mkdir orig mv io* orig mv Makefile orig mv Config.in orig - Unpack the files: tar xvzf ionsrc-for2.4.21-rev1.tgz This will unpack the new files into the current (...usb/serial) directory and to a newly created subdirectory: "io_utils" - Check the configuration and make certain that usbserial, io_edgeport and io_ti are all selected for inclusion: cd /usr/src/linux-2.4.21 make xconfig (or "make menuconfig") Select "USB Serial Converter support" under "USB support" and make certain that: "USB Serial Converter support" "USB Inside Out Edgeport Serial Driver" "USB Inside Out Edgeport Serial Driver (TI devices)" are all scheduled to be built as modules ("m" box). Make a note of their previous settings. If any of these has previously been compiled in to your kernel ("y" box highlighted), then you'll need to rebuild your base kernel below also. If these modules were previously excluded ("n" box highlighted) or previously selected to be included as modules ("m" box highlighted), then you can skip the base kernel compile step below. Finally, return to the main menu and select "Save and Exit". - Update the dependency tree: make dep - If any of the three USB options selected above were previously compiled in to your kernel ("y" box highlighted), you'll need to rebuild and reinstall your kernel. Otherwise you can skip to rebuilding the modules below. Rebuilding the kernel generally involves something like: make bzImage cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.21 cp System.map /boot/System.map-2.4.21 followed by updating your /boot/grub/menu.lst or /etc/lilo.conf file (followed in the later case by invoking "/sbin/lilo" to reread the file) - Build the new modules: make modules - Install the new modules to /lib/modules/2.4.21/kernel/drivers/usb/serial: make modules_install - Unplug any installed Edgeport USB cables from your computer and wait 10 seconds or so for the system to stabilize. (You can monitor the system messages file with "tail -f /var/log/messages" until usb related messages related to the newly-disconnected Edgeport devices cease.) - Remove old versions of the modules from your running kernel: /sbin/rmmod io_edgeport usbserial io_ti - Verify that none of the old modules is still loaded. The output of: /sbin/lsmod should not include any mentions of io_ti, io_edgeport or usbserial. If it does you may have some program (e.g: getty) holding a USB port open. Do whatever you must to remove these modules. If all else fails, reboot with the Edgeports disconnected. - Make sure your module dependencies are up to date: /sbin/depmod -a - Insert the USB cable from your Edgeport device. - Verify that the correct modules are loaded: /sbin/lsmod should now display entries for usbserial. Also, depending on which Edgeport devices you inserted, you should see an entry for io_edgeport (for Intel 930 based devices like the Edgeport/8) or io_ti (for TI based devices like the Edgeport 4s). - If you are using one of the Intel 930 Edgeports or any of the TI devices including the Edgeport 4s in RS232 mode (the default), everything should now be working. If you want to use one or more Edgeport 4s ports in one of the RS422 or RS485 modes, you'll need to condition the ports using the command line utility: ionmode or its menu-based wrapper program: ionmode_menu. See "Conditioning Edgeport 4s ports with ionmode and ionmode_menu" below. Conditioning Edgeport 4s ports with ionmode and ionmode_menu ------------------------------------------------------------ Edgeport 4s ports can be independently configured to run in RS232 or any any of a number of different RS422 or RS485 modes. The command line utility "ionmode" provides options for setting and querying these modes on a port-by-port basis suitable for use in startup scripts or by expert users. "ionmode_menu" provides an alternative menu interface to for setting port modes with "ionmode". Source code, executables and man pages are provided for these utilities in the io_utils subdirectory packed into each distribution. A quick summary of all ionmode options is available via: ionmode -h For example, to set port 0 to "RS422: No Terminating Resistor" mode: ionmode -F /dev/ttyUSB0 0x01 Alternatively, running: ionmode_menu provides a pick-and-select menu interface from which the user can select from a number of descriptive phrases (e.g: "RS422: No Terminating Resistor") and let ionmode_menu map them into appropriate calls to ionmode.